[PR #6168] [MERGED] fix: resolve September issue sweep across chat, Game, and launchers #7071

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6168
Author: @SpicyMarinara
Created: 9/13/2026
Status: ✅ Merged
Merged: 9/13/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/iphone-tts-message-controls


📝 Commits (6)

  • 1a0dbcf chore: track iPhone TTS and message control fixes
  • 14ec886 fix: address chat, Game, image, and launcher issue sweep
  • a52ad5f Merge remote-tracking branch 'origin/staging' into fix/iphone-tts-message-controls
  • 131dd72 fix: preserve distinct dice results and isolate Swarm downloads
  • c27bdf4 test: exercise initialized Game settings and scoped audio policy
  • 22c49ba docs: clarify unresolved dice checks do not require a rewrite

📊 Changes

49 files changed (+1899 additions, -278 deletions)

View changed files

📝 CHANGELOG.md (+19 -0)
📝 docs/TROUBLESHOOTING.md (+1 -1)
📝 docs/game/dice-and-skill-checks.md (+3 -1)
📝 e2e/chat-sweep.e2e.ts (+114 -0)
📝 e2e/core-flows.e2e.ts (+61 -0)
➕ e2e/image-custom-parameters.e2e.ts (+89 -0)
➕ e2e/tts-mobile-playback.e2e.ts (+150 -0)
📝 packages/client/src/components/chat/ChatMessage.tsx (+48 -62)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+4 -0)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+21 -0)
📝 packages/client/src/components/panels/settings/TTSConfigCard.tsx (+1 -0)
📝 packages/client/src/components/ui/GenerationParametersEditor.tsx (+22 -13)
📝 packages/client/src/features/chat-settings/sections/FunctionCallingSection.tsx (+13 -0)
📝 packages/client/src/lib/game-audio.ts (+1 -2)
➕ packages/client/src/lib/silent-audio.ts (+3 -0)
📝 packages/client/src/lib/tts-service.ts (+72 -26)
📝 packages/client/src/localization/locales/en.json (+4 -0)
📝 packages/server/src/routes/game.routes.ts (+31 -11)
📝 packages/server/src/routes/generate.routes.ts (+83 -69)
📝 packages/server/src/services/capability-packages/capability-gm-verb-runtime.service.ts (+6 -2)

...and 29 more files

📄 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 issue

Closes #6167
Closes #6166
Closes #6157
Closes #6156
Closes #6155
Closes #6154
Closes #6153
Closes #6152
Closes #6151
Closes #6150
Closes #6149
Closes #6148
Closes #6147
Closes #6146
Closes #6145
Closes #6144
Closes #6143

Why this change

Several Game paths could spend an unnecessary request, lose real dice results, or distort the narrator prompt. Concurrent lorebook updates could undo a user's switch, and world generation could silently omit selected lore. On iPhone, delayed voice generation lost the audio element's tap permission and the volume popup extended beyond the screen.

What changed

  • Reuse one tap-primed audio element for TTS, retain bounded playback recovery and cancellation, and position the line-volume popup through the existing message-menu helper.
  • Reuse the custom JSON editor and saved connection parameters for image API fields such as NanoGPT LoRAs. Merge fields into generation bodies only; preserve headers, polling requests, and fallback connection isolation.
  • Keep Game tool-planner instructions in the final conversation turn, preserve narrator prefills and formatting, skip separate planning on Continue, and prevent duplicate local-tool advertising or planner finish reasons leaking into narration.
  • Include real native and text-command dice results in outcome rewrites. Add the default-on Narrate dice outcomes immediately switch under Chat Settings → Function Calling, explain its extra context/token cost, and skip rewrites when nothing rolled.
  • Show the actual validation refusal for package-command-only replies. No extra repair generation is introduced.
  • Apply lorebook runtime deltas through the existing metadata queue, retaining newer toggles/resets and deletion/detach cleanup. Location-reserve declines still allow independent keyword, sticky, or recursive activation.
  • Reserve world-generation context for response schemas. Preserve full macro-expanded selections or reject them before a provider call, and exclude blank legacy outlets from included-entry counts.
  • Preserve a clean server exit code and use the existing restart supervisor from start-local.bat.
  • Refuse SwarmUI video output URLs outside the configured server before sending its authentication cookie; preserve existing credential stripping on redirects.
  • Extend Storyboard's existing single local retry to explicitly local proxied connections and report empty final output or exhausted output budgets. Refs #6165: the retry gap and diagnostics are fixed, but the reported local-model failure itself remains unconfirmed without its raw output.

