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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
address review (claude): scrub stale scanner-column wording from the changelog and export doc
[._.]/ Adam Eivy382072a41ddb
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex e95df2a776..d4b4daed50 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -60,7 +60,7 @@- **[issue-2930] Sprites is now its own page, and assets are properly inspectable** — the Sprite Manager was a hidden tab inside Media Gen; it now has its own **Sprites** entry in the Create sidebar and lives at its own address, so it's directly linkable, bookmarkable, and reachable from ⌘K and voice. Old Media Gen sprite links (including links to a specific sprite) redirect to the new page and keep any deep-link state. Every surface that shows a transparent sprite — asset thumbnails, the reference set, walk-loop previews, trim results, and the compiled atlas — now paints a checkerboard behind the artwork, so a cut-out region is finally distinguishable from a black pixel instead of both reading as the same dark rectangle. Clicking any asset opens a real inspector: a pixel-perfect preview over that checkerboard, plus the file's path, dimensions, format, frame count, size, and last-modified time, with Download and Copy-path buttons. Non-image files (manifests, sidecars) open there too instead of silently downloading. An asset PortOS can't read — a truncated PNG, say — now shows its basic details rather than breaking the whole page.- **[issue-2928] Show walk previews for every imported run layout, not just one** — the walk viewer found a character's animation runs by looking in a single fixed folder, so an imported character whose source pipeline filed its runs elsewhere showed the same blank "approved ✓" card that #2924 just fixed for redraw directions. Each approved direction is now looked up by where its own approval record says its run lives, so any layout the importer produces animates. Unapproved candidates and in-flight generations still appear as before.- **[issue-2924] Animate walk directions approved from an imported redraw cycle** — a direction whose approved artwork came from the source pipeline's video-first *redraw* path (rather than a Grok walk clip) showed its "approved ✓" badge with a blank space where the loop preview should be, because there was no walk-run record behind it to render. Those directions now animate from their own packaged cycle: PortOS reads the redraw manifest, prefers its clean transparent strip (falling back to the keyed one), and plays the loop at the cycle's real length and frame rate. The viewer no longer assumes every walk strip is exactly 8 frames, so a 12-frame imported stride plays its full gait instead of being cropped to two thirds; native 8-phase runs are unchanged. A direction whose strip is missing on disk still shows nothing rather than a broken image.-- **[issue-2898] Compile the runtime atlas and publish it to your game (phase 4)** — a finalized walk set can now be compiled into the immutable runtime sprite-sheet (the 10×8 grid of idle, the 8 named gait phases, and a scanner placeholder for all 8 directions, each frame scaled once per direction and pinned to the pivot ground line) and published straight into a managed app's repository. Every compile revalidates the whole evidence chain first — the finalized walk set, every packaged frame, and every locked anchor are checksum-verified — and recompiling the same set is a no-op instead of a new version. Publishing binds a character to a managed app and a repo-relative destination, replaces the atlas atomically, and refuses to clobber a destination that changed outside PortOS since the last publish; an optional code-binding guard verifies (occurrence-counted) that the game source still references the atlas where expected before anything is written. The Sprites tab gains the compile/publish panel with an inline confirmation and a publish history, and sprite walk-run raw frame intermediates are now excluded from backups by default (they regenerate deterministically from the archived source video — the toggle to re-include them is in the Backup tab).+- **[issue-2898] Compile the runtime atlas and publish it to your game (phase 4)** — a finalized walk set can now be compiled into the immutable runtime sprite-sheet (the 9×8 grid of idle and the 8 named gait phases for all 8 directions, each frame scaled once per direction and pinned to the pivot ground line) and published straight into a managed app's repository. Every compile revalidates the whole evidence chain first — the finalized walk set, every packaged frame, and every locked anchor are checksum-verified — and recompiling the same set is a no-op instead of a new version. Publishing binds a character to a managed app and a repo-relative destination, replaces the atlas atomically, and refuses to clobber a destination that changed outside PortOS since the last publish; an optional code-binding guard verifies (occurrence-counted) that the game source still references the atlas where expected before anything is written. The Sprites tab gains the compile/publish panel with an inline confirmation and a publish history, and sprite walk-run raw frame intermediates are now excluded from backups by default (they regenerate deterministically from the archived source video — the toggle to re-include them is in the Backup tab).- **[issue-2897] Animate walk cycles from locked anchors (phase 3)** — each locked directional anchor can now be animated: PortOS asks Grok for exactly one walk-in-place video on the character's key-color matte, then packages it locally and deterministically — no further AI involved — into the canonical 8-phase walk strip (frame extraction, chroma un-key and de-spill keyed to the character's selected key color, automatic walk-cycle detection, fixed-scale pivot alignment, and a light/dark/checker contrast review sheet). Review each direction's loop right in the Sprites tab (animated preview), optionally trim frames non-destructively into a versioned loop GIF, and approve per direction; the eighth approval freezes the finalized walk set, which becomes immutable like the reference set. Every run carries a full provenance manifest with per-frame checksums, matching the format the phase-1 importer already understands.- **[issue-2896] Create characters and build their reference sets with AI (phase 2)** — the Sprites tab can now create a character from a name plus a text description and/or an uploaded design image, generate main-reference candidates through your configured image backend (Codex, Grok, or local), and freeze the approved candidate as the character's immutable identity root. From the frozen main you then derive the 8 directional anchors (front/back/profiles/three-quarters), review each candidate, and lock the set. On lock, PortOS normalizes the art onto a clean key-color square and auto-picks the best chroma key for that character — magenta, green, or blue, whichever sits farthest from the character's own colors (with a manual override limited to the same three keys, and a warning when every key risks clipping). Locked references are server-side immutable: regeneration and replacement are refused, corrections always land as new versions.- **[issue-2895] Media Gen gains a Sprites section (phase 1: library + import)** — a new Sprites tab lists your game-sprite characters and prop atlas families, browses each one's locked reference set, walk-cycle strips, and published atlas versions (with pixel-perfect previews), and imports the approved production assets from an existing sprite-pipeline checkout in one click. Only final/approved artifacts import — rejected candidates and raw video intermediates stay behind — and every file the source manifests hash-pin is verified on the way in. Reachable from ⌘K and voice ("take me to sprites"). Generation (reference → anchors → walk videos → publish-to-game) lands in the follow-up phases.@@ -147,4 +147,4 @@- **Accessibility audit pass: switches, icon-only buttons, focus rings, and the media lightbox** — four hand-rolled toggle switches (CoS Dynamic Avatar, Digital Twin ingestion, scheduled backups, Sharing import mode) were announced as plain unlabeled buttons with no on/off state; they now carry `role="switch"` + `aria-checked` + a name. A dozen icon-only buttons gained accessible names (cron cancel, folder "go up", rapid-reader chunk size, JIRA project clear, writing-sample remove, memory-practice mark correct/incorrect, calendar icon picker) and the process/agent expand carets gained `aria-expanded`. Six inputs that set `focus:outline-none` inside an unstyled wrapper were invisible when focused — their containers now carry `focus-within:border-port-accent`, and four standalone selects/buttons gained a `focus-visible` ring. The Sprites asset preview moved from a click-to-dismiss overlay to the shared `<Modal>` (Esc, focus trap, focus restore), and `MediaLightbox` — which deliberately opts out of `<Modal>` — now supplies its own `role="dialog"`/`aria-modal` and focus trap instead of letting Tab walk out into the page behind it. ~20 unlabeled toolbar controls on the highest-traffic pages (Runner, Review, Wiki, Tribe, Loras, Media History, Media Collections, Prompt Manager) gained labels. A new `client/src/a11yConventions.test.js` guard fails the suite if a new hand-rolled full-screen backdrop or an unlabeled toggle-switch button is introduced; the remaining unlabeled-control backlog is tracked in `PLAN.md`.- **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 + scanner), 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.+- **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.diff --git a/docs/features/sprite-export-contract.md b/docs/features/sprite-export-contract.mdindex 25e0618620..17e2a2c28c 100644--- a/docs/features/sprite-export-contract.md+++ b/docs/features/sprite-export-contract.md@@ -73,7 +73,7 @@ If your app *is* time-driven, pick its own frame rate. Do not read `previewFps`## Frame count is a coordinated cross-repo change-Column layout is the one thing an app genuinely has to agree with PortOS about. Changing `N` shifts every column after `idle` — a game that reads walk columns 1–8 out of a 13-column atlas renders the wrong phases and samples past the end of the walk it thinks it has. No crash, no log.+Column layout is the one thing an app genuinely has to agree with PortOS about. Changing `N` shifts every column after `idle` — a game that reads walk columns 1–8 out of a 13-column atlas renders the wrong phases. And an app built against the pre-#2986 10-column grid that still reads column 9 as `scanner` now samples off the right edge of a recompiled 9-column atlas. No crash, no log.Two mechanisms guard that: