[PR #5471] [MERGED] fix: address game, preset, and Termux issue sweep #6780

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5471
Author: @SpicyMarinara
Created: 8/24/2026
Status: ✅ Merged
Merged: 8/24/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/issue-sweep-5466-5470


📝 Commits (6)

  • f3b6cd3 fix(termux): reduce automatic mobile heap pressure
  • 9ac0df3 fix: address game and preset issue sweep
  • 88edeb9 test(game): preserve disabled quick time events
  • cf0bc34 docs: clarify game connection error release note
  • 6f4d3d2 fix: address issue sweep review findings
  • 19aad79 test: tighten issue sweep edge cases

📊 Changes

16 files changed (+329 additions, -17 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+47 -0)
📝 packages/client/src/lib/game-setup-share.ts (+2 -0)
📝 packages/client/src/localization/locales/en.json (+2 -0)
📝 packages/server/src/routes/backup.routes.ts (+18 -0)
📝 packages/server/src/routes/game.routes.ts (+16 -6)
📝 packages/server/src/routes/generate.routes.ts (+1 -0)
📝 packages/server/src/services/game/gm-prompts.ts (+8 -1)
📝 packages/server/src/services/game/initial-game-setup.ts (+70 -0)
📝 packages/server/src/services/generation/game-gm-prompt-runtime.ts (+1 -0)
📝 packages/shared/src/types/game.ts (+2 -0)
📝 scripts/regressions/assigned-issue-sweep.regression.ts (+70 -0)
📝 scripts/regressions/launcher/format-guard.regression.mjs (+33 -3)
📝 scripts/regressions/open-issues.regression.ts (+14 -4)
📝 scripts/regressions/profile-import-data-security.regression.ts (+38 -0)
📝 start-termux.sh (+3 -3)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issues

Closes #5466
Closes #5467
Closes #5469
Closes #5470

Why this change

  • Game setup should explain unreachable GM connections instead of leaking a generic server error.
  • Players using assistive technology need to disable Quick Time Events without changing their story prompt.
  • Imported copies of the protected Universal Preset must not become undeletable duplicates.
  • Termux installs need a conservative background runtime that is less likely to be killed under Android memory pressure.

What changed

  • Classify initial GM provider failures as refused, unreachable, timed out, or another connection error and return actionable 502/504 messages.
  • Add an on-by-default Quick Time Events switch to Game Setup; an explicit off value removes the QTE command from the GM prompt and survives setup export/import.
  • Preserve the local canonical Universal Preset system key while importing foreign copies as ordinary editable presets.
  • Lower only Termux's automatic Node heap ceiling from 2 GB to 1 GB while preserving explicit NODE_OPTIONS overrides.

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 evidence

  • pnpm check
  • scripts/regressions/assigned-issue-sweep.regression.ts
  • scripts/regressions/profile-import-data-security.regression.ts
  • scripts/regressions/launcher/format-guard.regression.mjs

Manual verification requested

  • Create a Game chat with a refused, unreachable, and slow GM endpoint and verify the setup dialog displays the returned guidance.
  • Toggle Quick Time Events off in Game Setup, export/import that setup, and verify the choice remains off.
  • Import a profile containing the Universal Preset twice and verify imported copies can be deleted while the local stock preset remains protected.
  • Run a Termux install in the background on a physical Android device and inspect its durable launcher log if the OS terminates it.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] <paths> follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • The Quick Time Events control reuses the existing Game Features toggle card and theme tokens at desktop and mobile widths.

Summary by CodeRabbit

  • New Features

    • Added an optional Quick Time Events setting during game setup, enabled by default and preserved when sharing or importing setups.
    • Disabled Quick Time Events remove related GM commands and prompts.
  • Bug Fixes

    • Imported Universal Preset copies can now be edited and deleted independently.
    • Game setup provides actionable messages when GM connections fail.
    • Termux uses a 1 GB default memory limit while respecting explicit overrides.
  • Tests

    • Added regression coverage for these updates.

