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(changelog): record steps/seed inputs, paragraph-grain Adapt, per-kind analysis storage, text-suppression preset fix, and post-Adapt auto-render queue
Adam Eivy76fb52f71ab5
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex fa3bcaa9b8..0476b1129e 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -2,6 +2,10 @@## Added+- **Writers Room — auto-queue every missing scene image when Adapt completes.** After **Run Adapt** finishes, the storyboard automatically dispatches a render for every scene that doesn't already have an image. Toasts `Queued N scene renders`. Scenes that already have an image (e.g. unchanged scene IDs from a prior pass) are skipped — re-Adapting only queues NEW scenes, not re-renders. The local FLUX image-gen queue serializes the requests server-side so the GPU isn't slammed; cards sit in queued state until the worker picks them up, and each card's existing socket subscription handles its own progress + completion + scene-image attachment. Implementation: `SceneCard` is now `forwardRef` + `useImperativeHandle` exposing `{ generate, canGenerate }`; `StoryboardPanel` collects refs and dispatches via `requestAnimationFrame` on the post-Adapt `latestScript` update. Touched: `client/src/components/writers-room/{SceneCard,StoryboardPanel}.jsx`.++- **Writers Room — Steps + Seed inputs in the storyboard image-gen settings.** The storyboard's settings popover now exposes per-Writers-Room Steps and Seed alongside Image Model + Resolution (organized as two 2-column grids — `[model | resolution]` and `[steps | seed]`). Seed has a Dice5 randomize button matching the Image Gen page. Empty steps = use model default; empty seed = random per render. Both persist in `settings.json` and flow through `generateImage`. Touched: `client/src/components/writers-room/{StoryboardPanel,SceneCard,sceneCardHelpers}.jsx`.+- **Writers Room — per-work world style for image gen.** Each Work now carries an `imageStyle = { presetId, prompt, negativePrompt }` field that gets prepended to every scene's image-gen prompt, keeping the storyboard visually consistent across scenes. Ships with 9 curated presets (cinematic, film noir, cyberpunk neon, Studio Ghibli, Pixar 3D, graphic novel, watercolor storybook, comic book, photorealistic) defined in `server/lib/writersRoomStylePresets.js` — code-shipped reference data, not gitignored, so every install gets the same starting set. Picking a preset fills editable prompt + negative-prompt textareas in the storyboard's existing image-gen settings popover; editing the text flips the discriminator to `'custom'` so the dropdown reflects that the prompt no longer matches the curated text. Style is the FIRST token in the composed prompt because diffusion models weight early tokens heaviest (`{worldStyle}. {workTitle}. Featuring — {chars}. {scene.visualPrompt}`). The `negativePrompt` flows through the existing `generateImage` route and is honored by all three runners (local FLUX, codex, external SDAPI). A `🎨 <preset>` chip appears next to the storyboard's scene-count when a style is active. New endpoint `GET /api/writers-room/style-presets`. Touched: `server/lib/{writersRoomStylePresets.js,validation.js}`, `server/services/writersRoom/local.js`, `server/routes/writersRoom.js`, `client/src/components/writers-room/{StoryboardPanel,SceneCard,sceneCardHelpers,WorkEditor}.jsx`, `client/src/services/apiWritersRoom.js`.- **Writers Room — vertical Storyboard companion + UX cleanup.** The AI/Outline/Versions tabbed sidebar is replaced with an always-on `StoryboardPanel` that shows the latest Adapt analysis as a vertical column of scene cards (heading, slugline, image, summary, character chips, visual prompt). Each card has a per-scene image regenerate button and a "Debug" overflow menu that scopes follow-up tools (Why this image / Check characters / Editorial pass / Jump to prose) to that one scene. Stale banner appears when the active draft's `contentHash` differs from the analysis's `sourceContentHash`, with a one-click re-run. Click a card heading to jump the prose textarea to that scene — falls back to scene-summary substring or scene-index proportional scroll when the LLM heading doesn't match the user's prose verbatim. The header collapses to title + status + Save + Snapshot + a single `(•••)` overflow menu (AI section: Run Adapt / Refresh characters / Editorial pass / Format pass · Open section: Outline / Versions / Characters [badge count] / Analysis history · View section: reading-theme toggle / Write-for-10 toggle). Outline, Versions, Characters, and Analysis history each open as a slide-over `Drawer` instead of competing with the storyboard for sidebar real estate. Mobile (<lg): a Writing/Storyboard segmented toggle replaces the previous stacked layout, fixing the double-scroll problem. The page-level Write-for-10 button moves into the work overflow menu so the Writers Room shell header is now title-only. New files: `StoryboardPanel.jsx`, `SceneCard.jsx`, `CharactersBible.jsx`, `AnalysisHistory.jsx`, `sceneCardHelpers.js`. Removed: `AiPanel.jsx` (decomposed into the above). Touched: `client/src/components/writers-room/WorkEditor.jsx`, `client/src/pages/WritersRoom.jsx`.@@ -12,6 +16,12 @@## Changed+- **Writers Room — Adapt prompt rewritten for paragraph-grain output.** The Adapt stage was producing 8 scenes for a 4,800-word piece because the prompt told the LLM "A scene = one continuous unit of action in one location" + "Don't pad. If the natural arc is 3 scenes, return 3." That's a screenplay rule; wrong for a storyboard companion where dense beat-level cards are the whole point. Reframed "scene" as "one storyboard panel," set an explicit count anchor ("a 4,000-word piece with ~80 paragraphs should yield ~50–80 scenes, not 8"), listed when to SPLIT (default — every substantive paragraph; new visual framing; back-and-forth dialogue) vs MERGE (rare — one-sentence paragraphs depicting the same instant; pure dialogue tags), removed the "don't pad" anti-pattern, and tightened action/visualPrompt budgets since each work now has many more cards. Sluglines may repeat across consecutive same-location scenes. Touched: `data{,sample}/prompts/stages/writers-room-script.md`.++- **Writers Room — analysis storage collapsed from history-of-runs to latest-per-kind.** The Adapt / Evaluate / Format / Characters analyses were each accumulating a fresh `wr-analysis-<uuid>.json` file per run, growing forever. The user only ever cares about the latest of each kind. Analysis id is now just the kind (`script`, `format`, `evaluate`, `characters`); files are `<kind>.json`; re-running a kind atomicWrite-overwrites its previous snapshot. Boot-time `recoverStuckAnalyses` gained a one-time migration that scans for legacy UUID-named files, groups by kind, keeps the latest per kind (by `completedAt|createdAt`), rewrites as `<kind>.json`, and deletes the legacy files. Idempotent. Touched: `server/services/writersRoom/evaluator.js`.++- **Writers Room — graphic novel + comic book presets suppress text/word-balloons.** Fast image models (FLUX.2 Klein, Schnell) render text as garbled gibberish. The `graphic-novel` and `comic-book` presets were inviting it via "sequential art panels" / generic comic-cover language, producing scenes with baked-in title-card text and word balloons. Both presets now drop the multi-panel language, add `single full-bleed image, no text` to the prompt, and aggressively negative-prompt `text, words, letters, lettering, typography, title, logo, word balloon, speech bubble, caption box, sound effect`, plus `onomatopoeia + comic book cover` for comic book. Existing works that already saved an old preset prompt need to re-pick the preset from the dropdown to refresh their stored text; custom-edited prompts are left alone. Touched: `server/lib/writersRoomStylePresets.js`.+## Fixed- **Writers Room mobile prose area squeezed by AI panel.** On mobile/tablet (below `lg`), the editor and AI sidebar stack vertically; the AI sidebar `<aside>` had no flex-grow, so it expanded to its (long) content height — leaving the prose textarea with whatever was left, often only ~150px. Gave the textarea wrapper `flex-[2]` and the AI aside `flex-1` on mobile (both reset at `lg:` where the desktop fixed-width split takes over) so the prose now gets ~2/3 of the available editor height and the AI panel scrolls internally within its 1/3. Touched: `client/src/components/writers-room/WorkEditor.jsx`.