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

docs([issue-3015]): log the per-track animation registry to the changelog

[._.]/ Adam Eivyc9a9503711ef
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 57a9821514..cbfc41a578 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -13,6 +13,7 @@
## Internal
+- **[issue-3015] Per-track animation registry — frame-count/fps bounds stop being walk-shaped** — the authoring range (`6–16` frames, `4–24` fps) was global and defined once in `server/services/sprites/walkBounds.js`, so it described *every* animation as if it were a walk cycle; a 3-frame ambient loop or a 4-frame scanner action sits below walk's floor of 6 and was literally unrepresentable. A new sharp-free leaf, `server/services/sprites/animationTracks.js`, holds one row per known track (`{ id, label, directional, min/max/defaultFrameCount, min/max/defaultFps, contractFrameCountField, contractFpsField }`), with `walk` as its only row carrying today's exact values. `walkBounds.js` keeps every historical export as a thin re-read of that row, so `walkPostprocess`, `atlas`, `walk`, `server/lib/validation.js`, and the client mirror need no changes. `resolveAnimationTarget` / `targetDrift` / `withTrackTarget` now range-check against the *named track's* row (and read the app rung through the field names that row declares, instead of hard-coded `walkFrameCount`), and the Zod ranges are built by `spriteTrackFrameCountSchema(track)` / `spriteTrackFpsSchema(track)` factories with a `spriteAnimationTrackSchema` that rejects an unknown id by name. An absent track resolves to `walk` — which is what keeps every existing call site identical — while an *unrecognized* one throws rather than silently validating against walk's range. #2985's invariant is preserved: an unrecognized sibling track key still round-trips untouched on write, even though writing to an unknown track is now refused. Pure refactor — walk behaves identically end to end; no second track is added here.
- **[issue-3001] Approving and compiling a walk direction now agree on what "valid packaged frames" means** — the check that a direction's per-frame images are all present was written twice: the cheap gate that runs when you *approve* a direction only checked the files existed (and, for an imported character, could silently drop a frame whose path it couldn't re-anchor — understating the count in its own error), while the stricter gate that runs when you *compile* the atlas also verified each frame's checksum and gait-phase order. So a direction could pass approval and then fail compile for a frame reason the approve step was meant to catch. Both now call one shared `verifyPackagedFrames` helper: approve runs its existence-only prefix (resolving imported frame paths the same drift-tolerant way the clip and strip checks beside it already do, and counting an un-re-anchorable path as a failure instead of dropping it), and compile runs the same resolution plus the checksum/order checks — reading each frame's bytes exactly once. The approve gate is now a strict prefix of the compile gate, so the two can no longer disagree.
- **Shared `ui/FilePickerButton` + two hygiene guards for file pickers** — 28 call sites across the client hand-rolled the same hidden-`<input type="file">` idiom; they now share `client/src/components/ui/FilePickerButton.jsx` (sr-only-but-focusable input + native `<label for>` activation, extra props spread onto the label so a drop zone can pass `onDrop`/`onDragOver` and a forwarded ref, and an async-aware value clear that waits for the handler to settle before emptying `input.files`). Because the failure only reproduces in WebKit-as-installed-PWA — invisible to lint, CI, and local testing — `a11yConventions.test.js` gains two cases mirroring the existing `crypto.randomUUID` lint precedent: no `type="file"` input may carry `hidden`/`aria-hidden`/`tabIndex={-1}`, and no `.current.click()` may appear in a tracked `.jsx`.
- **`server/lib/uploadLimits.js` is the single source of truth for upload size caps** — `express.json`'s limit lived as a bare `'55mb'` literal in `server/index.js` while four routes each re-derived their own byte cap against it, two of them landing on unreachable values (100MB, 50MB). The limit and the base64-derived file cap now live in one module (mirroring the `lib/ports.js` pattern), consumed by `index.js` and every upload route; `uploadLimits.test.js` asserts the derivation actually fits, that no route re-hardcodes a cap, and that the client mirror in `utils/fileUpload.js` agrees.