No new dependency or storage migration. Canonical UI copy is localized. Changelog and relevant English docs are updated.

Companion work:

  • #6164 preserves the contributor's CJK changes and is already merged into staging.
  • #6169 is merged into docs-i18n, updating the translated Advanced Memory, dice, and restart docs; #6163 is closed.
  • Pasta-Devs/Marinara-Agents#842 is merged into Agents staging with Calls 1.0.16 and closes #6158. No downloadable agent code is copied into Engine; update the installed Calls package to receive that fix.

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 validation

Focused before/after regressions reproduce launcher exit/restart, lorebook concurrency/location activation, world schema/macro/outlet inclusion, Game planner request shaping and dice-request count, and TTS priming. Fixed-path regressions pass. Provider fixtures inspect actual outbound payloads without paid generation.

  • pnpm check passes on the integrated staging base, including localization, formatting, lint, type checks, and client/server builds. Final browser-fixture type and formatting checks also pass.
  • pnpm regression:prompt passes. Focused world/schema/macro/outlet, lorebook concurrency/location, Game planner/dice/refusal, image request/fallback, launcher, and TTS regressions pass. A coincident-roll control verifies that independently rolled dice are retained even when their numbers match.
  • Twelve focused browser checks pass: volume placement/action colors, delayed TTS playback, image-parameter validation/save/export/copy, and the Game narration switch across desktop Chromium, mobile Chromium, and mobile WebKit. Screenshots inspected.
  • The browser fixtures now initialize an active Game session and use its mobile Game actions menu, commit JSON with the editor's actual shortcut (Tab indents), and distinguish muted media from audible autoplay permission. No product behavior was weakened to make them pass.
  • Swarm output-origin and cross-origin redirect fixtures pass: same-server and inline MP4s work; foreign direct URLs never receive the cookie and redirects strip it through existing safeFetch handling.

All hosted checks pass at 22c49ba6c9a21c5131eb759e2d5791a43279d697: validation/build, container, Windows launchers, CodeQL, 268/268 Node regression files, and 868 browser checks across all ten desktop Chromium, mobile Chromium, and mobile WebKit shards. CodeRabbit completed the full implementation review and final four-file follow-up with no actionable findings; no review threads remain unresolved.

Manual verification needed

  • Manually verify generated and cached voice lines on the affected physical iPhone Home Screen app, including stop and subsequent clips.
  • Manually verify the volume slider and message action reveal with the user's Chroma settings.
  • Manually retry the reported Gemma/Kobold storyboard configuration and provide redacted output/finish details if it still fails (#6165).

Browser playback proof uses an explicit per-element autoplay-policy fixture. It checks the delayed-synthesis control flow, not audible playback on physical iOS. The original white-highlight report did not reproduce in the touch baseline; existing action-color behavior is asserted rather than broadly overridden. Local-model hardware and paid provider behavior remain external validation boundaries.

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] 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)

Verified screenshot gallery contains synthetic fixture evidence: mobile WebKit volume before/after, desktop light and mobile dark image parameters, and mobile voice playback. The gallery states the physical-iPhone limitation explicitly.

Before: volume clipped After: volume remains within the viewport
Clipped volume popup Clamped volume popup

Summary by CodeRabbit

  • New Features

    • Image-generation connections now support custom JSON parameters.
    • Game chats include a setting to disable immediate dice-outcome narration.
    • TTS playback is more reliable across delayed responses and mobile interactions.
  • Bug Fixes

    • Improved lorebook state preservation, context budgeting, and Storyboard retries.
    • Fixed SwarmUI video downloads involving external URLs.
    • Improved shutdown/restart behavior and clearer messages for refused game commands.
    • Corrected mobile TTS volume controls and audio playback cleanup.
    • Unsupported dice requests now remain open without triggering extra narration.
  • Documentation

    • Added guidance for dice narration settings and local server restart troubleshooting.

