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

render sprite turnaround sheet as a large square instead of a wasted strip

[._.]/ Adam Eivy4679d39a20dd
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 06801eb38b..aba13550bd 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -151,3 +151,4 @@
- **Heal the `grok/` run-path residue that blanked imported sprite walk cycles (migration 203)** — imported characters whose source pipeline anchored run paths at `art-source/sprites/<id>/grok/…` rendered every walk direction's "approved" badge over an empty cell (observed on `pioneer`: 7 of 8 directions blank, only the imagegen-redraw `east` — which never carried a `grok/` segment — animated). Migration 202 physically relocated those runs `grok/` → `runs/` but its `startsWith('grok/')` neutralizer only matched record-relative paths, so it left every repo-anchored `…/sprites/<id>/grok/…` string pointing at the now-nonexistent directory — the read layer stripped the `art-source/…` prefix to `grok/…`, which no longer resolved, so `getWalkState` couldn't find the run behind each direction and the strip-loop preview URL 404'd. New migration `203-heal-imported-grok-run-paths.js` rewrites the leftover `sprites/<id>/grok/` segment to `runs/` (preserving the `art-source/…` provenance prefix and image-byte shas, exactly as 202 preserved its anchoring) across the selection, walk-set, run records, and postprocess manifests, then recomputes the same `runManifestSha256`/`selectionSha256`/`walkSetSha256` cascade so the healed state is internally consistent. Gated to records 202 already moved (`runs/` present, `grok/` gone) that still carry the residue — a self-consistent `grok/`-layout record is left untouched. Non-path strings that merely contain "grok" (`grok-game-animation-frames-run`, `local-postprocess-of-existing-grok-session-video`) are unaffected.
- **Flag a missing walk strip instead of rendering a silent blank card** — a sprite direction whose packed `…-strip.png` had gone missing on disk (how `pioneer`'s `north`/`west` strips vanished — dropped during a `grok/`→`runs/` relocation while the record still advertised the path) rendered its "approved" badge over an empty cell: `getWalkState`'s native run path handed the client a `stripPreview.stripPath` that 404'd into a blank CSS-`background-image` `StripLoop`, unlike `loadRedrawRun` which already returns null on a missing strip. `getWalkState` now checks the strip on disk (`normalizeMissingStrip`, mirroring the existing `normalizeStaleRendering` read-time normalization — never persisted) and, when absent, flags the run `stripMissing: true` and drops the dangling `stripPath` so `StripLoop`/the trim button don't render it. The walk card shows an explicit "strip missing" indicator pointing at the recovery that actually works for that direction's state — **regenerate** an unapproved/unfinalized direction, **unlock** a finalized set — rather than overloading the run's `error` status (which would offer a "Retry postprocess" that 409s on a finalized/approved direction and pair a red error with the green "approved" ✓). As defense-in-depth (a background-image fires no `onError`), `StripLoop` also preloads the strip via an `Image` probe and shows a placeholder if it fails to load for any other reason.
- **Variable walk-cycle frame count + adjustable walking speed, reprocessable from the clip already on disk** — walk cycles were hardcoded to 8 frames at 12fps, a 0.67s cycle that reads as a run rather than a walk. Two knobs are now user-controlled in the Walk Cycles panel: **frame count** (6–16, default 12 — more frames = smoother) and **playback speed** (4–24 fps, default 10 — lower = slower/more deliberate), with a live "N.NNs / cycle" readout. The deterministic packer resamples the detected gait window *down* to the chosen count (it never upsamples — the count is bounded by the source frames in one cycle) and stamps the chosen fps as playback metadata, so a slower, smoother walk needs **no regeneration**: a per-candidate "Reprocess" rebuilds the loop from the clip already on disk at the current count/speed with no grok call. The runtime atlas grid follows the set's actual frame count (idle + N walk phases), read from the approved run manifests and required identical across all eight directions, with `walkFrameCount`/`walkFps` stamped into the geometry manifest for the external game to read; the historical 8-frame packing keeps its named 2-beat gait-phase labels for byte-identical back-compat. A new per-direction **Reopen** re-opens just one approved direction (finer-grained than the whole-set Unlock) so a single too-fast walk can be redone without disturbing the other seven. The Clip length picker now offers only grok's real 6s/10s options — shorter values were a silent no-op (grok clamps to ~6s), and clip length only affects how much source footage the packer has to choose from, not the cycle's look.
+- **Render the sprite turnaround sheet as a large square instead of a wasteful strip** — the locked "identity root" turnaround preview in the Reference workflow used a fixed 192×128 landscape box, but the sheet is a square PNG (four figures in a 1:1 canvas); `object-contain` letterboxed it into a ~128px center strip and wasted the sides. It now renders as a large responsive square (`w-full max-w-sm aspect-square`, stacking the "frozen · identity root" caption below it on mobile), so the four-view sheet is shown as big as its column allows. The candidate thumbnails and locked directional-anchor previews (also square PNGs previously fit into short `h-24` boxes) switch to `aspect-square` too, so every reference image in the panel fills its cell instead of floating in a center band.
diff --git a/client/src/components/sprites/ReferenceWorkflow.jsx b/client/src/components/sprites/ReferenceWorkflow.jsx
index f0d542ed0b..2bc33abac8 100644
--- a/client/src/components/sprites/ReferenceWorkflow.jsx
+++ b/client/src/components/sprites/ReferenceWorkflow.jsx
@@ -44,7 +44,7 @@ function CandidateTile({ recordId, candidate, locking, onLock, clipRisk }) {
const [confirming, setConfirming] = useState(false);
return (
<div className="bg-port-bg border border-port-border rounded p-1 space-y-1">
- <SpriteImg recordId={recordId} path={candidate.path} className="w-full h-24 object-contain" />
+ <SpriteImg recordId={recordId} path={candidate.path} className="w-full aspect-square object-contain" />
<p className="text-[10px] text-gray-500 truncate" title={candidate.path}>
{candidate.path.split('/').pop()}{candidate.mode ? ` · ${candidate.mode}` : ''}
</p>
@@ -288,8 +288,12 @@ export default function ReferenceWorkflow({ record, reference, renders, correcti
{backfillOptional && <span className="ml-1 text-[10px] text-gray-600 normal-case tracking-normal">· optional</span>}
</h4>
{turnaroundLocked ? (
- <div className="flex items-start gap-3">
- <SpriteImg recordId={recordId} path={manifest.turnaround.path} className="w-48 h-32 object-contain bg-port-bg border border-port-border rounded" />
+ // The sheet is a square PNG (four figures in a 1:1 canvas), so render
+ // it as a large square — a fixed landscape box letterboxed it into a
+ // tiny center strip and wasted the sides. It's the identity root, so
+ // it gets more room than the single-figure anchors below.
+ <div className="flex flex-col sm:flex-row items-start gap-3">
+ <SpriteImg recordId={recordId} path={manifest.turnaround.path} className="w-full max-w-sm aspect-square object-contain bg-port-bg border border-port-border rounded" />
<p className="text-xs text-gray-500 flex items-center gap-1">
<Lock className="w-3 h-3" /> frozen · identity root
</p>
@@ -499,7 +503,7 @@ export default function ReferenceWorkflow({ record, reference, renders, correcti
{anchor.status === 'locked' && <Lock className="w-3 h-3 text-port-success" />}
</p>
{anchor.status === 'locked' ? (
- <SpriteImg recordId={recordId} path={anchor.path} className="w-full h-24 object-contain" />
+ <SpriteImg recordId={recordId} path={anchor.path} className="w-full aspect-square object-contain" />
) : (
<div className="space-y-1.5">
{/* Optional correction guidance re-appended to the prompt on