[PR #4326] [MERGED] feat: add Storyboards to Roleplay #6335

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

📋 Pull Request Information

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

Base: staging ← Head: agent/4311-roleplay-storyboards


📝 Commits (10+)

  • 51b185a docs: plan Roleplay storyboard episodes
  • 694cc90 feat: add Roleplay storyboard episodes
  • 92042a6 fix: narrow storyboard generation results
  • acda71f Merge branch 'staging' into agent/4311-roleplay-storyboards
  • 1991bd5 fix: address roleplay storyboard review findings
  • 5663123 fix: honor chat storyboard overrides
  • 8eab145 Merge branch 'staging' into agent/4311-roleplay-storyboards
  • ecc5470 fix: prevent duplicate roleplay foreground media
  • 3eb9ec1 fix: show Storyboard in agent menu shortcuts
  • 4667f93 fix: order Storyboard agent shortcut

📊 Changes

30 files changed (+2337 additions, -147 deletions)

View changed files

➕ .github/plans/storyboard-roleplay-episodes.md (+113 -0)
📝 README.md (+2 -2)
📝 docs/FAQ.md (+4 -4)
📝 docs/TROUBLESHOOTING.md (+6 -5)
📝 docs/game/storyboard.md (+30 -3)
📝 docs/media/scene-backgrounds.md (+1 -1)
📝 docs/prompts/prompt-overrides.md (+1 -1)
📝 packages/client/src/components/agents/AgentEditor.tsx (+25 -4)
📝 packages/client/src/components/agents/StoryboardAgentSettingsPanel.tsx (+185 -3)
📝 packages/client/src/components/chat/ChatCommonOverlays.tsx (+1 -1)
📝 packages/client/src/components/chat/ChatGalleryDrawer.tsx (+1 -1)
📝 packages/client/src/components/chat/ChatMessage.tsx (+60 -1)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+132 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+31 -2)
➕ packages/client/src/components/chat/RoleplayStoryboardMessageMedia.tsx (+154 -0)
📝 packages/client/src/components/chat/StoryboardChatSettingsPanel.tsx (+357 -2)
📝 packages/client/src/components/game/GameSurface.tsx (+2 -1)
📝 packages/client/src/hooks/use-game-storyboards.ts (+23 -2)
📝 packages/client/src/localization/locales/en.json (+40 -2)
📝 packages/server/src/routes/game.routes.ts (+302 -93)

...and 10 more files

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #4311

Paired package work: Pasta-Devs/Marinara-Agents#144 and Pasta-Devs/Marinara-Agents#147

Related isolated Gallery animation work: #4325

Why this change

  • Storyboards were optimized for Game Mode, while Roleplay had Illustrator images and manual Gallery animation but no storyboard episode workflow.
  • Roleplay needs configurable message cadence, inline media, and motion-aware planning without rewriting the established Game Storyboard prompts or changing Illustrator behavior.
  • The earlier feature-creep implementation mixed Game and Roleplay prompt contracts. This replacement keeps their planning libraries separate and reuses only the provider-facing image/video formatter stages.

What changed

  • Added host-managed Roleplay Storyboard generation to the existing Storyboard storage and media pipeline.
  • Added bounded Roleplay episode selection from completed user/assistant messages, automatic cadence after every N assistant responses (default 1), no page-load backfill, duplicate protection, and successful-run cadence anchoring.
  • Added manual Create storyboard generation from the Gallery and automatic Manual only, Still images, and Animations modes.
  • Added inline Roleplay keyframe/image/video playback after the assistant response that ends the episode, including progressive render state, failure state, frame navigation, and image lightbox support.
  • Added Roleplay chat settings for cadence, keyframes, duration, connections, prompt layers, appearance/avatar behavior, NovelAI character prompts, and provider formatters.
  • Added separate editable Roleplay episode, visual-style, animation, and output prompt libraries to global Agents > Storyboard settings. Existing Game planner prompts remain unchanged.
  • Kept animation directions provider-neutral: the illustration is the exact T=0 frame, followed by simple action, camera behavior, environment motion, source-supported dialogue/SFX/ambience, and an ending hold. Any configured image-to-video connection can be selected, including Gemini Omni or LTX/ComfyUI where supported.
  • Added focused prompt/cadence regressions, localization, and English documentation.

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

Automated evidence gathered:

  • GitHub container-build-test and pnpm-validate passed on 92042a681.
  • corepack pnpm@10.33.2 regression:prompt passed, including the new Roleplay episode and prompt-layer regressions.
  • corepack pnpm@10.33.2 localization:check passed.
  • corepack pnpm@10.33.2 lint passed for shared, server, and client.
  • corepack pnpm@10.33.2 build passed; the client build also passed independently.
  • git diff --check passed.
  • Existing Game prompt definitions were compared against the staging package and remain unchanged.
  • corepack pnpm@10.33.2 check stops before lint/build at the repository guard: Impeccable context loader did not return valid JSON; the direct checks above were run separately.
  • corepack pnpm@10.33.2 smoke:ui could not launch because this replacement PC does not have Playwright's Chromium executable installed. All 254 tests stopped at browserType.launch before application assertions.

