[PR #3544] [MERGED] Expose Roleplay Gallery media prompts before sending #5988

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

📋 Pull Request Information

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

Base: staging ← Head: fix/3543-roleplay-image-request-queue


📝 Commits (4)

  • c024e3f Fix Roleplay image generation request queue
  • 46b2be2 Add gallery media prompt reviews
  • 1eb6cdb Harden gallery media prompt reviews
  • e9acca8 Merge branch 'staging' into fix/3543-roleplay-image-request-queue

📊 Changes

20 files changed (+1256 additions, -264 deletions)

View changed files

📝 docs/characters/creating-and-editing-characters.md (+1 -1)
📝 docs/conversation/selfies.md (+10 -9)
📝 docs/development/noodle-internals.md (+2 -2)
📝 docs/media/animated-expressions.md (+1 -1)
📝 docs/media/scene-backgrounds.md (+1 -1)
📝 docs/media/scene-video.md (+18 -15)
📝 packages/client/src/components/chat/ChatArea.tsx (+309 -39)
📝 packages/client/src/components/game/GameSurface.tsx (+106 -17)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+18 -6)
📝 packages/client/src/components/ui/ImagePromptReviewModal.tsx (+30 -13)
📝 packages/client/src/hooks/use-gallery.ts (+8 -2)
📝 packages/client/src/hooks/use-generate.ts (+29 -12)
📝 packages/server/src/routes/gallery.routes.ts (+208 -120)
📝 packages/server/src/routes/game.routes.ts (+32 -6)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+121 -20)
➕ packages/server/src/services/image/illustrator-prompt-review.ts (+42 -0)
➕ packages/server/src/services/image/image-generation-queue.ts (+69 -0)
➕ packages/server/src/services/image/image-prompt-review.ts (+26 -0)
➕ packages/server/src/services/video/scene-video-prompt-review.ts (+29 -0)
📝 scripts/regressions/open-issues.regression.ts (+196 -0)

📄 Description

Linked issue

Closes #3543

Why this change

The Expose media prompts before sending setting did not reliably intercept Roleplay Gallery media actions. Users could not consistently review the final compiled prompt for illustrations, backgrounds, selfies, or scene videos before the provider request was sent. Prompt preview failures could also leave an action busy, and editing only the positive prompt could unintentionally discard the compiled negative prompt.

The Roleplay Gallery Illustrator path also ignored the existing image-request queue preference, so this PR includes that small related request-control fix.

What changed

  • Pause manual Roleplay Illustrator retries after final prompt compilation and resume them with the reviewed one-off prompt without rerunning the Illustrator LLM.
  • Expose editable prompt reviews for Roleplay Gallery illustrations, backgrounds, scene Video/Animate actions, and Conversation Gallery selfies.
  • Keep review dialogs visibly submitting until the provider request settles.
  • Add preview/review timeouts, graceful default-prompt fallback, and re-entry guards so hung or overlapping reviews cannot strand generation state.
  • Preserve compiled negative prompts when an edit omits them, while allowing an explicit empty negative prompt to clear them.
  • Log the final Illustrator provider prompt through the standard debug override path.
  • Expand settings search aliases for selfie, portrait, sprite, avatar, Noodle, and animated-expression workflows.
  • Forward the image-request queue preference to Roleplay Illustrator generation and serialize queued calls per image connection.
  • Add deterministic regressions for prompt review, negative-prompt resolution, and queue cancellation/failure recovery.

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 commands run while preparing this PR:

  • pnpm.cmd regression:issues
  • pnpm.cmd regression:prompt
  • pnpm.cmd --filter @marinara-engine/client lint
  • pnpm.cmd --filter @marinara-engine/server lint
  • pnpm.cmd check

Manual verification notes

  • Manually verify each supported Roleplay/Conversation Gallery action opens prompt review before provider submission when the toggle is enabled.
  • Manually verify edited prompts are applied once, cancel submits nothing, and the submitting indicator remains visible until completion.
  • Manually verify preview timeout fallback and repeated-click/re-entry behavior.
  • Manually verify queued Roleplay Gallery illustrations serialize per connection and disabling the queue permits provider-supported concurrency.

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 version or release metadata changes are included.

UI evidence (if applicable)

Add screenshots or a recording after manual browser verification.


