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
docs([story-builder-import-commit-ok-session-fail]): capture deferred post-commit session-fail edge from PR #677 review
[._.]/ Adam Eivy395ee4827b50
diff --git a/PLAN.md b/PLAN.mdindex 20a0af43a5..bec089ee25 100644--- a/PLAN.md+++ b/PLAN.md@@ -6,6 +6,7 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changelClaimable, well-specified, no decision needed — `/claim`-able. Unordered.+- [ ] [story-builder-import-commit-ok-session-fail] **A successful import commit followed by a failed `createStorySession` can still duplicate issues on re-click.** `ImportPanel.importAndBuild` (`client/src/pages/StoryBuilder.jsx` ~line 225) now handles the *issue-loop* partial-commit (issues rolled back → `arcAlreadyPersisted` retry sends issues-only). But there's a later edge: if `commitImport` *succeeds* (issues created, `arcAlreadyPersisted` reset to false at ~line 264) and then `createStorySession` *fails*, the panel stays mounted with `preview` set; re-clicking re-runs the FULL `commitImport`, re-creating the already-created issues and overwriting the arc. This is StoryBuilder-specific (Importer.jsx has no session-creation step) and not a regression (pre-PR code duplicated on any re-click). Fix: after a successful commit, track `committedSeriesId`/`committedUniverseId` (or a `committed` flag) and on a subsequent click skip `commitImport` entirely, resuming at `createStorySession` — so a session-creation failure retries only the session, never re-commits. Deferred from the partial-commit PR (#677): distinct failure path needing its own committed-state machine; flagged LOW non-blocking by the claude review.- [ ] [arccanvas-sync-shared-hook] **Cleanup: extract the ArcCanvas host-wiring into a shared hook.** `client/src/pages/PipelineSeries.jsx` and `client/src/pages/StoryBuilder.jsx` (the `StoryBuilderDetail` wiring added by `story-builder-embed-arccanvas`) both hand-roll the same `lastSavedRef` + `updateSeriesFromServer` + `handleIssuesUpdate` + `flushPending` contract ArcCanvas expects. The two `flushPending` field-sets diverge (PipelineSeries flushes 10 bible fields + cover/style overrides; StoryBuilder only 6 and treats it as a near-no-op), and PipelineSeries also carries `patchSeries`/`handleSave`. Extract `useArcCanvasSync({ series, setSeries, setIssues, flushFields })` → `{ updateSeriesFromServer, handleIssuesUpdate, flushPending }` in `client/src/hooks/` and migrate both callers. Deferred from the embed PR because it's a 2-file refactor (touches PipelineSeries) with its own review surface.- [ ] [story-builder-extract-image-render-hook] **Cleanup: the image-render lifecycle is duplicated 5×.** `StepCharacters` (StoryBuilder.jsx) + `StyleProbeImage.jsx` each re-implement `getSettings → readPipelineImageSettings → imageCfg` + a single-render jobId lifecycle, and `StepCharacters` near-verbatim copies `UniverseCanonSection`'s styled-render-and-persist routine. Extract a `useImageRenderSettings()` + `useSingleImageRender({ buildPrompt, onComplete })` hook and a shared canon styled-render helper. Also: `ProviderModelPicker` (StoryBuilder.jsx) duplicates the Importer's `LlmPicker` + `SeriesLlmPicker`/`FeatureProviderPicker`/`StagePromptModelPicker` — promote one shared provider/model picker.- [ ] [story-builder-refine-returns-provider] **`refineStep('readerMap')` drops `providerId`/`model` from the conductor's return.** Every other refine branch surfaces them so the route/UI can show which model ran; the readerMap branch destructures `runId` only. Two-line fix (local-review SC-6, 2026-05-27).