[PR #4598] [MERGED] fix(storyboard): harden fallback rendering #6436

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

📋 Pull Request Information

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

Base: staging ← Head: fix/4595-storyboard-fallback-followup


📝 Commits (1)

  • 311c5bd fix(storyboard): harden fallback rendering

📊 Changes

5 files changed (+113 additions, -38 deletions)

View changed files

📝 packages/client/src/components/chat/RoleplayStoryboardMessageMedia.tsx (+3 -4)
📝 packages/server/src/routes/game.routes.ts (+20 -28)
📝 packages/server/src/services/game/game-asset-generation.ts (+11 -3)
📝 packages/server/src/services/game/storyboard-planner-fallback.ts (+37 -3)
📝 scripts/regressions/prompt.regression.ts (+42 -0)

📄 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 #4595

Why this change

  • The fallback path could lose its effective fallback state after storyboard review, repeat structured speaker labels, omit collected appearance notes from selected image formatters, and display the same degraded error twice.
  • This follows up the valid CodeRabbit findings left on #4591 and the provider-facing prompt behavior observed in debug logs.

What changed

  • Detect non-renderable reviewed plans before sanitization so fallback appearance and video safeguards remain active.
  • Normalize fallback speaker prefixes and share word-boundary truncation logic.
  • Require collected fallback appearance notes in the final provider prompt when a selected formatter omits them.
  • Remove duplicate Roleplay storyboard error rendering.
  • Add prompt regressions for empty plans, repeated speakers, truncation, and formatter-omitted appearance.

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 proof performed by Codex:

  • pnpm check
  • pnpm regression:prompt
  • git diff --check

Manual verification notes

  • Manually force a storyboard planner failure with character appearance enabled and Storyboard First Frame selected.
  • Confirm the final provider prompt contains each requested character appearance once and does not duplicate structured speaker labels.
  • Confirm a degraded Roleplay storyboard displays its detailed error once.

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)

  • Not captured. The UI change removes duplicate fallback error text; human verification remains pending.

Summary by CodeRabbit

  • New Features

    • Improved storyboard fallback generation when planned keyframes cannot be rendered.
    • Character appearance details are now preserved in storyboard previews and generated scene images.
    • Video generation is skipped when no usable storyboard frame is available.
  • Bug Fixes

    • Improved storyboard text formatting, including cleaner speaker labels and word-boundary truncation.
    • Empty storyboard states now show clearer rendering or failure status messages.
    • Reduced repeated character appearance details in generated image prompts.

🔄 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/4598 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 8/4/2026 **Status:** ✅ Merged **Merged:** 8/4/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/4595-storyboard-fallback-followup` --- ### 📝 Commits (1) - [`311c5bd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/311c5bd8b4917eaacd038992f139609b80ac5252) fix(storyboard): harden fallback rendering ### 📊 Changes **5 files changed** (+113 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/RoleplayStoryboardMessageMedia.tsx` (+3 -4) 📝 `packages/server/src/routes/game.routes.ts` (+20 -28) 📝 `packages/server/src/services/game/game-asset-generation.ts` (+11 -3) 📝 `packages/server/src/services/game/storyboard-planner-fallback.ts` (+37 -3) 📝 `scripts/regressions/prompt.regression.ts` (+42 -0) </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`. ## Linked issue Closes #4595 ## Why this change - The fallback path could lose its effective fallback state after storyboard review, repeat structured speaker labels, omit collected appearance notes from selected image formatters, and display the same degraded error twice. - This follows up the valid CodeRabbit findings left on #4591 and the provider-facing prompt behavior observed in debug logs. ## What changed - Detect non-renderable reviewed plans before sanitization so fallback appearance and video safeguards remain active. - Normalize fallback speaker prefixes and share word-boundary truncation logic. - Require collected fallback appearance notes in the final provider prompt when a selected formatter omits them. - Remove duplicate Roleplay storyboard error rendering. - Add prompt regressions for empty plans, repeated speakers, truncation, and formatter-omitted appearance. ## Validation - [x] `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 proof performed by Codex: - `pnpm check` - `pnpm regression:prompt` - `git diff --check` ### Manual verification notes - Manually force a storyboard planner failure with character appearance enabled and `Storyboard First Frame` selected. - Confirm the final provider prompt contains each requested character appearance once and does not duplicate structured speaker labels. - Confirm a degraded Roleplay storyboard displays its detailed error once. ## 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) - Not captured. The UI change removes duplicate fallback error text; human verification remains pending. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved storyboard fallback generation when planned keyframes cannot be rendered. * Character appearance details are now preserved in storyboard previews and generated scene images. * Video generation is skipped when no usable storyboard frame is available. * **Bug Fixes** * Improved storyboard text formatting, including cleaner speaker labels and word-boundary truncation. * Empty storyboard states now show clearer rendering or failure status messages. * Reduced repeated character appearance details in generated image prompts. <!-- 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:10:25 +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#6436
No description provided.