[PR #3215] [MERGED] [codex] Optimize game storyboard generation #5845

Closed
opened 2026-10-22 04:20:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: storyboard-optimizations


📝 Commits (7)

  • 8dfdc5f Improve game storyboard and NPC portrait generation
  • 6a7d7da Split storyboard director prompts by media type
  • d3c887d Revert NPC portrait prompt changes
  • ca0f6b8 Strip VN metadata from TTS input
  • 49cd6d7 Avoid reading TTS tone tags aloud
  • 6545689 Bust stale TTS audio cache
  • 684b927 Address storyboard review feedback

📊 Changes

11 files changed (+364 additions, -151 deletions)

View changed files

📝 packages/client/src/components/game/GameNarration.tsx (+1 -1)
📝 packages/client/src/components/game/GameSurface.tsx (+59 -80)
📝 packages/client/src/hooks/use-game-storyboards.ts (+15 -0)
📝 packages/client/src/lib/tts-dialogue.ts (+10 -2)
📝 packages/server/src/routes/game.routes.ts (+125 -41)
📝 packages/server/src/routes/tts.routes.ts (+2 -24)
📝 packages/server/src/services/prompt-overrides/index.ts (+1 -0)
📝 packages/server/src/services/prompt-overrides/registry.ts (+3 -0)
📝 packages/server/src/services/prompt-overrides/registry/game-assets.ts (+54 -1)
📝 packages/server/src/services/storage/game-storyboards.storage.ts (+34 -1)
📝 scripts/regressions/prompt.regression.ts (+60 -1)

📄 Description

Linked issue

Closes #3214

Why this change

  • Auto-storyboard generation was delayed behind scene/asset idle checks even though storyboard planning only needs the completed GM narration.
  • Illustration-only storyboards were being planned with animation-oriented director fields, adding unnecessary prompt weight and slower planning.
  • Storyboard media was duplicated in Game Assets even though it is already visible through the storyboard/gallery surfaces.

What changed

  • Starts auto-storyboard generation once the GM narration is available instead of waiting for scene preparation and pending asset generation.
  • Returns the storyboard plan immediately and renders images/videos in the background while the client polls active storyboard status.
  • Splits storyboard director prompts into illustration-only and animation-capable contracts.
  • Removes storyboard preview tiles from Game Assets while keeping status/reopen controls.
  • Reverts the unrelated NPC portrait prompt changes so this branch stays scoped to storyboard optimization.

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

Manual verification notes

  • pnpm regression:prompt passed.
  • pnpm lint passed.
  • pnpm check passed after the main storyboard changes; the Vite build needed an unsandboxed rerun because the sandbox blocked directory traversal.
  • After reverting the unrelated NPC portrait prompt changes, pnpm regression:prompt, pnpm lint, and git diff --check passed. git diff --check reported CRLF warnings only.
  • Manual browser/app verification is still needed before marking this ready for review.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

Expected impact: no docs or release metadata changes are expected because this changes internal storyboard generation timing, prompt selection, and UI duplication.

UI evidence (if applicable)

Not captured yet. Manual app verification should confirm storyboard status/progressive rendering behavior and that Game Assets no longer duplicates storyboard preview tiles.

Summary by CodeRabbit

  • New Features

    • Added support for illustration-only turn storyboards alongside video-enabled storyboards.
    • Storyboards can now render in the background, with the UI showing loading/generating states while work is still in progress.
    • Improved automatic refresh so in-progress storyboards update more frequently.
  • Bug Fixes

    • Prevented duplicate storyboard generation while rendering is underway.
    • Updated the storyboard action button to stay disabled during active generation.
    • Refined success messaging and asset display for partially completed or still-rendering storyboards.

🔄 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/3215 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/4/2026 **Status:** ✅ Merged **Merged:** 7/4/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `storyboard-optimizations` --- ### 📝 Commits (7) - [`8dfdc5f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8dfdc5f59fe9d78e5263f063f31dfe2df9e0cdef) Improve game storyboard and NPC portrait generation - [`6a7d7da`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6a7d7da826be49d0fb3bfe700b5a0e0a11ff1b2b) Split storyboard director prompts by media type - [`d3c887d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d3c887d1dbb33b85792bcd6d25fb5d74d60da02b) Revert NPC portrait prompt changes - [`ca0f6b8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ca0f6b89f1259135fc819814ff8f5526a306da08) Strip VN metadata from TTS input - [`49cd6d7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/49cd6d76757b36bebdbe3e0d4e335fac8a344f39) Avoid reading TTS tone tags aloud - [`6545689`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6545689ad6443ccc46d31634ed290361ba7efc18) Bust stale TTS audio cache - [`684b927`](https://github.com/Pasta-Devs/Marinara-Engine/commit/684b9274b03964c0ad7b995f06777bf11c656eeb) Address storyboard review feedback ### 📊 Changes **11 files changed** (+364 additions, -151 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/game/GameNarration.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameSurface.tsx` (+59 -80) 📝 `packages/client/src/hooks/use-game-storyboards.ts` (+15 -0) 📝 `packages/client/src/lib/tts-dialogue.ts` (+10 -2) 📝 `packages/server/src/routes/game.routes.ts` (+125 -41) 📝 `packages/server/src/routes/tts.routes.ts` (+2 -24) 📝 `packages/server/src/services/prompt-overrides/index.ts` (+1 -0) 📝 `packages/server/src/services/prompt-overrides/registry.ts` (+3 -0) 📝 `packages/server/src/services/prompt-overrides/registry/game-assets.ts` (+54 -1) 📝 `packages/server/src/services/storage/game-storyboards.storage.ts` (+34 -1) 📝 `scripts/regressions/prompt.regression.ts` (+60 -1) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #3214 ## Why this change - Auto-storyboard generation was delayed behind scene/asset idle checks even though storyboard planning only needs the completed GM narration. - Illustration-only storyboards were being planned with animation-oriented director fields, adding unnecessary prompt weight and slower planning. - Storyboard media was duplicated in Game Assets even though it is already visible through the storyboard/gallery surfaces. ## What changed - Starts auto-storyboard generation once the GM narration is available instead of waiting for scene preparation and pending asset generation. - Returns the storyboard plan immediately and renders images/videos in the background while the client polls active storyboard status. - Splits storyboard director prompts into illustration-only and animation-capable contracts. - Removes storyboard preview tiles from Game Assets while keeping status/reopen controls. - Reverts the unrelated NPC portrait prompt changes so this branch stays scoped to storyboard optimization. ## 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` ### Manual verification notes - `pnpm regression:prompt` passed. - `pnpm lint` passed. - `pnpm check` passed after the main storyboard changes; the Vite build needed an unsandboxed rerun because the sandbox blocked directory traversal. - After reverting the unrelated NPC portrait prompt changes, `pnpm regression:prompt`, `pnpm lint`, and `git diff --check` passed. `git diff --check` reported CRLF warnings only. - Manual browser/app verification is still needed before marking this ready for review. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) Expected impact: no docs or release metadata changes are expected because this changes internal storyboard generation timing, prompt selection, and UI duplication. ## UI evidence (if applicable) Not captured yet. Manual app verification should confirm storyboard status/progressive rendering behavior and that Game Assets no longer duplicates storyboard preview tiles. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for illustration-only turn storyboards alongside video-enabled storyboards. * Storyboards can now render in the background, with the UI showing loading/generating states while work is still in progress. * Improved automatic refresh so in-progress storyboards update more frequently. * **Bug Fixes** * Prevented duplicate storyboard generation while rendering is underway. * Updated the storyboard action button to stay disabled during active generation. * Refined success messaging and asset display for partially completed or still-rendering storyboards. <!-- 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-22 04:20:06 +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#5845
No description provided.