[PR #4121] [MERGED] feat: extract Storyboard agent and expand World Maps integration #6240

Closed
opened 2026-10-23 04:08:30 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4121
Author: @thetopham
Created: 7/26/2026
Status: ✅ Merged
Merged: 7/29/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feature/storyboard-agent


📝 Commits (10+)

  • f1e688c feat(storyboard): add installable agent host integration
  • 9fd1294 Merge PR #4112 location reference support
  • 710d777 feat(storyboard): centralize settings in agent package
  • 6841bac fix(agents): allow host-managed package details
  • 968d53e feat(storyboard): add per-chat agent overrides
  • a2f5e9d fix(storyboard): merge game visual settings
  • beff6d3 Merge remote-tracking branch 'origin/staging' into feature/storyboard-agent
  • 2297fc7 fix(storyboard): restore numeric agent defaults
  • 4f7e3b9 fix(maps): refresh location after narrated moves
  • fc6075e fix(storyboard): clarify prompt defaults and budget

📊 Changes

68 files changed (+5799 additions, -3713 deletions)

View changed files

➕ .github/plans/storyboard-agent-extraction.md (+175 -0)
📝 README.md (+1 -1)
📝 docs/agents/agents-overview.md (+3 -3)
📝 docs/agents/built-in-agents.md (+2 -2)
📝 docs/agents/hierarchical-maps.md (+29 -26)
📝 e2e/core-flows.e2e.ts (+68 -14)
📝 packages/client/src/components/agents/AgentEditor.tsx (+533 -189)
➕ packages/client/src/components/agents/StoryboardAgentSettingsPanel.tsx (+443 -0)
➕ packages/client/src/components/chat/AgentSettingsControls.tsx (+398 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+39 -985)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+215 -69)
➕ packages/client/src/components/chat/StoryboardChatSettingsPanel.tsx (+515 -0)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+201 -225)
➕ packages/client/src/components/game/GameStoryboardViewer.tsx (+313 -0)
📝 packages/client/src/components/game/GameSurface.tsx (+539 -740)
➕ packages/client/src/components/game/GameVolumeMixer.tsx (+134 -0)
➕ packages/client/src/components/game/game-storyboard-ui.ts (+180 -0)
📝 packages/client/src/components/layout/AppShell.tsx (+2 -0)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+0 -2)
📝 packages/client/src/hooks/use-game.ts (+2 -0)

...and 48 more files

📄 Description

Linked issue

Closes #4113

Related package PR: Pasta-Devs/Marinara-Agents#108

This branch now includes canonical staging through 66fd75e2b, including the official #4112 merge, so Storyboard's Insert location path and the updated Hierarchical Maps Agent Editor remain intact.

Why this change

  • Storyboard planners and provider-specific prompt libraries were embedded in Game/Chat settings, pushing large client modules over Babel's 500 kB warning threshold.
  • Moving Storyboard into the single global generation prompt override would collapse distinct still, animation, image-formatter, and video-formatter presets into one prompt.
  • The extraction must preserve staging's merged Game visual-settings UI. Illustrator and Storyboard share the same per-chat render pipeline, while the downloadable Storyboard Agent owns reusable defaults and prompt-template bodies.

