[PR #3479] [MERGED] Allow sharing initial Game Mode setup after play begins #5958

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

📋 Pull Request Information

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

Base: staging ← Head: codex/3478-share-game-setup


📝 Commits (4)

  • 8f6604c Add shareable initial Game Mode setup
  • fe37179 Merge staging into setup-sharing branch
  • 2f3191f Delete start-e377a9df.bat
  • 610ffa6 Address setup-sharing review feedback

📊 Changes

14 files changed (+812 additions, -382 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/game/sessions-and-saves.md (+15 -1)
📝 packages/client/src/components/game/GameSessionHistory.tsx (+37 -1)
➕ packages/client/src/components/game/GameSetupSummary.tsx (+202 -0)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+20 -1)
📝 packages/client/src/components/game/GameSurface.tsx (+73 -54)
📝 packages/client/src/hooks/use-game.ts (+3 -0)
➕ packages/client/src/lib/game-setup-share.ts (+271 -0)
📝 packages/server/src/routes/game.routes.ts (+75 -7)
➕ packages/server/src/services/game/initial-game-setup.ts (+6 -0)
📝 packages/shared/src/types/chat.ts (+2 -0)
📝 packages/shared/src/types/game.ts (+34 -0)
📝 scripts/regressions/open-issues.regression.ts (+73 -0)
➖ start-e377a9df.bat (+0 -318)

📄 Description

Linked issue

Closes #3478

Why this change

  • Players can recognize a strong Game Mode configuration only after playing it, but the setup wizard is no longer accessible after campaign creation.
  • Manually recording every field before play defeats the desired play-first, share-later workflow.
  • Chat JSONL exports are broad campaign backups with story state and local identifiers, not a focused or privacy-safe setup-sharing format.

What changed

  • Captured an immutable initial setup snapshot when a new Game Mode campaign is created.
  • Retained free-text preferences, safe connection/model descriptions, creation-time resource names, and effective merged generation parameters.
  • Added an expandable Initial Game Setup section to Session History after play begins.
  • Added Copy setup and Download .txt actions for the readable setup.
  • Included adventure, cast, prompts, models, parameters, visual/storyboard settings, lorebooks, music, and custom HUD configuration.
  • Excluded credentials, server URLs, and raw local database IDs from the readable output.
  • Kept older campaigns without trustworthy snapshots from presenting incomplete settings as complete.
  • Documented the workflow and added regression coverage for completeness and ID removal.
  • Lazy-loaded the setup wizard so the GameSurface bundle remains within budget.

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

Automated evidence gathered while preparing this draft:

  • pnpm check passed for the core implementation, including TypeScript, ESLint, production builds, and bundle budgets.
  • pnpm regression:issues passed, including the new setup-sharing assertions.
  • pnpm --filter @marinara-engine/client lint passed after the final .txt download change.
  • pnpm build:client passed after the final .txt download change.
  • UI smoke reached all 38 tests: 22 passed, 13 were skipped, and 3 unrelated Noodle/topbar tests failed after repeated HTTP 429 rate-limit responses. Game Session History smoke coverage passed.

Manual verification still required before marking this PR ready:

  1. Create a new Game Mode campaign with custom preferences, models, parameters, visuals, lorebooks, and HUD settings.
  2. After setup completes, open Session > Session History > Initial Game Setup.
  3. Confirm the on-screen summary matches the creation choices.
  4. Confirm Copy setup places the readable setup on the clipboard.
  5. Confirm Download .txt saves a UTF-8 file named from the campaign.
  6. Review the downloaded text and confirm it contains no API keys, URLs, or raw local IDs.
  7. Check the action row in light and dark themes at desktop and mobile widths.

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)

Documentation and CHANGELOG.md updates are included in the patch. No version bump is included.

UI evidence (if applicable)

Not attached yet. Add a screenshot or recording of the expanded Initial Game Setup section before marking the PR ready for review.

Summary by CodeRabbit

  • New Features

    • Added an Initial Game Setup section to Game Mode Session History.
    • Review, copy, or download the original campaign setup as a .txt file.
    • Setup summaries include preferences, prompts, visual options, generation settings, and safe model details.
    • Sensitive credentials and local identifiers are excluded from shared setup information.
  • Documentation

    • Added guidance for viewing and sharing saved setup snapshots.
    • Clarified availability limitations for campaigns created before setup snapshots were introduced.