Manual verification notes

  • Manually verify interval 1 produces an inline Storyboard after a newly completed assistant response.
  • Manually verify a larger interval combines only messages since the previous successful Storyboard.
  • Manually verify opening an existing Roleplay chat does not backfill old messages.
  • Manually verify still and animated inline Storyboards on desktop and mobile, including partial/failure states.
  • Manually verify Gallery Create storyboard works in Roleplay and does not require Illustrator.
  • Manually verify Gemini Omni and LTX/ComfyUI image-to-video connections receive the selected provider formatter and reference image.
  • Manually verify existing Game Storyboard generation, prompts, and viewers remain unchanged.
  • Manually verify Illustrator is unaffected with Storyboard enabled and disabled.
  • Check light/dark themes, mobile layout, localization fallback, restart persistence, and agent uninstall behavior.

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] <paths> follow-up issue opened (see CONTRIBUTING.md § Translated documentation)

  • Version/release files updated (only if this PR includes a version bump)

  • English Storyboard documentation and cross-references were updated.

  • Translation follow-up: #4328.

  • No Engine version bump is included.

UI evidence (if applicable)

Manual desktop/mobile screenshots remain to be added after provider-backed verification.

Summary by CodeRabbit

  • New Features
    • Added inline Roleplay storyboard episodes with manual or automatic generation.
    • Added configurable cadence, keyframes, animation, connections, character options, and prompt layers.
    • Roleplay storyboard media now appears in chat with frame navigation, loading states, and lightbox viewing.
    • Added separate Game and Roleplay settings and prompt libraries.
    • Storyboards can be rendered in chat and accessed through the Gallery.
  • Documentation
    • Updated guides, FAQs, troubleshooting, and feature descriptions.
  • Bug Fixes
    • Improved handling of skipped or incomplete generation.

