[PR #3184] [MERGED] [codex] Make game narration summarizer prompt editable #5832

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

📋 Pull Request Information

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

Base: staging ← Head: codex/editable-game-narration-summarizer-3183


📝 Commits (1)

  • 85743a2 Make game narration summarizer prompt editable

📊 Changes

5 files changed (+116 additions, -26 deletions)

View changed files

📝 packages/client/src/components/panels/SettingsPanel.tsx (+8 -3)
📝 packages/server/src/routes/game.routes.ts (+36 -20)
📝 packages/server/src/services/prompt-overrides/index.ts (+2 -0)
📝 packages/server/src/services/prompt-overrides/registry.ts (+14 -2)
📝 packages/server/src/services/prompt-overrides/registry/game-assets.ts (+56 -1)

📄 Description

Linked issue

Closes #3183

Why this change

Users can edit Game Mode image prompt templates for NPC portraits, backgrounds, and scene illustrations, but the narration summarizer that converts completed Game Mode narration into the final illustration prompt was still hardcoded. That meant prompt engineering could tune the final image template but not the upstream summarization step that selects the visible moment and details.

What changed

  • Registered game.narrationSummarizer as a prompt override with default behavior matching the previous hardcoded summarizer instructions.
  • Routed Game Mode illustration narration summarization through loadPrompt, with fallback to the built-in default when no enabled override exists or rendering fails.
  • Added the summarizer key to Settings -> Advanced -> Image Prompt Templates so it appears beside Game NPC portrait, Game background, and Game scene illustration prompts.
  • Reused prompt override storage across preview and generation paths so prompt preview and actual generation resolve the same saved templates.

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

  • Automated validation run: pnpm.cmd check passed locally.
  • Focused follow-up validation run after final diff cleanup: pnpm.cmd --filter @marinara-engine/server lint, pnpm.cmd --filter @marinara-engine/shared lint, and pnpm.cmd --filter @marinara-engine/client exec eslint src/components/panels/SettingsPanel.tsx passed locally.
  • Manual browser verification still needed: open Settings -> Advanced -> Image Prompt Templates and verify Game Narration Summarizer appears in the registered prompt dropdown.
  • Manual generation verification still needed: save a temporary game.narrationSummarizer override, generate or preview a Game Mode scene illustration from narration, and confirm the summarizer prompt uses the override while disabled/reset templates fall back to default behavior.

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)

No install, update, release, or version-bearing behavior changed.

UI evidence (if applicable)

Not captured. The PR changes an existing settings dropdown entry rather than adding a new screen; manual UI verification is listed above.

Summary by CodeRabbit

  • New Features
    • The Image Prompt Templates editor now includes narration summarization as an editable template target.
    • Game asset generation now supports prompt overrides for narration-based illustration summaries, giving more flexible prompt behavior.
  • Bug Fixes
    • Improved prompt assembly for illustration generation so the generated output better reflects the current game context and completed narration.

🔄 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/3184 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/3/2026 **Status:** ✅ Merged **Merged:** 7/3/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/editable-game-narration-summarizer-3183` --- ### 📝 Commits (1) - [`85743a2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/85743a2b252748fafd22cc8dc60f623a42c712f3) Make game narration summarizer prompt editable ### 📊 Changes **5 files changed** (+116 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+8 -3) 📝 `packages/server/src/routes/game.routes.ts` (+36 -20) 📝 `packages/server/src/services/prompt-overrides/index.ts` (+2 -0) 📝 `packages/server/src/services/prompt-overrides/registry.ts` (+14 -2) 📝 `packages/server/src/services/prompt-overrides/registry/game-assets.ts` (+56 -1) </details> ### 📄 Description ## Linked issue Closes #3183 ## Why this change Users can edit Game Mode image prompt templates for NPC portraits, backgrounds, and scene illustrations, but the narration summarizer that converts completed Game Mode narration into the final illustration prompt was still hardcoded. That meant prompt engineering could tune the final image template but not the upstream summarization step that selects the visible moment and details. ## What changed - Registered `game.narrationSummarizer` as a prompt override with default behavior matching the previous hardcoded summarizer instructions. - Routed Game Mode illustration narration summarization through `loadPrompt`, with fallback to the built-in default when no enabled override exists or rendering fails. - Added the summarizer key to Settings -> Advanced -> Image Prompt Templates so it appears beside Game NPC portrait, Game background, and Game scene illustration prompts. - Reused prompt override storage across preview and generation paths so prompt preview and actual generation resolve the same saved templates. ## 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` ### Manual verification notes - Automated validation run: `pnpm.cmd check` passed locally. - Focused follow-up validation run after final diff cleanup: `pnpm.cmd --filter @marinara-engine/server lint`, `pnpm.cmd --filter @marinara-engine/shared lint`, and `pnpm.cmd --filter @marinara-engine/client exec eslint src/components/panels/SettingsPanel.tsx` passed locally. - Manual browser verification still needed: open Settings -> Advanced -> Image Prompt Templates and verify `Game Narration Summarizer` appears in the registered prompt dropdown. - Manual generation verification still needed: save a temporary `game.narrationSummarizer` override, generate or preview a Game Mode scene illustration from narration, and confirm the summarizer prompt uses the override while disabled/reset templates fall back to default behavior. ## 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) No install, update, release, or version-bearing behavior changed. ## UI evidence (if applicable) Not captured. The PR changes an existing settings dropdown entry rather than adding a new screen; manual UI verification is listed above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * The Image Prompt Templates editor now includes narration summarization as an editable template target. * Game asset generation now supports prompt overrides for narration-based illustration summaries, giving more flexible prompt behavior. * **Bug Fixes** * Improved prompt assembly for illustration generation so the generated output better reflects the current game context and completed narration. <!-- 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:19:58 +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#5832
No description provided.