[PR #575] [MERGED] Enable map regeneration after restored turns #4677

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

📋 Pull Request Information

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

Base: main ← Head: fix/issue-565-generate-another-map


📝 Commits (1)

  • 110b618 Enable map regeneration after restored turns

📊 Changes

2 files changed (+13 additions, -4 deletions)

View changed files

📝 packages/client/src/components/game/GameMap.tsx (+8 -4)
📝 packages/client/src/components/game/GameSurface.tsx (+5 -0)

📄 Description

Linked issue

Closes #565

Why this change

  • The map panel reused the movement disabled state for the "Generate another map" button. That state includes narration completion, so restored or already-finished turns could leave map generation blocked even when the session was interactive.

What changed

  • Added a separate generateMapDisabled prop for map generation controls.
  • Kept map movement narration-gated while allowing map generation whenever the session is interactive and not streaming.
  • Added the same streaming/session guard inside handleGenerateMap.

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

  • Codex verification: pnpm --dir packages/server exec tsx ..\..\scratch\issue-565-generate-map-gate-repro.ts passed. It proves the old rule disabled map generation when isStreaming=false, sessionInteractive=true, and narrationDone=false; the new rule enables generation in that state while movement remains narration-gated.
  • Codex verification: pnpm --dir packages/server exec tsx ..\..\scratch\issue-565-map-repro.ts passed. It proves same-name generated maps remain distinct and the newly generated map becomes active.
  • Worker verification: pnpm check passed in the issue worktree.
  • Coordinator review: re-ran both scratch proofs after reviewing the diff.

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 included.

UI evidence (if applicable)

N/A - behavior is covered by focused map-state repro scripts.


🔄 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/575 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/8/2026 **Status:** ✅ Merged **Merged:** 5/8/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `main` ← **Head:** `fix/issue-565-generate-another-map` --- ### 📝 Commits (1) - [`110b618`](https://github.com/Pasta-Devs/Marinara-Engine/commit/110b6187990b591f704b4927ed6e665baa57431d) Enable map regeneration after restored turns ### 📊 Changes **2 files changed** (+13 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/game/GameMap.tsx` (+8 -4) 📝 `packages/client/src/components/game/GameSurface.tsx` (+5 -0) </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 #565 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - The map panel reused the movement disabled state for the "Generate another map" button. That state includes narration completion, so restored or already-finished turns could leave map generation blocked even when the session was interactive. ## What changed <!-- List the key changes in this PR --> - Added a separate `generateMapDisabled` prop for map generation controls. - Kept map movement narration-gated while allowing map generation whenever the session is interactive and not streaming. - Added the same streaming/session guard inside `handleGenerateMap`. ## 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. --> - Codex verification: `pnpm --dir packages/server exec tsx ..\..\scratch\issue-565-generate-map-gate-repro.ts` passed. It proves the old rule disabled map generation when `isStreaming=false`, `sessionInteractive=true`, and `narrationDone=false`; the new rule enables generation in that state while movement remains narration-gated. - Codex verification: `pnpm --dir packages/server exec tsx ..\..\scratch\issue-565-map-repro.ts` passed. It proves same-name generated maps remain distinct and the newly generated map becomes active. - Worker verification: `pnpm check` passed in the issue worktree. - Coordinator review: re-ran both scratch proofs after reviewing the diff. ## 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 included. ## UI evidence (if applicable) N/A - behavior is covered by focused map-state repro scripts. --- <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:43 +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#4677
No description provided.