[PR #5350] [MERGED] fix: address assigned generation and export issues #6738

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

📋 Pull Request Information

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

Base: staging ← Head: fix/assigned-issue-sweep-5346-5349


📝 Commits (7)

  • 273375a fix(game): keep storyboard appearance context in planner
  • 1a20be5 fix(roleplay): retrieve manual summary history
  • be05404 feat(prompts): expose character reference sheet template
  • 64705bd fix(export): materialize game narration overlays
  • 53d87b8 fix(image): stream SwarmUI generations over WebSocket
  • 616f490 docs(changelog): note assigned issue fixes
  • 100cb6d fix(image): bound SwarmUI stream state

📊 Changes

14 files changed (+398 additions, -133 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
📝 packages/server/src/routes/characters.routes.ts (+11 -10)
📝 packages/server/src/routes/chats.routes.ts (+14 -2)
📝 packages/server/src/routes/game.routes.ts (+1 -1)
📝 packages/server/src/services/game/segment-edits.ts (+35 -30)
📝 packages/server/src/services/generation/roleplay-summary-retrieval.ts (+7 -9)
📝 packages/server/src/services/image/image-generation.ts (+108 -27)
📝 packages/server/src/services/prompt-overrides/index.ts (+2 -0)
📝 packages/server/src/services/prompt-overrides/registry.ts (+4 -0)
➕ packages/server/src/services/prompt-overrides/registry/characters.ts (+32 -0)
📝 scripts/regressions/chat-branch-lineage.regression.ts (+49 -0)
📝 scripts/regressions/prompt.regression.ts (+18 -3)
📝 scripts/regressions/regeneration-context.regression.ts (+24 -16)
📝 scripts/regressions/swarmui-timeout.regression.ts (+88 -35)

📄 Description

Linked issues

Closes #5346
Closes #5347
Closes #5348
Closes #5349
Fixes Pasta-Devs/Marinara-Agents#478

Why this change

These assigned issues expose five user-facing gaps: manual and backfilled summaries bypass semantic retrieval, long SwarmUI generations can lose an idle HTTP connection, the character reference-sheet prompt cannot be customized in Generation settings, Game JSONL exports preserve stale segment overlays instead of the visible narration, and the Storyboard planner can lose character appearance context.

What changed

  • Rank every enabled Roleplay summary in semantic retrieval, including manual and range-backfilled entries, while retaining the two newest entries.
  • Move SwarmUI image generation to the official progress-streaming WebSocket route and retain token authentication, cancellation, response bounds, and final image validation.
  • Register the existing Character Reference Sheet prompt under Settings → Generation and use its saved override in preview and generation.
  • Materialize Game narration edits and deletions into text and JSONL exports, including alternate swipes, while stripping stale overlay metadata.
  • Keep Storyboard planner appearance context independent of the final-render attachment toggle.
  • Document all user-facing changes in CHANGELOG.md.

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

  • pnpm check — passed
  • scripts/regressions/regeneration-context.regression.ts — passed
  • scripts/regressions/chat-branch-lineage.regression.ts — passed
  • scripts/regressions/swarmui-timeout.regression.ts — passed
  • Relevant cases in pnpm regression:prompt pass: Character/Persona sheets and Storyboard appearance. The complete prompt lane still reports the pre-existing Beholder state-context assertion on current staging.

Manual verification notes

  • Manually verify Character Reference Sheet appears under Settings → Generation and a saved override affects preview and generation.
  • Manually verify a long-running SwarmUI generation completes without an idle read timeout.
  • Manually verify Game text/JSONL export matches edited narration and omits deleted narration.
  • Manually verify storyboard planning still receives appearance when Attach Card Appearance is disabled.

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
  • Version/release files updated (only if this PR includes a version bump)

CHANGELOG.md is updated. No version-bearing files or user documentation under docs/ changed.

UI evidence (if applicable)

No new UI component or layout. The existing Generation prompt editor renders the newly registered prompt entry.

Summary by CodeRabbit

  • New Features

    • Added a Character Reference Sheet prompt override in Settings → Generation for customizable, consistent character designs.
    • Improved SwarmUI image generation with real-time WebSocket progress and more reliable result handling.
  • Bug Fixes

    • Improved semantic retrieval for relevant manual and backfilled summaries.
    • Chat exports now preserve segment edits, swipes, and deletions while removing internal metadata.
    • Game Storyboard planning now consistently includes character appearance details.

🔄 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/5350 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/21/2026 **Status:** ✅ Merged **Merged:** 8/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/assigned-issue-sweep-5346-5349` --- ### 📝 Commits (7) - [`273375a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/273375a539abbaa49594a77152ac737b1cf1fd80) fix(game): keep storyboard appearance context in planner - [`1a20be5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1a20be5b9bd33ba1816068cea7bdff9e31ee80ca) fix(roleplay): retrieve manual summary history - [`be05404`](https://github.com/Pasta-Devs/Marinara-Engine/commit/be054043044910f5e3b4cb1b217c3f55aaae7b2a) feat(prompts): expose character reference sheet template - [`64705bd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/64705bddad932b7561da353ef9f534fd3a802d00) fix(export): materialize game narration overlays - [`53d87b8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/53d87b87568dd822bd27f69a515cb6697aa7bc44) fix(image): stream SwarmUI generations over WebSocket - [`616f490`](https://github.com/Pasta-Devs/Marinara-Engine/commit/616f490c1f8fa0bfa5ebba376e9c7fda7283bd9d) docs(changelog): note assigned issue fixes - [`100cb6d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/100cb6d000e72a15e395552469ab5380d86fab71) fix(image): bound SwarmUI stream state ### 📊 Changes **14 files changed** (+398 additions, -133 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) 📝 `packages/server/src/routes/characters.routes.ts` (+11 -10) 📝 `packages/server/src/routes/chats.routes.ts` (+14 -2) 📝 `packages/server/src/routes/game.routes.ts` (+1 -1) 📝 `packages/server/src/services/game/segment-edits.ts` (+35 -30) 📝 `packages/server/src/services/generation/roleplay-summary-retrieval.ts` (+7 -9) 📝 `packages/server/src/services/image/image-generation.ts` (+108 -27) 📝 `packages/server/src/services/prompt-overrides/index.ts` (+2 -0) 📝 `packages/server/src/services/prompt-overrides/registry.ts` (+4 -0) ➕ `packages/server/src/services/prompt-overrides/registry/characters.ts` (+32 -0) 📝 `scripts/regressions/chat-branch-lineage.regression.ts` (+49 -0) 📝 `scripts/regressions/prompt.regression.ts` (+18 -3) 📝 `scripts/regressions/regeneration-context.regression.ts` (+24 -16) 📝 `scripts/regressions/swarmui-timeout.regression.ts` (+88 -35) </details> ### 📄 Description ## Linked issues Closes #5346 Closes #5347 Closes #5348 Closes #5349 Fixes Pasta-Devs/Marinara-Agents#478 ## Why this change These assigned issues expose five user-facing gaps: manual and backfilled summaries bypass semantic retrieval, long SwarmUI generations can lose an idle HTTP connection, the character reference-sheet prompt cannot be customized in Generation settings, Game JSONL exports preserve stale segment overlays instead of the visible narration, and the Storyboard planner can lose character appearance context. ## What changed - Rank every enabled Roleplay summary in semantic retrieval, including manual and range-backfilled entries, while retaining the two newest entries. - Move SwarmUI image generation to the official progress-streaming WebSocket route and retain token authentication, cancellation, response bounds, and final image validation. - Register the existing Character Reference Sheet prompt under Settings → Generation and use its saved override in preview and generation. - Materialize Game narration edits and deletions into text and JSONL exports, including alternate swipes, while stripping stale overlay metadata. - Keep Storyboard planner appearance context independent of the final-render attachment toggle. - Document all user-facing changes in `CHANGELOG.md`. ## 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 - `pnpm check` — passed - `scripts/regressions/regeneration-context.regression.ts` — passed - `scripts/regressions/chat-branch-lineage.regression.ts` — passed - `scripts/regressions/swarmui-timeout.regression.ts` — passed - Relevant cases in `pnpm regression:prompt` pass: Character/Persona sheets and Storyboard appearance. The complete prompt lane still reports the pre-existing Beholder state-context assertion on current `staging`. ### Manual verification notes - Manually verify Character Reference Sheet appears under Settings → Generation and a saved override affects preview and generation. - Manually verify a long-running SwarmUI generation completes without an idle read timeout. - Manually verify Game text/JSONL export matches edited narration and omits deleted narration. - Manually verify storyboard planning still receives appearance when Attach Card Appearance is disabled. ## 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 - [ ] Version/release files updated (only if this PR includes a version bump) `CHANGELOG.md` is updated. No version-bearing files or user documentation under `docs/` changed. ## UI evidence (if applicable) No new UI component or layout. The existing Generation prompt editor renders the newly registered prompt entry. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a Character Reference Sheet prompt override in **Settings → Generation** for customizable, consistent character designs. - Improved SwarmUI image generation with real-time WebSocket progress and more reliable result handling. - **Bug Fixes** - Improved semantic retrieval for relevant manual and backfilled summaries. - Chat exports now preserve segment edits, swipes, and deletions while removing internal metadata. - Game Storyboard planning now consistently includes character appearance details. <!-- 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:13:13 +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#6738
No description provided.