Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

name the record's own animation types in sprite reopen warnings instead of "scanner"

[._.]/ Adam Eivy166fdd3fa65d
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index e169af1173..5a7f72024b 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -48,6 +48,7 @@
## Fixed
- **Sprite correction notes are no longer ignored on regenerate.** Typing a correction on a sprite re-roll ("hip bag should be on the other leg") and hitting Regenerate produced a render essentially identical to the one you'd just rejected. The note was being sent — it was losing an argument inside the prompt. Every regenerate prompt spends several sentences pinning the render to the attached reference ("keep accessories on the same anatomical side", "treat the turnaround panels as the source of truth"), and the correction was one trailing sentence asking to change exactly that, phrased as an edit to the *attached* image rather than a fix in the image being produced — so the model sided with the bulk of the prompt. Corrections now frame the render up front, before any preservation rule is read, and close it with an explicit override. Verified on the reported case: the note that had left the sprite unchanged now moves the bag on both samples. A blank note still produces a byte-identical blind regenerate on every surface (turnaround, main, the 7 directional anchors, walk, and every animation track including user-defined ones).
+- **Sprite reference reopen warnings now name the animations you actually have, instead of assuming a "scanner".** Reopening a locked main reference asked "Reopen the main reference and its south walk/scanner?" — but `scanner` stopped being a built-in some releases ago and is now just a seeded row you can retune or delete like any other animation type. So the warning was wrong in both directions: if you'd deleted the scanner it named an animation you don't have, and if you'd authored your own directional animation it never mentioned the approvals it was about to drop. The main-reference and turnaround warnings now list this character's own directional animation types by name (non-directional ones aren't affected by a reference reopen, so they're correctly left out), falling back to the plain word "animations" when there are none to name. Two toasts were under-reporting the same way: unlocking a single directional anchor only mentioned the walk it reopened, and unlocking the turnaround counted only reopened walks — both now cover every animation type the reopen actually dropped.
- **The Chief of Staff 3D avatar no longer sometimes renders as an empty glowing ring.** The Cyber Muse and Mini-Character avatars share one loaded 3D model with the CyberCity player avatar, and letting the 3D engine free that model's data when one avatar left the screen left the next one pointing at freed data — so it drew nothing, leaving just the halo ring behind it (which looked like a lone SVG circle). This happened intermittently after switching avatar styles, changing tabs, or visiting CyberCity. Each avatar now keeps the shared model intact when it unmounts, so it reloads cleanly every time.
- **Music Video analysis now finds the beat in guitar-led songs and shows its evidence.** The offline detector uses spectral change instead of whole-track loudness changes, with later-window consensus for quiet or rubato intros. The director timeline now includes a full-song energy waveform, beat/downbeat markers, section energy, time rulers, a clickable overview, and an explicit 4/4-grid assumption instead of presenting an empty “beat-quantized” strip when the cached analysis contains no visible musical information.
- **Music Video final renders now honor the authored song timeline.** Scene clips loop when their generated source is shorter than the beat-aligned cut, so an arrangement can cover the full track instead of being silently truncated to each model's native clip length.
diff --git a/client/src/components/sprites/CorrectionNote.jsx b/client/src/components/sprites/CorrectionNote.jsx
index f9c9a2b1da..c18debbe45 100644
--- a/client/src/components/sprites/CorrectionNote.jsx
+++ b/client/src/components/sprites/CorrectionNote.jsx
@@ -3,8 +3,9 @@
* by #3134).
*
* Every surface that can re-roll a render — the turnaround sheet, the main
- * reference, the 7 directional anchors, the walk/scanner clips, and the ambient
- * reference + loop — renders the SAME control writing the SAME page-owned
+ * reference, the 7 directional anchors, and each animation track's clips
+ * (`walk` plus whatever the user's registry holds) — renders the SAME control
+ * writing the SAME page-owned
* `corrections` map (lifted to `Sprites.jsx`), so the placeholder, aria-label,
* and updater shape live in one place and can't drift between surfaces.
* `className` lets each host keep its own chrome (full grid tile vs. compact
@@ -69,8 +70,8 @@ export function CorrectionToggleButton({ open, onToggle, hasValue, label, text =
}
/**
- * Toggle + revealed note, stacked — the affordance the walk / scanner / ambient
- * cards use. Opens by default when a note already exists so a set correction is
+ * Toggle + revealed note, stacked — the affordance every animation-track card
+ * uses. Opens by default when a note already exists so a set correction is
* never invisible. Keeps the note out of the way on the (common) blind-re-roll
* path, which matters on cards that are already dense on mobile.
*/
diff --git a/client/src/components/sprites/ReferenceWorkflow.jsx b/client/src/components/sprites/ReferenceWorkflow.jsx
index 60c381a279..a53ce271bb 100644
--- a/client/src/components/sprites/ReferenceWorkflow.jsx
+++ b/client/src/components/sprites/ReferenceWorkflow.jsx
@@ -197,7 +197,7 @@ function StageHeading({ id, number, title, status, statusTone = 'text-gray-500'
);
}
-export default function ReferenceWorkflow({ record, reference, renders, corrections, onCorrectionChange, backends, mode, onModeChange, onChanged, onForked }) {
+export default function ReferenceWorkflow({ record, reference, renders, corrections, onCorrectionChange, backends, trackDefinitions, mode, onModeChange, onChanged, onForked }) {
const recordId = record.id;
const manifest = reference?.manifest || null;
const candidates = reference?.candidates || [];
@@ -210,6 +210,25 @@ export default function ReferenceWorkflow({ record, reference, renders, correcti
const backfilling = mainLocked && !turnaroundLocked;
// Whichever lock froze the canonical key closes the pin control.
const keyFrozen = mainLocked || turnaroundLocked;
+ // What a reference reopen actually drops, named from THIS record's registry
+ // slice rather than as literal copy. The old wording said "walk/scanner",
+ // which was already wrong twice over since #3152 made every non-walk track
+ // user-defined: an install whose user deleted the seeded `scanner` row was
+ // warned about an animation it does not have, and one who authored a track of
+ // their own was not warned about the approvals they were about to lose.
+ //
+ // Directional is the client-side spelling of the server's `sourceReferenceFor`
+ // === 'anchor' (a per-facing track must seed from that facing's own anchor) —
+ // which is exactly the set `invalidateAnchorDependentTracks` sweeps, so this
+ // sentence and the invalidation it describes cannot drift.
+ const anchorSeededLabels = useMemo(() => (trackDefinitions || [])
+ .filter((row) => row.directional)
+ .map((row) => row.label.toLowerCase()), [trackDefinitions]);
+ // Falls back to the generic noun when the record carries no directional track
+ // (or the caller passed no definitions) rather than rendering an empty list.
+ const anchorSeededPhrase = anchorSeededLabels.length
+ ? anchorSeededLabels.join(' / ')
+ : 'animations';
// Once every anchor is locked this grid is just static previews of files the
// "Reference set" file browser below already lists (and makes inspectable /
// downloadable), so it reads as duplicate content. Collapse it by default
@@ -368,8 +387,12 @@ export default function ReferenceWorkflow({ record, reference, renders, correcti
{ direction },
{ silent: true },
);
- toast.success(result.walkInvalidated
- ? `${direction} anchor unlocked; its walk was reopened`
+ // Same per-track map the main unlock reads below — `unlockDirectionalAnchor`
+ // sweeps every anchor-seeded track for this facing, not just walk, so a toast
+ // that reads only `walkInvalidated` under-reports what it just dropped.
+ const tracksReopened = Object.values(result.tracksInvalidated || {}).some(Boolean);
+ toast.success(result.walkInvalidated || tracksReopened
+ ? `${direction} anchor unlocked; its animations were reopened`
: `${direction} anchor unlocked`);
onChanged();
}, { errorMessage: 'Failed to unlock anchor' });
@@ -390,9 +413,17 @@ export default function ReferenceWorkflow({ record, reference, renders, correcti
const [unlockTurnaround, turnaroundUnlocking] = useAsyncAction(async () => {
const result = await unlockSpriteTurnaround(recordId, { silent: true });
- const invalidated = result.walkInvalidatedDirections?.length || 0;
+ // A turnaround reopen resets the whole identity chain, so the server sweeps
+ // EVERY anchor-seeded track across every facing (`tracksInvalidatedDirections`)
+ // alongside walk. Count the reopened facings across all of them rather than
+ // reporting walk's alone — a record whose user deleted `walk`'s seeded
+ // companions, or added their own, otherwise sees a number that doesn't match
+ // the cards that just went back to draft.
+ const trackDirections = Object.values(result.tracksInvalidatedDirections || {})
+ .reduce((total, directions) => total + (directions?.length || 0), 0);
+ const invalidated = (result.walkInvalidatedDirections?.length || 0) + trackDirections;
toast.success(invalidated
- ? `Turnaround unlocked; ${invalidated} dependent walks were reopened`
+ ? `Turnaround unlocked; ${invalidated} dependent ${invalidated === 1 ? 'animation was' : 'animations were'} reopened`
: 'Turnaround unlocked; dependent references were reopened');
setTurnaroundUnlockConfirming(false);
onChanged();
@@ -531,7 +562,7 @@ export default function ReferenceWorkflow({ record, reference, renders, correcti
{turnaroundUnlockConfirming ? (
<div className="mt-3 rounded border border-port-warning/40 bg-port-warning/10 p-2 text-[11px]">
<p className="text-port-warning">
- Reopen the turnaround, main, all 8 anchors, and any approved walks? Existing versioned files stay in history.
+ Reopen the turnaround, main, all 8 anchors, and every approved {anchorSeededPhrase}? Existing versioned files stay in history.
</p>
<div className="mt-2 flex gap-2">
<button
@@ -740,7 +771,7 @@ export default function ReferenceWorkflow({ record, reference, renders, correcti
{turnaroundLocked && (mainUnlockConfirming ? (
<div className="rounded border border-port-warning/40 bg-port-warning/10 p-2 text-[11px]">
<p className="text-port-warning">
- Reopen the main reference and its south walk/scanner? The turnaround and other directions stay locked; existing files remain in history.
+ Reopen the main reference and its south {anchorSeededPhrase}? The turnaround and other directions stay locked; existing files remain in history.
</p>
<div className="mt-2 flex gap-2">
<button
diff --git a/client/src/components/sprites/ReferenceWorkflow.test.jsx b/client/src/components/sprites/ReferenceWorkflow.test.jsx
index f2f4dd9881..3aa7122237 100644
--- a/client/src/components/sprites/ReferenceWorkflow.test.jsx
+++ b/client/src/components/sprites/ReferenceWorkflow.test.jsx
@@ -41,7 +41,7 @@ const renders = {
cancelSubmit: vi.fn(),
};
-const renderWorkflow = ({ turnaround } = {}) => render(
+const renderWorkflow = ({ turnaround, trackDefinitions } = {}) => render(
<ReferenceWorkflow
record={{ id: 'example-pioneer', name: 'Example Pioneer', chromaKey: '#FF00FF' }}
reference={{
@@ -66,6 +66,7 @@ const renderWorkflow = ({ turnaround } = {}) => render(
corrections={{}}
onCorrectionChange={vi.fn()}
backends={[{ id: 'codex', label: 'Codex' }]}
+ trackDefinitions={trackDefinitions}
mode="codex"
onModeChange={vi.fn()}
onChanged={vi.fn()}
@@ -159,11 +160,38 @@ describe('ReferenceWorkflow workspace', () => {
const main = screen.getByRole('region', { name: 'Main reference' });
await user.click(within(main).getByRole('button', { name: 'Unlock main reference' }));
- expect(within(main).getByText(/Reopen the main reference and its south walk\/scanner/)).toBeInTheDocument();
+ // No definitions supplied → the generic noun, never a track name this record
+ // may not carry.
+ expect(within(main).getByText(/Reopen the main reference and its south animations\?/)).toBeInTheDocument();
await user.click(within(main).getByRole('button', { name: 'Confirm unlock main reference' }));
expect(unlockSpriteMainReference).toHaveBeenCalledWith('example-pioneer', { silent: true });
});
+ // #3152 made every non-walk track user-defined, so the reopen warnings may not
+ // name `scanner` (or any other seeded row) as copy: an install whose user
+ // deleted it would be warned about an animation it does not have, and one who
+ // authored their own would not be warned about the approvals being dropped.
+ it('names this record\'s own directional tracks in the reopen warnings', async () => {
+ const user = userEvent.setup();
+ renderWorkflow({
+ turnaround: { locked: true, path: 'reference/example-pioneer-turnaround-v1.png' },
+ trackDefinitions: [
+ { id: 'walk', label: 'Walk cycle', directional: true },
+ { id: 'chest-open', label: 'Chest opening', directional: true },
+ // Non-directional tracks seed from the main itself, not a per-facing
+ // anchor, so they are NOT part of the anchor-dependent sweep.
+ { id: 'ambient', label: 'Ambient loop', directional: false },
+ ],
+ });
+
+ const main = screen.getByRole('region', { name: 'Main reference' });
+ await user.click(within(main).getByRole('button', { name: 'Unlock main reference' }));
+ const warning = within(main).getByText(/Reopen the main reference and its south/);
+ expect(warning.textContent).toContain('walk cycle / chest opening');
+ expect(warning.textContent).not.toContain('scanner');
+ expect(warning.textContent).not.toContain('ambient loop');
+ });
+
it('re-processes one turnaround attempt with its own correction note', async () => {
const user = userEvent.setup();
generateSpriteReference.mockClear();
diff --git a/client/src/lib/spriteCorrections.js b/client/src/lib/spriteCorrections.js
index d697e1238e..6dfe09a65a 100644
--- a/client/src/lib/spriteCorrections.js
+++ b/client/src/lib/spriteCorrections.js
@@ -3,8 +3,9 @@
* regeneration surface by #3134).
*
* Every Sprite Manager surface that can re-roll a render — the turnaround sheet,
- * the main reference, the 7 directional anchors, the walk and scanner clips, and
- * the ambient reference + loop — writes its note into ONE page-owned
+ * the main reference, the 7 directional anchors, and each animation track's
+ * reference + clips (`walk` plus whatever the user's registry holds) — writes
+ * its note into ONE page-owned
* `corrections` map (lifted to `Sprites.jsx`). This module owns that map's key
* vocabulary and the single helper that turns a note into a request fragment, so
* the pure action-gating layer (`spriteCollectionActions.js`) and the React
diff --git a/client/src/pages/Sprites.jsx b/client/src/pages/Sprites.jsx
index 18090867d7..1a298e631d 100644
--- a/client/src/pages/Sprites.jsx
+++ b/client/src/pages/Sprites.jsx
@@ -443,7 +443,7 @@ export default function Sprites() {
});
// Correction guidance for EVERY regeneration surface is page-owned (#2964,
- // extended to the main reference / walk / scanner / ambient surfaces by
+ // extended to the main reference and every animation track's surfaces by
// #3134) so a workflow panel and the asset-collection Regenerate button
// read/write ONE source: a correction typed on either surface applies to the
// other AND rides along as `correctionPrompt` on whichever re-roll fires.
@@ -798,6 +798,7 @@ export default function Sprites() {
corrections={corrections}
onCorrectionChange={setCorrections}
backends={imageBackends}
+ trackDefinitions={detail.trackDefinitions}
mode={imageMode}
onModeChange={setImageMode}
onChanged={onWorkflowChanged}