[PR #3768] [MERGED] Preserve hierarchical map prompts in reusable Game Mode setups #6094

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

📋 Pull Request Information

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

Base: staging ← Head: agent/game-setup-map-prompt-3767


📝 Commits (2)

  • 1391252 fix(game): preserve map prompt in setup exports
  • e24d7fb Merge branch 'staging' into agent/game-setup-map-prompt-3767

📊 Changes

5 files changed (+32 additions, -1 deletions)

View changed files

📝 packages/client/src/components/game/GameSetupWizard.tsx (+5 -1)
📝 packages/client/src/lib/game-setup-share.ts (+2 -0)
📝 packages/server/src/routes/game.routes.ts (+1 -0)
📝 packages/shared/src/types/game.ts (+2 -0)
📝 scripts/regressions/open-issues.regression.ts (+22 -0)

📄 Description

Linked issue

Closes #3767

Why this change

  • Users who enabled Hierarchical Maps during initial Game Mode setup lost the text entered under “What should this world include?” when they downloaded the reusable setup file.
  • The map prompt was sent only to the transient post-setup draft request and never added to the Engine-owned initial setup snapshot that powers Download setup.
  • The reusable setup should preserve that creation prompt while continuing to round-trip the selected combat style (classic or tactical).

What changed

  • Added the optional hierarchical-map creation prompt to GameSetupConfig and the server creation schema.
  • Saved only that prompt in the initial setup snapshot; map size, grounding mode, generated map data, and runtime spatial state remain excluded.
  • Restored the prompt on setup import and enabled map drafting when Hierarchical Maps is installed.
  • Included the prompt in the readable Initial Game Setup summary.
  • Added regression coverage for prompt export/import, tactical combat-style round-tripping, and oversized prompt rejection.

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 checks run:

  • pnpm check — passes locally.
  • pnpm regression:issues — passes locally.
  • git diff --check — passes.

Manual verification notes

  • Not manually verified in a browser.
  • Manually create a Game Mode campaign with Hierarchical Maps installed, enter a creation prompt, and select both Classic and Tactical combat in separate runs.
  • Download the setup file and confirm the prompt and combatStyle are present.
  • Import the setup file and confirm the prompt and combat style are restored.
  • Import a legacy setup file without the prompt and confirm setup still loads normally.

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

UI evidence (if applicable)

No screenshots are attached.

Summary by CodeRabbit

  • New Features

    • Added support for optional instructions when creating hierarchical world maps.
    • Imported game setups now preserve these instructions and use them when drafting maps.
    • Shared setup summaries now display the hierarchical map creation prompt.
  • Bug Fixes

    • Improved setup completion and import handling so map-drafting preferences are retained correctly.
  • Validation

    • Added validation for map creation instructions, including a 4,000-character limit and invalid-value handling.

🔄 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/3768 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/18/2026 **Status:** ✅ Merged **Merged:** 7/18/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/game-setup-map-prompt-3767` --- ### 📝 Commits (2) - [`1391252`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1391252359f480121f994b48954a3ad8a845a7c5) fix(game): preserve map prompt in setup exports - [`e24d7fb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e24d7fbb09b12ddfd0d2ba3e7f371a41bd61a6d0) Merge branch 'staging' into agent/game-setup-map-prompt-3767 ### 📊 Changes **5 files changed** (+32 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+5 -1) 📝 `packages/client/src/lib/game-setup-share.ts` (+2 -0) 📝 `packages/server/src/routes/game.routes.ts` (+1 -0) 📝 `packages/shared/src/types/game.ts` (+2 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+22 -0) </details> ### 📄 Description ## Linked issue Closes #3767 ## Why this change - Users who enabled Hierarchical Maps during initial Game Mode setup lost the text entered under “What should this world include?” when they downloaded the reusable setup file. - The map prompt was sent only to the transient post-setup draft request and never added to the Engine-owned initial setup snapshot that powers **Download setup**. - The reusable setup should preserve that creation prompt while continuing to round-trip the selected combat style (`classic` or `tactical`). ## What changed - Added the optional hierarchical-map creation prompt to `GameSetupConfig` and the server creation schema. - Saved only that prompt in the initial setup snapshot; map size, grounding mode, generated map data, and runtime spatial state remain excluded. - Restored the prompt on setup import and enabled map drafting when Hierarchical Maps is installed. - Included the prompt in the readable Initial Game Setup summary. - Added regression coverage for prompt export/import, tactical combat-style round-tripping, and oversized prompt rejection. ## 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 checks run: - `pnpm check` — passes locally. - `pnpm regression:issues` — passes locally. - `git diff --check` — passes. ### Manual verification notes - Not manually verified in a browser. - Manually create a Game Mode campaign with Hierarchical Maps installed, enter a creation prompt, and select both Classic and Tactical combat in separate runs. - Download the setup file and confirm the prompt and `combatStyle` are present. - Import the setup file and confirm the prompt and combat style are restored. - Import a legacy setup file without the prompt and confirm setup still loads normally. ## Docs and release impact - [x] 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 changed. ## UI evidence (if applicable) No screenshots are attached. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for optional instructions when creating hierarchical world maps. * Imported game setups now preserve these instructions and use them when drafting maps. * Shared setup summaries now display the hierarchical map creation prompt. * **Bug Fixes** * Improved setup completion and import handling so map-drafting preferences are retained correctly. * **Validation** * Added validation for map creation instructions, including a 4,000-character limit and invalid-value handling. <!-- 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:07:01 +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#6094
No description provided.