What changed

  • Add a host-managed Storyboard agent and shared settings normalization.
  • Keep separate still and animation chains, including the animation first-frame illustration stage.
  • Store every planner, illustration formatter, video formatter, selection default, and provider-specific template body in Agents → Storyboard Settings.
  • Keep Storyboard inside the existing Game Illustrator card rather than adding a second top-level settings card.
  • Restore staging's independent Automatic Storyboard Illustrations and Automatic Storyboard Animations toggles.
  • Keep keyframes-per-turn, viewer display, NovelAI character handling, still/animation planner selections, Use Storyboard Template, and final image/video prompt selections as per-chat controls.
  • Restore animation clip duration as an editable seconds field with bounded validation and an Agent-default reset.
  • Make numeric Agent-default resets treat metadata tombstones as inheritance, so keyframes return to 3 and clip duration returns to 6 instead of displaying the minimum value.
  • Use the shared per-chat Game scene, image, and video connections for Storyboard, with Storyboard Agent connection defaults as fallbacks.
  • Use the single shared Attach Card Appearance and Send Avatar References controls for Game Illustrator and Storyboard. Remove the hidden Storyboard-only connection and reference override fields introduced by the first extraction draft.
  • Preserve package-owned global appearance/reference defaults for chats that do not define shared Game overrides.
  • Reduce Engine's built-in Storyboard prompt modules to compatibility contracts and IDs rather than package prompt bodies.
  • Preserve legacy setup imports by converting the former Storyboard Game Prompt selection into an explicit custom Game prompt.
  • Integrate location reference-image handling from #4112, including the Insert location flow and final formatter location instructions.
  • Keep GameSurface.tsx, ChatSettingsDrawer.tsx, and Storyboard settings split into lazy modules so no source module crosses Babel's 500 kB warning threshold.
  • Update prompt/routing regression coverage and the focused browser test for the merged Illustrator/Storyboard hierarchy.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Verification notes

Automated and local runtime evidence:

  • pnpm lint passes for shared, server, and client.
  • pnpm localization:check passes.
  • pnpm regression:prompt passes, including package ownership, merged connection/reference precedence, planner selection, and manual Game Illustrator controls.
  • Focused desktop Playwright coverage for the merged Illustrator/Storyboard card passes, including the single appearance/reference controls, independent automation toggles, editable duration field, and numeric override resets back to the 3-keyframe and 6-second Agent defaults.
  • pnpm version:check passes for 2.3.5.
  • pnpm build passes at Engine head 2297fc723.
  • ChatSettingsDrawer.tsx is 499,079 bytes and does not trigger Babel's 500 kB source warning.
  • The production build emits Storyboard chat settings as a separate 14,251-byte lazy chunk.
  • The local service is healthy at 2.3.5+2297fc7238f7; Storyboard 1.0.0 and Hierarchical Maps 1.2.0 are both active and ready.
  • pnpm check still stops at the known repository guard, Impeccable context loader did not return valid JSON. Direct lint, localization, regression, browser, version, and production-build validation are listed separately.

Manual browser verification still required:

  • Manually verify the merged Game Illustrator/Storyboard hierarchy in light and dark themes and a mobile viewport.
  • Manually verify the shared scene/image/video connection and appearance/reference controls affect both Game Illustrator and Storyboard generation.
  • Manually verify each still planner, animation planner, image formatter, and video formatter can be selected per chat while template bodies remain editable only in Storyboard Agent Settings.
  • Manually verify automatic still and animation generation, retry, viewer, mute, typed duration, and keyframe-count controls.
  • Manually verify Insert location uses the selected map location as the first Storyboard reference.
  • Manually verify uninstalling or disabling Storyboard prevents Storyboard generation without changing Illustrator or Maps.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

No screenshots committed. Manual browser evidence remains listed above.

