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
Merge pull request #673 from atomantic/claim/extract-use-universe-load-hook
[._.]/ Adam Eivy6b132ffa5950
diff --cc PLAN.mdindex 44c6b256ff,eee73d35c4..5ad0943bdb--- a/PLAN.md+++ b/PLAN.md@@@ -25,8 -25,8 +25,7 @@@ Claimable, well-specified, no decision- [ ] [hidream-requires-hf-token-fail-fast] **Probe HF token upfront for HiDream gated-encoder downloads.** `data.reference/media-models.json`'s HiDream entries carry `requiresHfToken: true`, but `scripts/z_image_turbo.py` `load_external_text_encoder()` does NOT call `probe_hf_auth()` the way `flux2_macos.py:265` does. A user without a valid HF token currently sees a multi-GB download attempt that fails with a 401 deep inside transformers. Mirror the FLUX.2 probe before invoking `transformers.from_pretrained()` on the gated encoder repo.- [ ] [flux2-runner-sidecar-tests] **Test coverage for `generateImage`'s sidecar `meta` payload.** `server/services/imageGen/local.test.js` exercises `buildArgs` but never asserts on the sidecar `meta` object built inside `generateImage` — including the `referenceImageFilenames` + `referenceImageStrengths` fields. A focused test would need to either factor the meta-builder out of `generateImage` so it's callable without spawning Python, or stub the spawn + assert on the persisted sidecar JSON.- [ ] [manuscript-review-sync] **Wire the manuscript-review comment set into cross-install sync.** `data/pipeline-series/{id}/manuscript-review.json` is written as a sibling of the series record but is NOT carried by `exportSeries`/`importSeries` or the peer-sync path. `manuscriptReview.mergeReviewFromSync(seriesId, remoteReview)` (LWW-per-comment) already exists; what's missing is (a) including the review document in the series export bundle, (b) a wire-schema-version gate in `server/lib/schemaVersions.js`, and (c) calling `mergeReviewFromSync` on the receiving side. Accepted *fixes* already sync (they write to issue stage outputs); only the comment list/status/dismissals don't propagate yet.- - [ ] [extract-use-universe-load-hook] **Extract a `useUniverse(universeId)` load hook.** `client/src/components/pipeline/stages/StoryboardsStage.jsx` (~line 57) and `NounsStage.jsx` (~line 149) now run a byte-identical `useMounted` + `let cancelled` + `getUniverse(series.universeId).then(...).catch(...)` effect to load the linked universe record. Extract a `client/src/hooks/useUniverse.js` returning `[universe, loading, error]` (handling the mount/cancel guards internally), register it in the hooks `index.js` barrel + README, and migrate both call sites. Deferred from the wardrobe-picking PR: migrating `NounsStage` is outside that diff's scope and the new module trips the barrel maintenance rule. Surfaced by /simplify (reuse, 2026-06-01).- [ ] [series-llm-override-resolution-helper] **Extract the series-LLM override resolution into one shared helper.** The `providerMatchesSeries`-guarded provider/model resolution (`provider = override || series.llm?.provider`; only inherit `series.llm?.model` when the effective provider still matches the series provider) is now inlined in three routes in `server/routes/pipeline.js`: extract-canon (~line 1855, body field `body.model`), extract-scenes (~line 1705, inlines only the boolean as `sceneProviderMatchesSeries` and folds the rest into the `extractScenes` call), and season-episodes-generate (~line 1284, body field `body.modelOverride`). Extract a pure `resolveSeriesLlmOverride(series, { overrideProvider, overrideModel })` returning `{ provider, model, providerMatchesSeries }` into `server/lib/` (new module → register in the `index.js` barrel + README per the maintenance rule), and migrate all three call sites (each maps its own body field name). Deferred from the season-continuity-extract-honors-series-llm PR: the body-field-name + variable-name skew across sites means a careful lift, it touches two proven live routes + their tests, and the new lib module trips the barrel rule — its own PR. Surfaced by /simplify (reuse + altitude, 2026-06-02).-- [ ] [create-issue-preload-series-for-batch] **`createIssue`'s renumber pass re-reads the series on every call — preload it for batch episode seeding.** `createIssue` (`server/services/pipeline/issues.js`) calls `getSeries()` inside its `renumberInline` pass on every invocation. `commitEpisodesToIssues` (`server/services/pipeline/arcPlanner.js`) creates one issue per episode in a loop, so a 12-episode season does 12 redundant `getSeries()` reads of an unchanging record (and `generateIssuesFromArc` already fetched it once). Add a `createIssueWithPreloadedSeries(series, input)` variant (or a `{ preloadedSeries }` option) that threads the already-fetched series into `renumberInline`, and route the batch loop through it. Pre-existing in `createIssue` (the Pipeline season-episodes route pays the same cost); LLM-bound batch so the realized win is small — surfaced by /simplify (efficiency) during the story-builder-issue-llm-seeding PR (2026-06-01). Deferred because it touches the `issues.js` renumber internals beyond this diff's scope.## Blocked / Deferred (skip for `/claim`)