🔄 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/5471 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/24/2026 **Status:** ✅ Merged **Merged:** 8/24/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/issue-sweep-5466-5470` --- ### 📝 Commits (6) - [`f3b6cd3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f3b6cd3941f797143f489c99a4aec3eaa0a20e34) fix(termux): reduce automatic mobile heap pressure - [`9ac0df3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9ac0df39e094e8ba0f516c2de0f173a53f6dea2c) fix: address game and preset issue sweep - [`88edeb9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/88edeb9017bc2e9994663f6f898a509d3b931894) test(game): preserve disabled quick time events - [`cf0bc34`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cf0bc34757b91be07bb3ea4cd18e46987f691074) docs: clarify game connection error release note - [`6f4d3d2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6f4d3d2407447d05a0883edce6514dcd8b685900) fix: address issue sweep review findings - [`19aad79`](https://github.com/Pasta-Devs/Marinara-Engine/commit/19aad79b899531c274e48a5da9ae1fc99a1b047a) test: tighten issue sweep edge cases ### 📊 Changes **16 files changed** (+329 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+47 -0) 📝 `packages/client/src/lib/game-setup-share.ts` (+2 -0) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) 📝 `packages/server/src/routes/backup.routes.ts` (+18 -0) 📝 `packages/server/src/routes/game.routes.ts` (+16 -6) 📝 `packages/server/src/routes/generate.routes.ts` (+1 -0) 📝 `packages/server/src/services/game/gm-prompts.ts` (+8 -1) 📝 `packages/server/src/services/game/initial-game-setup.ts` (+70 -0) 📝 `packages/server/src/services/generation/game-gm-prompt-runtime.ts` (+1 -0) 📝 `packages/shared/src/types/game.ts` (+2 -0) 📝 `scripts/regressions/assigned-issue-sweep.regression.ts` (+70 -0) 📝 `scripts/regressions/launcher/format-guard.regression.mjs` (+33 -3) 📝 `scripts/regressions/open-issues.regression.ts` (+14 -4) 📝 `scripts/regressions/profile-import-data-security.regression.ts` (+38 -0) 📝 `start-termux.sh` (+3 -3) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issues Closes #5466 Closes #5467 Closes #5469 Closes #5470 ## Why this change - Game setup should explain unreachable GM connections instead of leaking a generic server error. - Players using assistive technology need to disable Quick Time Events without changing their story prompt. - Imported copies of the protected Universal Preset must not become undeletable duplicates. - Termux installs need a conservative background runtime that is less likely to be killed under Android memory pressure. ## What changed - Classify initial GM provider failures as refused, unreachable, timed out, or another connection error and return actionable 502/504 messages. - Add an on-by-default Quick Time Events switch to Game Setup; an explicit off value removes the QTE command from the GM prompt and survives setup export/import. - Preserve the local canonical Universal Preset system key while importing foreign copies as ordinary editable presets. - Lower only Termux's automatic Node heap ceiling from 2 GB to 1 GB while preserving explicit `NODE_OPTIONS` overrides. ## 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 evidence - `pnpm check` - `scripts/regressions/assigned-issue-sweep.regression.ts` - `scripts/regressions/profile-import-data-security.regression.ts` - `scripts/regressions/launcher/format-guard.regression.mjs` ### Manual verification requested - Create a Game chat with a refused, unreachable, and slow GM endpoint and verify the setup dialog displays the returned guidance. - Toggle Quick Time Events off in Game Setup, export/import that setup, and verify the choice remains off. - Import a profile containing the Universal Preset twice and verify imported copies can be deleted while the local stock preset remains protected. - Run a Termux install in the background on a physical Android device and inspect its durable launcher log if the OS terminates it. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n] <paths>` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - The Quick Time Events control reuses the existing Game Features toggle card and theme tokens at desktop and mobile widths. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an optional Quick Time Events setting during game setup, enabled by default and preserved when sharing or importing setups. * Disabled Quick Time Events remove related GM commands and prompts. * **Bug Fixes** * Imported Universal Preset copies can now be edited and deleted independently. * Game setup provides actionable messages when GM connections fail. * Termux uses a 1 GB default memory limit while respecting explicit overrides. * **Tests** * Added regression coverage for these updates. <!-- 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:13:38 +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#6780
No description provided.