Summary by CodeRabbit

  • New Features
    • Added storyboard agent configuration in the agent editor and chat settings (planner templates, image/video connections, auto-generate, keyframes/animation duration, viewer display).
    • Added an in-game storyboard viewer with draggable/resizable controls plus a background option, and introduced a floating volume mixer.
    • Expanded world map setup to support standard vs world-map mode, and updated gallery image generation with a new batch preview/compilation flow.
  • Bug Fixes
    • Improved spatial map recovery/reconciliation after interruptions and refined storyboard prompt/template handling.
  • Documentation
    • Updated “Hierarchical Maps” branding and related UI text to “World Maps.”

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4121 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/26/2026 **Status:** ✅ Merged **Merged:** 7/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feature/storyboard-agent` --- ### 📝 Commits (10+) - [`f1e688c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f1e688c123ce541bd92ba9a33a89fa4e2730896f) feat(storyboard): add installable agent host integration - [`9fd1294`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9fd1294551ff209ae96be6d47207a06b6625c8de) Merge PR #4112 location reference support - [`710d777`](https://github.com/Pasta-Devs/Marinara-Engine/commit/710d77747d5db5636e190662bc5801535cfda24b) feat(storyboard): centralize settings in agent package - [`6841bac`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6841bac292833c3c41b956c94ea448a6420e2fcc) fix(agents): allow host-managed package details - [`968d53e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/968d53edbebe28ba479383b636a3f8268d9c556c) feat(storyboard): add per-chat agent overrides - [`a2f5e9d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a2f5e9d52dc5f18e1c7e809856192c94d0e35629) fix(storyboard): merge game visual settings - [`beff6d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/beff6d36efbdf94d28cc27c2f42853b5faa07a37) Merge remote-tracking branch 'origin/staging' into feature/storyboard-agent - [`2297fc7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2297fc7238f77922a13e9022a49f0d08dc3d5f8b) fix(storyboard): restore numeric agent defaults - [`4f7e3b9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4f7e3b9987a933569f097c9662542a493090c620) fix(maps): refresh location after narrated moves - [`fc6075e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fc6075e13b97ee3ceb8b9f7c2dd7c5a4282db6d8) fix(storyboard): clarify prompt defaults and budget ### 📊 Changes **68 files changed** (+5799 additions, -3713 deletions) <details> <summary>View changed files</summary> ➕ `.github/plans/storyboard-agent-extraction.md` (+175 -0) 📝 `README.md` (+1 -1) 📝 `docs/agents/agents-overview.md` (+3 -3) 📝 `docs/agents/built-in-agents.md` (+2 -2) 📝 `docs/agents/hierarchical-maps.md` (+29 -26) 📝 `e2e/core-flows.e2e.ts` (+68 -14) 📝 `packages/client/src/components/agents/AgentEditor.tsx` (+533 -189) ➕ `packages/client/src/components/agents/StoryboardAgentSettingsPanel.tsx` (+443 -0) ➕ `packages/client/src/components/chat/AgentSettingsControls.tsx` (+398 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+39 -985) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+215 -69) ➕ `packages/client/src/components/chat/StoryboardChatSettingsPanel.tsx` (+515 -0) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+201 -225) ➕ `packages/client/src/components/game/GameStoryboardViewer.tsx` (+313 -0) 📝 `packages/client/src/components/game/GameSurface.tsx` (+539 -740) ➕ `packages/client/src/components/game/GameVolumeMixer.tsx` (+134 -0) ➕ `packages/client/src/components/game/game-storyboard-ui.ts` (+180 -0) 📝 `packages/client/src/components/layout/AppShell.tsx` (+2 -0) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+0 -2) 📝 `packages/client/src/hooks/use-game.ts` (+2 -0) _...and 48 more files_ </details> ### 📄 Description ## Linked issue Closes #4113 Related package PR: [Pasta-Devs/Marinara-Agents#108](https://github.com/Pasta-Devs/Marinara-Agents/pull/108) This branch now includes canonical staging through `66fd75e2b`, including the official #4112 merge, so Storyboard's **Insert location** path and the updated Hierarchical Maps Agent Editor remain intact. ## Why this change - Storyboard planners and provider-specific prompt libraries were embedded in Game/Chat settings, pushing large client modules over Babel's 500 kB warning threshold. - Moving Storyboard into the single global generation prompt override would collapse distinct still, animation, image-formatter, and video-formatter presets into one prompt. - The extraction must preserve staging's merged Game visual-settings UI. Illustrator and Storyboard share the same per-chat render pipeline, while the downloadable Storyboard Agent owns reusable defaults and prompt-template bodies. ## What changed - Add a host-managed Storyboard agent and shared settings normalization. - Keep separate still and animation chains, including the animation first-frame illustration stage. - Store every planner, illustration formatter, video formatter, selection default, and provider-specific template body in **Agents → Storyboard Settings**. - Keep Storyboard inside the existing Game **Illustrator** card rather than adding a second top-level settings card. - Restore staging's independent **Automatic Storyboard Illustrations** and **Automatic Storyboard Animations** toggles. - Keep keyframes-per-turn, viewer display, NovelAI character handling, still/animation planner selections, **Use Storyboard Template**, and final image/video prompt selections as per-chat controls. - Restore animation clip duration as an editable seconds field with bounded validation and an Agent-default reset. - Make numeric Agent-default resets treat metadata tombstones as inheritance, so keyframes return to 3 and clip duration returns to 6 instead of displaying the minimum value. - Use the shared per-chat Game scene, image, and video connections for Storyboard, with Storyboard Agent connection defaults as fallbacks. - Use the single shared **Attach Card Appearance** and **Send Avatar References** controls for Game Illustrator and Storyboard. Remove the hidden Storyboard-only connection and reference override fields introduced by the first extraction draft. - Preserve package-owned global appearance/reference defaults for chats that do not define shared Game overrides. - Reduce Engine's built-in Storyboard prompt modules to compatibility contracts and IDs rather than package prompt bodies. - Preserve legacy setup imports by converting the former Storyboard Game Prompt selection into an explicit custom Game prompt. - Integrate location reference-image handling from #4112, including the **Insert location** flow and final formatter location instructions. - Keep `GameSurface.tsx`, `ChatSettingsDrawer.tsx`, and Storyboard settings split into lazy modules so no source module crosses Babel's 500 kB warning threshold. - Update prompt/routing regression coverage and the focused browser test for the merged Illustrator/Storyboard hierarchy. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Verification notes Automated and local runtime evidence: - `pnpm lint` passes for shared, server, and client. - `pnpm localization:check` passes. - `pnpm regression:prompt` passes, including package ownership, merged connection/reference precedence, planner selection, and manual Game Illustrator controls. - Focused desktop Playwright coverage for the merged Illustrator/Storyboard card passes, including the single appearance/reference controls, independent automation toggles, editable duration field, and numeric override resets back to the 3-keyframe and 6-second Agent defaults. - `pnpm version:check` passes for 2.3.5. - `pnpm build` passes at Engine head `2297fc723`. - `ChatSettingsDrawer.tsx` is 499,079 bytes and does not trigger Babel's 500 kB source warning. - The production build emits Storyboard chat settings as a separate 14,251-byte lazy chunk. - The local service is healthy at `2.3.5+2297fc7238f7`; Storyboard 1.0.0 and Hierarchical Maps 1.2.0 are both `active` and `ready`. - `pnpm check` still stops at the known repository guard, `Impeccable context loader did not return valid JSON.` Direct lint, localization, regression, browser, version, and production-build validation are listed separately. Manual browser verification still required: - Manually verify the merged Game Illustrator/Storyboard hierarchy in light and dark themes and a mobile viewport. - Manually verify the shared scene/image/video connection and appearance/reference controls affect both Game Illustrator and Storyboard generation. - Manually verify each still planner, animation planner, image formatter, and video formatter can be selected per chat while template bodies remain editable only in Storyboard Agent Settings. - Manually verify automatic still and animation generation, retry, viewer, mute, typed duration, and keyframe-count controls. - Manually verify **Insert location** uses the selected map location as the first Storyboard reference. - Manually verify uninstalling or disabling Storyboard prevents Storyboard generation without changing Illustrator or Maps. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) No screenshots committed. Manual browser evidence remains listed above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added storyboard agent configuration in the agent editor and chat settings (planner templates, image/video connections, auto-generate, keyframes/animation duration, viewer display). * Added an in-game storyboard viewer with draggable/resizable controls plus a background option, and introduced a floating volume mixer. * Expanded world map setup to support standard vs world-map mode, and updated gallery image generation with a new batch preview/compilation flow. * **Bug Fixes** * Improved spatial map recovery/reconciliation after interruptions and refined storyboard prompt/template handling. * **Documentation** * Updated “Hierarchical Maps” branding and related UI text to “World Maps.” <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:08:30 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6240
No description provided.