🔄 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/6168 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/13/2026 **Status:** ✅ Merged **Merged:** 9/13/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/iphone-tts-message-controls` --- ### 📝 Commits (6) - [`1a0dbcf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1a0dbcf3318d157cbd49315853e3a18b287c7fd1) chore: track iPhone TTS and message control fixes - [`14ec886`](https://github.com/Pasta-Devs/Marinara-Engine/commit/14ec886cdd5ed10c5847afcc0be77bc580a0c507) fix: address chat, Game, image, and launcher issue sweep - [`a52ad5f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a52ad5feae18f2c0a49aaf738a8d4bcec8789839) Merge remote-tracking branch 'origin/staging' into fix/iphone-tts-message-controls - [`131dd72`](https://github.com/Pasta-Devs/Marinara-Engine/commit/131dd7205a7ce754eba1eac425d838b37d62ff3a) fix: preserve distinct dice results and isolate Swarm downloads - [`c27bdf4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c27bdf4df5bc3572ed2603c5e86487b7763c2978) test: exercise initialized Game settings and scoped audio policy - [`22c49ba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/22c49ba6c9a21c5131eb759e2d5791a43279d697) docs: clarify unresolved dice checks do not require a rewrite ### 📊 Changes **49 files changed** (+1899 additions, -278 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+19 -0) 📝 `docs/TROUBLESHOOTING.md` (+1 -1) 📝 `docs/game/dice-and-skill-checks.md` (+3 -1) 📝 `e2e/chat-sweep.e2e.ts` (+114 -0) 📝 `e2e/core-flows.e2e.ts` (+61 -0) ➕ `e2e/image-custom-parameters.e2e.ts` (+89 -0) ➕ `e2e/tts-mobile-playback.e2e.ts` (+150 -0) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+48 -62) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+4 -0) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+21 -0) 📝 `packages/client/src/components/panels/settings/TTSConfigCard.tsx` (+1 -0) 📝 `packages/client/src/components/ui/GenerationParametersEditor.tsx` (+22 -13) 📝 `packages/client/src/features/chat-settings/sections/FunctionCallingSection.tsx` (+13 -0) 📝 `packages/client/src/lib/game-audio.ts` (+1 -2) ➕ `packages/client/src/lib/silent-audio.ts` (+3 -0) 📝 `packages/client/src/lib/tts-service.ts` (+72 -26) 📝 `packages/client/src/localization/locales/en.json` (+4 -0) 📝 `packages/server/src/routes/game.routes.ts` (+31 -11) 📝 `packages/server/src/routes/generate.routes.ts` (+83 -69) 📝 `packages/server/src/services/capability-packages/capability-gm-verb-runtime.service.ts` (+6 -2) _...and 29 more files_ </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`. <!-- See CONTRIBUTING.md § Branches. --> ## 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 #6167 Closes #6166 Closes #6157 Closes #6156 Closes #6155 Closes #6154 Closes #6153 Closes #6152 Closes #6151 Closes #6150 Closes #6149 Closes #6148 Closes #6147 Closes #6146 Closes #6145 Closes #6144 Closes #6143 ## Why this change Several Game paths could spend an unnecessary request, lose real dice results, or distort the narrator prompt. Concurrent lorebook updates could undo a user's switch, and world generation could silently omit selected lore. On iPhone, delayed voice generation lost the audio element's tap permission and the volume popup extended beyond the screen. ## What changed - Reuse one tap-primed audio element for TTS, retain bounded playback recovery and cancellation, and position the line-volume popup through the existing message-menu helper. - Reuse the custom JSON editor and saved connection parameters for image API fields such as NanoGPT LoRAs. Merge fields into generation bodies only; preserve headers, polling requests, and fallback connection isolation. - Keep Game tool-planner instructions in the final conversation turn, preserve narrator prefills and formatting, skip separate planning on Continue, and prevent duplicate local-tool advertising or planner finish reasons leaking into narration. - Include real native and text-command dice results in outcome rewrites. Add the default-on **Narrate dice outcomes immediately** switch under Chat Settings → Function Calling, explain its extra context/token cost, and skip rewrites when nothing rolled. - Show the actual validation refusal for package-command-only replies. No extra repair generation is introduced. - Apply lorebook runtime deltas through the existing metadata queue, retaining newer toggles/resets and deletion/detach cleanup. Location-reserve declines still allow independent keyword, sticky, or recursive activation. - Reserve world-generation context for response schemas. Preserve full macro-expanded selections or reject them before a provider call, and exclude blank legacy outlets from included-entry counts. - Preserve a clean server exit code and use the existing restart supervisor from `start-local.bat`. - Refuse SwarmUI video output URLs outside the configured server before sending its authentication cookie; preserve existing credential stripping on redirects. - Extend Storyboard's existing single local retry to explicitly local proxied connections and report empty final output or exhausted output budgets. **Refs #6165: the retry gap and diagnostics are fixed, but the reported local-model failure itself remains unconfirmed without its raw output.** No new dependency or storage migration. Canonical UI copy is localized. Changelog and relevant English docs are updated. Companion work: - #6164 preserves the contributor's CJK changes and is already merged into staging. - #6169 is merged into `docs-i18n`, updating the translated Advanced Memory, dice, and restart docs; #6163 is closed. - Pasta-Devs/Marinara-Agents#842 is merged into Agents staging with Calls 1.0.16 and closes #6158. No downloadable agent code is copied into Engine; update the installed Calls package to receive that fix. ## 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` ### Automated validation Focused before/after regressions reproduce launcher exit/restart, lorebook concurrency/location activation, world schema/macro/outlet inclusion, Game planner request shaping and dice-request count, and TTS priming. Fixed-path regressions pass. Provider fixtures inspect actual outbound payloads without paid generation. - `pnpm check` passes on the integrated staging base, including localization, formatting, lint, type checks, and client/server builds. Final browser-fixture type and formatting checks also pass. - `pnpm regression:prompt` passes. Focused world/schema/macro/outlet, lorebook concurrency/location, Game planner/dice/refusal, image request/fallback, launcher, and TTS regressions pass. A coincident-roll control verifies that independently rolled dice are retained even when their numbers match. - Twelve focused browser checks pass: volume placement/action colors, delayed TTS playback, image-parameter validation/save/export/copy, and the Game narration switch across desktop Chromium, mobile Chromium, and mobile WebKit. Screenshots inspected. - The browser fixtures now initialize an active Game session and use its mobile Game actions menu, commit JSON with the editor's actual shortcut (Tab indents), and distinguish muted media from audible autoplay permission. No product behavior was weakened to make them pass. - Swarm output-origin and cross-origin redirect fixtures pass: same-server and inline MP4s work; foreign direct URLs never receive the cookie and redirects strip it through existing safeFetch handling. All hosted checks pass at `22c49ba6c9a21c5131eb759e2d5791a43279d697`: validation/build, container, Windows launchers, CodeQL, 268/268 Node regression files, and 868 browser checks across all ten desktop Chromium, mobile Chromium, and mobile WebKit shards. CodeRabbit completed the full implementation review and final four-file follow-up with no actionable findings; no review threads remain unresolved. ### Manual verification needed - [ ] Manually verify generated and cached voice lines on the affected physical iPhone Home Screen app, including stop and subsequent clips. - [ ] Manually verify the volume slider and message action reveal with the user's Chroma settings. - [ ] Manually retry the reported Gemma/Kobold storyboard configuration and provide redacted output/finish details if it still fails (#6165). Browser playback proof uses an explicit per-element autoplay-policy fixture. It checks the delayed-synthesis control flow, not audible playback on physical iOS. The original white-highlight report did not reproduce in the touch baseline; existing action-color behavior is asserted rather than broadly overridden. Local-model hardware and paid provider behavior remain external validation boundaries. ## 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]` 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) [Verified screenshot gallery](https://gist.github.com/SpicyMarinara/a726e3f36bda2d22ce203768017772ce) contains synthetic fixture evidence: mobile WebKit volume before/after, desktop light and mobile dark image parameters, and mobile voice playback. The gallery states the physical-iPhone limitation explicitly. | Before: volume clipped | After: volume remains within the viewport | | --- | --- | | ![Clipped volume popup](https://gist.githubusercontent.com/SpicyMarinara/a726e3f36bda2d22ce203768017772ce/raw/01-volume-before-mobile-webkit.png) | ![Clamped volume popup](https://gist.githubusercontent.com/SpicyMarinara/a726e3f36bda2d22ce203768017772ce/raw/02-volume-after-mobile-webkit.png) | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Image-generation connections now support custom JSON parameters. * Game chats include a setting to disable immediate dice-outcome narration. * TTS playback is more reliable across delayed responses and mobile interactions. * **Bug Fixes** * Improved lorebook state preservation, context budgeting, and Storyboard retries. * Fixed SwarmUI video downloads involving external URLs. * Improved shutdown/restart behavior and clearer messages for refused game commands. * Corrected mobile TTS volume controls and audio playback cleanup. * Unsupported dice requests now remain open without triggering extra narration. * **Documentation** * Added guidance for dice narration settings and local server restart troubleshooting. <!-- 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:16:17 +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#7071
No description provided.