🔄 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/3544 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/13/2026 **Status:** ✅ Merged **Merged:** 7/13/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3543-roleplay-image-request-queue` --- ### 📝 Commits (4) - [`c024e3f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c024e3fc4506a2ee5eb4c9422b2d21ddc3183984) Fix Roleplay image generation request queue - [`46b2be2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/46b2be212893bda4faf75c801379a7bfb562d50a) Add gallery media prompt reviews - [`1eb6cdb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1eb6cdb08a0d4e44c9e92603237bf419755e78ba) Harden gallery media prompt reviews - [`e9acca8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e9acca87d1be4c53d3f4c7fca21b3c778d261491) Merge branch 'staging' into fix/3543-roleplay-image-request-queue ### 📊 Changes **20 files changed** (+1256 additions, -264 deletions) <details> <summary>View changed files</summary> 📝 `docs/characters/creating-and-editing-characters.md` (+1 -1) 📝 `docs/conversation/selfies.md` (+10 -9) 📝 `docs/development/noodle-internals.md` (+2 -2) 📝 `docs/media/animated-expressions.md` (+1 -1) 📝 `docs/media/scene-backgrounds.md` (+1 -1) 📝 `docs/media/scene-video.md` (+18 -15) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+309 -39) 📝 `packages/client/src/components/game/GameSurface.tsx` (+106 -17) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+18 -6) 📝 `packages/client/src/components/ui/ImagePromptReviewModal.tsx` (+30 -13) 📝 `packages/client/src/hooks/use-gallery.ts` (+8 -2) 📝 `packages/client/src/hooks/use-generate.ts` (+29 -12) 📝 `packages/server/src/routes/gallery.routes.ts` (+208 -120) 📝 `packages/server/src/routes/game.routes.ts` (+32 -6) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+121 -20) ➕ `packages/server/src/services/image/illustrator-prompt-review.ts` (+42 -0) ➕ `packages/server/src/services/image/image-generation-queue.ts` (+69 -0) ➕ `packages/server/src/services/image/image-prompt-review.ts` (+26 -0) ➕ `packages/server/src/services/video/scene-video-prompt-review.ts` (+29 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+196 -0) </details> ### 📄 Description ## Linked issue Closes #3543 ## Why this change The **Expose media prompts before sending** setting did not reliably intercept Roleplay Gallery media actions. Users could not consistently review the final compiled prompt for illustrations, backgrounds, selfies, or scene videos before the provider request was sent. Prompt preview failures could also leave an action busy, and editing only the positive prompt could unintentionally discard the compiled negative prompt. The Roleplay Gallery Illustrator path also ignored the existing image-request queue preference, so this PR includes that small related request-control fix. ## What changed - Pause manual Roleplay Illustrator retries after final prompt compilation and resume them with the reviewed one-off prompt without rerunning the Illustrator LLM. - Expose editable prompt reviews for Roleplay Gallery illustrations, backgrounds, scene Video/Animate actions, and Conversation Gallery selfies. - Keep review dialogs visibly submitting until the provider request settles. - Add preview/review timeouts, graceful default-prompt fallback, and re-entry guards so hung or overlapping reviews cannot strand generation state. - Preserve compiled negative prompts when an edit omits them, while allowing an explicit empty negative prompt to clear them. - Log the final Illustrator provider prompt through the standard debug override path. - Expand settings search aliases for selfie, portrait, sprite, avatar, Noodle, and animated-expression workflows. - Forward the image-request queue preference to Roleplay Illustrator generation and serialize queued calls per image connection. - Add deterministic regressions for prompt review, negative-prompt resolution, and queue cancellation/failure recovery. ## 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` Automated commands run while preparing this PR: - `pnpm.cmd regression:issues` - `pnpm.cmd regression:prompt` - `pnpm.cmd --filter @marinara-engine/client lint` - `pnpm.cmd --filter @marinara-engine/server lint` - `pnpm.cmd check` ### Manual verification notes - Manually verify each supported Roleplay/Conversation Gallery action opens prompt review before provider submission when the toggle is enabled. - Manually verify edited prompts are applied once, cancel submits nothing, and the submitting indicator remains visible until completion. - Manually verify preview timeout fallback and repeated-click/re-entry behavior. - Manually verify queued Roleplay Gallery illustrations serialize per connection and disabling the queue permits provider-supported concurrency. ## 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 version or release metadata changes are included. ## UI evidence (if applicable) Add screenshots or a recording after manual browser verification. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:05:56 +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#5988
No description provided.