🔄 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/3479 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/11/2026 **Status:** ✅ Merged **Merged:** 7/11/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/3478-share-game-setup` --- ### 📝 Commits (4) - [`8f6604c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8f6604c77f2aed72ca2f7427bc24cbd2161f0387) Add shareable initial Game Mode setup - [`fe37179`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fe371796288b1e01fd7e2936b4e336e13295a08c) Merge staging into setup-sharing branch - [`2f3191f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2f3191f68e22ebac3196dd00ad6d203087103414) Delete start-e377a9df.bat - [`610ffa6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/610ffa6c4edc54383f827e5224b4b3c9fe34e454) Address setup-sharing review feedback ### 📊 Changes **14 files changed** (+812 additions, -382 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/game/sessions-and-saves.md` (+15 -1) 📝 `packages/client/src/components/game/GameSessionHistory.tsx` (+37 -1) ➕ `packages/client/src/components/game/GameSetupSummary.tsx` (+202 -0) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+20 -1) 📝 `packages/client/src/components/game/GameSurface.tsx` (+73 -54) 📝 `packages/client/src/hooks/use-game.ts` (+3 -0) ➕ `packages/client/src/lib/game-setup-share.ts` (+271 -0) 📝 `packages/server/src/routes/game.routes.ts` (+75 -7) ➕ `packages/server/src/services/game/initial-game-setup.ts` (+6 -0) 📝 `packages/shared/src/types/chat.ts` (+2 -0) 📝 `packages/shared/src/types/game.ts` (+34 -0) 📝 `scripts/regressions/open-issues.regression.ts` (+73 -0) ➖ `start-e377a9df.bat` (+0 -318) </details> ### 📄 Description ## Linked issue Closes #3478 ## Why this change - Players can recognize a strong Game Mode configuration only after playing it, but the setup wizard is no longer accessible after campaign creation. - Manually recording every field before play defeats the desired play-first, share-later workflow. - Chat JSONL exports are broad campaign backups with story state and local identifiers, not a focused or privacy-safe setup-sharing format. ## What changed - Captured an immutable initial setup snapshot when a new Game Mode campaign is created. - Retained free-text preferences, safe connection/model descriptions, creation-time resource names, and effective merged generation parameters. - Added an expandable **Initial Game Setup** section to Session History after play begins. - Added **Copy setup** and **Download .txt** actions for the readable setup. - Included adventure, cast, prompts, models, parameters, visual/storyboard settings, lorebooks, music, and custom HUD configuration. - Excluded credentials, server URLs, and raw local database IDs from the readable output. - Kept older campaigns without trustworthy snapshots from presenting incomplete settings as complete. - Documented the workflow and added regression coverage for completeness and ID removal. - Lazy-loaded the setup wizard so the GameSurface bundle remains within budget. ## 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` ### Manual verification notes Automated evidence gathered while preparing this draft: - `pnpm check` passed for the core implementation, including TypeScript, ESLint, production builds, and bundle budgets. - `pnpm regression:issues` passed, including the new setup-sharing assertions. - `pnpm --filter @marinara-engine/client lint` passed after the final `.txt` download change. - `pnpm build:client` passed after the final `.txt` download change. - UI smoke reached all 38 tests: 22 passed, 13 were skipped, and 3 unrelated Noodle/topbar tests failed after repeated HTTP 429 rate-limit responses. Game Session History smoke coverage passed. Manual verification still required before marking this PR ready: 1. Create a new Game Mode campaign with custom preferences, models, parameters, visuals, lorebooks, and HUD settings. 2. After setup completes, open **Session > Session History > Initial Game Setup**. 3. Confirm the on-screen summary matches the creation choices. 4. Confirm **Copy setup** places the readable setup on the clipboard. 5. Confirm **Download .txt** saves a UTF-8 file named from the campaign. 6. Review the downloaded text and confirm it contains no API keys, URLs, or raw local IDs. 7. Check the action row in light and dark themes at desktop and mobile widths. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) Documentation and `CHANGELOG.md` updates are included in the patch. No version bump is included. ## UI evidence (if applicable) Not attached yet. Add a screenshot or recording of the expanded **Initial Game Setup** section before marking the PR ready for review. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an **Initial Game Setup** section to Game Mode Session History. * Review, copy, or download the original campaign setup as a `.txt` file. * Setup summaries include preferences, prompts, visual options, generation settings, and safe model details. * Sensitive credentials and local identifiers are excluded from shared setup information. * **Documentation** * Added guidance for viewing and sharing saved setup snapshots. * Clarified availability limitations for campaigns created before setup snapshots were introduced. <!-- 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:05:36 +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#5958
No description provided.