[PR #529] [MERGED] Fix image prompt review during game startup #4658

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/529
Author: @cha1latte
Created: 5/7/2026
Status: ✅ Merged
Merged: 5/7/2026
Merged by: @cha1latte

Base: main ← Head: fix/issue-498-image-prompt-start


📝 Commits (1)

  • 3f6296a Fix image prompt review during game startup

📊 Changes

3 files changed (+127 additions, -120 deletions)

View changed files

➕ docs/pr-evidence/issue-498/issue-498-after.png (+0 -0)
➕ docs/pr-evidence/issue-498/issue-498-before.png (+0 -0)
📝 packages/client/src/components/game/GameSurface.tsx (+127 -120)

📄 Description

## Linked issue

Closes #498

Why this change

  • New Game startup could get stuck after the first GM turn when Expose image prompts before sending was enabled, because the image prompt review UI was not mounted while the intro/start screen was still gating the first turn.

What changed

  • Reuses a single GameImagePromptReviewModal render expression for game image prompt review.
  • Mounts that review modal in the first-turn intro/start screen branch as well as the main game surface branch.
  • Adds before/after browser evidence for issue #498 under docs/pr-evidence/issue-498/.

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

  • Read CONTRIBUTING.md and the local frontend instructions before shipping this focused client change.
  • Ran node scratch\issue-498-repro.mjs; it fails the focused check on upstream/main because the intro branch can open prompt review state without mounting GameImagePromptReviewModal, and passes on this branch because the modal is mounted there.
  • Ran a mocked browser Start Game flow against upstream/main on localhost:5175: the first turn reaches POST /game/generate-assets/preview, but no Review Image Prompt modal is visible while the intro screen remains on scene preparation.
  • Ran the same mocked browser Start Game flow against this branch on localhost:5174: the first turn reaches POST /game/generate-assets/preview, and the Review Image Prompt modal appears with the generated background prompt.
  • Ran pnpm check; it passed the Impeccable context check, workspace lint/type checks, and production build.
  • Did not run Docker/Podman; this is a client render-path fix.

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 docs or release metadata changes needed; this fixes a client UI render path.

UI evidence (if applicable)

Before, upstream reaches image prompt preview during first-turn setup but no prompt review modal is mounted:

Issue 498 before

After, the same flow shows the prompt review modal during first-turn setup:

Issue 498 after

Summary by CodeRabbit

  • Bug Fixes
    • Fixed the image prompt review modal to reliably appear during the initial game startup phase, ensuring it displays correctly before the game fully begins.

🔄 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/529 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/7/2026 **Status:** ✅ Merged **Merged:** 5/7/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `main` ← **Head:** `fix/issue-498-image-prompt-start` --- ### 📝 Commits (1) - [`3f6296a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3f6296a096eb39b51860919c94ae86a14f899cd1) Fix image prompt review during game startup ### 📊 Changes **3 files changed** (+127 additions, -120 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/issue-498/issue-498-after.png` (+0 -0) ➕ `docs/pr-evidence/issue-498/issue-498-before.png` (+0 -0) 📝 `packages/client/src/components/game/GameSurface.tsx` (+127 -120) </details> ### 📄 Description ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #498 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - New Game startup could get stuck after the first GM turn when **Expose image prompts before sending** was enabled, because the image prompt review UI was not mounted while the intro/start screen was still gating the first turn. ## What changed <!-- List the key changes in this PR --> - Reuses a single `GameImagePromptReviewModal` render expression for game image prompt review. - Mounts that review modal in the first-turn intro/start screen branch as well as the main game surface branch. - Adds before/after browser evidence for issue #498 under `docs/pr-evidence/issue-498/`. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `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 <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Read `CONTRIBUTING.md` and the local frontend instructions before shipping this focused client change. - Ran `node scratch\issue-498-repro.mjs`; it fails the focused check on `upstream/main` because the intro branch can open prompt review state without mounting `GameImagePromptReviewModal`, and passes on this branch because the modal is mounted there. - Ran a mocked browser Start Game flow against `upstream/main` on `localhost:5175`: the first turn reaches `POST /game/generate-assets/preview`, but no `Review Image Prompt` modal is visible while the intro screen remains on scene preparation. - Ran the same mocked browser Start Game flow against this branch on `localhost:5174`: the first turn reaches `POST /game/generate-assets/preview`, and the `Review Image Prompt` modal appears with the generated background prompt. - Ran `pnpm check`; it passed the Impeccable context check, workspace lint/type checks, and production build. - Did not run Docker/Podman; this is a client render-path fix. ## 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 docs or release metadata changes needed; this fixes a client UI render path. ## UI evidence (if applicable) Before, upstream reaches image prompt preview during first-turn setup but no prompt review modal is mounted: ![Issue 498 before](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/3f6296a096eb39b51860919c94ae86a14f899cd1/docs/pr-evidence/issue-498/issue-498-before.png) After, the same flow shows the prompt review modal during first-turn setup: ![Issue 498 after](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/3f6296a096eb39b51860919c94ae86a14f899cd1/docs/pr-evidence/issue-498/issue-498-after.png) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed the image prompt review modal to reliably appear during the initial game startup phase, ensuring it displays correctly before the game fully begins. <!-- 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:09:33 +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#4658
No description provided.