🔄 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/4326 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/31/2026 **Status:** ✅ Merged **Merged:** 7/31/2026 **Merged by:** [@thetopham](https://github.com/thetopham) **Base:** `staging` ← **Head:** `agent/4311-roleplay-storyboards` --- ### 📝 Commits (10+) - [`51b185a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/51b185a87246dbc8e8e835a1a7050b60ba96d614) docs: plan Roleplay storyboard episodes - [`694cc90`](https://github.com/Pasta-Devs/Marinara-Engine/commit/694cc905a28d7389873da329ed968751c03dc1f1) feat: add Roleplay storyboard episodes - [`92042a6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/92042a68176e980f514e0359262c8d2c9fee13c3) fix: narrow storyboard generation results - [`acda71f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/acda71fea386ffd97b7fa996d0f202a755272731) Merge branch 'staging' into agent/4311-roleplay-storyboards - [`1991bd5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1991bd5145ca96bd9bcf8625be27f942f71b3748) fix: address roleplay storyboard review findings - [`5663123`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5663123cccc2ed804813cf45c6d99afc019fd9f5) fix: honor chat storyboard overrides - [`8eab145`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8eab145ec515ab5ba1e637e17fe9729a663168f3) Merge branch 'staging' into agent/4311-roleplay-storyboards - [`ecc5470`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ecc54703c255d2a585a950e926ea326ba26a310f) fix: prevent duplicate roleplay foreground media - [`3eb9ec1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3eb9ec1a0a9c561da12e8395bd7ae7eeb1bd0b28) fix: show Storyboard in agent menu shortcuts - [`4667f93`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4667f939b9b5d85ff23c2da386e6d7d75dbd664e) fix: order Storyboard agent shortcut ### 📊 Changes **30 files changed** (+2337 additions, -147 deletions) <details> <summary>View changed files</summary> ➕ `.github/plans/storyboard-roleplay-episodes.md` (+113 -0) 📝 `README.md` (+2 -2) 📝 `docs/FAQ.md` (+4 -4) 📝 `docs/TROUBLESHOOTING.md` (+6 -5) 📝 `docs/game/storyboard.md` (+30 -3) 📝 `docs/media/scene-backgrounds.md` (+1 -1) 📝 `docs/prompts/prompt-overrides.md` (+1 -1) 📝 `packages/client/src/components/agents/AgentEditor.tsx` (+25 -4) 📝 `packages/client/src/components/agents/StoryboardAgentSettingsPanel.tsx` (+185 -3) 📝 `packages/client/src/components/chat/ChatCommonOverlays.tsx` (+1 -1) 📝 `packages/client/src/components/chat/ChatGalleryDrawer.tsx` (+1 -1) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+60 -1) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+132 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+31 -2) ➕ `packages/client/src/components/chat/RoleplayStoryboardMessageMedia.tsx` (+154 -0) 📝 `packages/client/src/components/chat/StoryboardChatSettingsPanel.tsx` (+357 -2) 📝 `packages/client/src/components/game/GameSurface.tsx` (+2 -1) 📝 `packages/client/src/hooks/use-game-storyboards.ts` (+23 -2) 📝 `packages/client/src/localization/locales/en.json` (+40 -2) 📝 `packages/server/src/routes/game.routes.ts` (+302 -93) _...and 10 more files_ </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #4311 Paired package work: Pasta-Devs/Marinara-Agents#144 and Pasta-Devs/Marinara-Agents#147 Related isolated Gallery animation work: #4325 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Storyboards were optimized for Game Mode, while Roleplay had Illustrator images and manual Gallery animation but no storyboard episode workflow. - Roleplay needs configurable message cadence, inline media, and motion-aware planning without rewriting the established Game Storyboard prompts or changing Illustrator behavior. - The earlier feature-creep implementation mixed Game and Roleplay prompt contracts. This replacement keeps their planning libraries separate and reuses only the provider-facing image/video formatter stages. ## What changed <!-- List the key changes in this PR --> - Added host-managed Roleplay Storyboard generation to the existing Storyboard storage and media pipeline. - Added bounded Roleplay episode selection from completed user/assistant messages, automatic cadence after every N assistant responses (default 1), no page-load backfill, duplicate protection, and successful-run cadence anchoring. - Added manual **Create storyboard** generation from the Gallery and automatic **Manual only**, **Still images**, and **Animations** modes. - Added inline Roleplay keyframe/image/video playback after the assistant response that ends the episode, including progressive render state, failure state, frame navigation, and image lightbox support. - Added Roleplay chat settings for cadence, keyframes, duration, connections, prompt layers, appearance/avatar behavior, NovelAI character prompts, and provider formatters. - Added separate editable Roleplay episode, visual-style, animation, and output prompt libraries to global **Agents > Storyboard** settings. Existing Game planner prompts remain unchanged. - Kept animation directions provider-neutral: the illustration is the exact T=0 frame, followed by simple action, camera behavior, environment motion, source-supported dialogue/SFX/ambience, and an ending hold. Any configured image-to-video connection can be selected, including Gemini Omni or LTX/ComfyUI where supported. - Added focused prompt/cadence regressions, localization, and English documentation. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [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` Automated evidence gathered: - GitHub `container-build-test` and `pnpm-validate` passed on `92042a681`. - `corepack pnpm@10.33.2 regression:prompt` passed, including the new Roleplay episode and prompt-layer regressions. - `corepack pnpm@10.33.2 localization:check` passed. - `corepack pnpm@10.33.2 lint` passed for shared, server, and client. - `corepack pnpm@10.33.2 build` passed; the client build also passed independently. - `git diff --check` passed. - Existing Game prompt definitions were compared against the staging package and remain unchanged. - `corepack pnpm@10.33.2 check` stops before lint/build at the repository guard: `Impeccable context loader did not return valid JSON`; the direct checks above were run separately. - `corepack pnpm@10.33.2 smoke:ui` could not launch because this replacement PC does not have Playwright's Chromium executable installed. All 254 tests stopped at `browserType.launch` before application assertions. ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - [x] Manually verify interval 1 produces an inline Storyboard after a newly completed assistant response. - [x] Manually verify a larger interval combines only messages since the previous successful Storyboard. - [ ] Manually verify opening an existing Roleplay chat does not backfill old messages. - [x] Manually verify still and animated inline Storyboards on desktop and mobile, including partial/failure states. - [x] Manually verify Gallery **Create storyboard** works in Roleplay and does not require Illustrator. - [ ] Manually verify Gemini Omni and LTX/ComfyUI image-to-video connections receive the selected provider formatter and reference image. - [x] Manually verify existing Game Storyboard generation, prompts, and viewers remain unchanged. - [ ] Manually verify Illustrator is unaffected with Storyboard enabled and disabled. - [ ] Check light/dark themes, mobile layout, localization fallback, restart persistence, and agent uninstall behavior. ## 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] <paths>` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) - English Storyboard documentation and cross-references were updated. - Translation follow-up: #4328. - No Engine version bump is included. ## UI evidence (if applicable) <!-- Add before/after screenshots or recordings for UI changes --> Manual desktop/mobile screenshots remain to be added after provider-backed verification. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added inline Roleplay storyboard episodes with manual or automatic generation. * Added configurable cadence, keyframes, animation, connections, character options, and prompt layers. * Roleplay storyboard media now appears in chat with frame navigation, loading states, and lightbox viewing. * Added separate Game and Roleplay settings and prompt libraries. * Storyboards can be rendered in chat and accessed through the Gallery. * **Documentation** * Updated guides, FAQs, troubleshooting, and feature descriptions. * **Bug Fixes** * Improved handling of skipped or incomplete generation. <!-- 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:09:27 +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#6335
No description provided.