[PR #6342] [MERGED] fix: background translations, tracker updates and connection controls #7142

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

📋 Pull Request Information

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

Base: staging ← Head: codex/sept19-issue-sweep


📝 Commits (3)

  • 58d30f9 Start September 19 issue sweep
  • 3a4cbb2 fix: resolve September issue reports and Claude cache controls
  • 6261505 fix: export unsaved connection cache duration

📊 Changes

16 files changed (+417 additions, -231 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
📝 docs/connections/subscription-clis.md (+8 -0)
📝 e2e/game-experience-setup.e2e.ts (+66 -0)
➕ e2e/subscription-cache.e2e.ts (+70 -0)
📝 e2e/translation-only.e2e.ts (+59 -1)
📝 packages/client/src/components/connections/ConnectionEditor.tsx (+25 -1)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+22 -193)
📝 packages/client/src/hooks/use-translate.ts (+9 -7)
📝 packages/client/src/localization/locales/en.json (+1 -0)
📝 packages/server/src/services/agents/agent-executor.ts (+8 -1)
📝 packages/server/src/services/llm/base-provider.ts (+1 -1)
📝 packages/server/src/services/llm/providers/claude-subscription.provider.ts (+33 -24)
📝 packages/shared/src/types/connection.ts (+1 -1)
📝 scripts/regressions/agent-context-generation.regression.ts (+2 -2)
📝 scripts/regressions/agent-runtime.regression.ts (+41 -0)
➕ scripts/regressions/claude-subscription-cache.regression.ts (+66 -0)

📄 Description

Linked issue

Closes #6337
Closes #6339
Closes #6340
Closes #6341

Why this change

Returning to a chat while its background translation is being saved can leave an older translation beside the regenerated source. Game Features uses switches with different thumb spacing, and Custom Tracker silently ignores the reported top-level incremental format. Claude Subscription also lacks an explicit one-hour cache option and assumes every cache write lasts five minutes.

What changed

  • Publish translations after their queued persistence finishes, so returning during the save cannot leave the old in-memory translation in control.
  • Reuse SettingsSwitchTrack throughout Game Features and expose the existing toggle states to assistive technology, removing duplicate switch markup.
  • Normalize top-level Custom Tracker increments into fields once in the shared response parser. Normal generation and retry keep the existing merge, removal and lock behavior.
  • Reuse anthropicExtendedCacheTtl for Claude Subscription and pass settings.promptCacheTtl: "1h" to the SDK. Unsaved exports keep the current toggle value. Off preserves Claude's account-dependent default. Log reported 5m/1h writes and leave the estimate unknown when the breakdown is missing or incomplete.

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

Implemented on 3a4cbb29c; export review correction on 626150541:

  • pnpm install --frozen-lockfile and pnpm check passed, including localization, formatting, lint, TypeScript and production builds.
  • The hosted complete Node lane passed 309/309 with zero failures on final commit 626150541. This includes real normal-generation/retry persistence and existing prompt/lock regressions. The initial local run overlapped a shared build; its eight missing-artifact failures all passed on focused reruns after that build completed.
  • pnpm smoke:ui e2e/translation-only.e2e.ts e2e/game-experience-setup.e2e.ts e2e/subscription-cache.e2e.ts --workers=2: 33 passed, covering desktop Chrome, mobile Chrome and mobile WebKit, light/dark themes, keyboard controls, save/reload, overlapping regenerations, inactive translation saves, widget locks and Experience setup compatibility.
  • Local CodeRabbit initially completed with zero findings across all 16 changed files. Hosted review found an unsaved-export gap, fixed in 626150541; pnpm check, the three-project export/save/reload browser pass and focused local CodeRabbit (zero findings) passed again. Hosted CodeRabbit completed its review of final commit 626150541 with no further findings. All 40 distinct hosted checks passed, including required checks, CodeQL, native platform builds and container checks. The full browser matrix finished with 1,086 passed, 246 skipped, zero failed and zero flaky cases across 12 shards; all three aggregate lanes passed.

Manual verification notes

Manually verify the translation/navigation flow and Game Features on the reporter's Windows/Firefox setup and a physical phone. Manually verify the cache toggle with a signed-in Claude subscription and observe cache reuse across a pause. SDK request/usage tests are mocked; no live paid requests or hour-long expiry test were performed.

Browser actions above were automated and their screenshots visually inspected. The local full ARM64 Docker image built on final commit 626150541 and passed scripts/smoke-container.mjs (API/frontend, native bindings, non-root runtime, clean shutdown and persistence after container replacement). Hosted platform/container checks also passed.

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
  • Version/release files updated (only if this PR includes a version bump)

Updated Unreleased entries, the canonical English UI catalog and docs/connections/subscription-clis.md. Translated documentation follow-up: #6344. No dependency, schema or version changes.

UI evidence (if applicable)

Regression logs, claim boundaries and 11 unedited screenshots/trace frames. Download and open marinara-sept19-ui-proof.html for the visual proof.


🔄 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/6342 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/18/2026 **Status:** ✅ Merged **Merged:** 9/19/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/sept19-issue-sweep` --- ### 📝 Commits (3) - [`58d30f9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/58d30f9850cadbc92bda7098b0eefe1fcc7d41b8) Start September 19 issue sweep - [`3a4cbb2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3a4cbb29c4f7afd74352bbece9a24de5e5da3fa5) fix: resolve September issue reports and Claude cache controls - [`6261505`](https://github.com/Pasta-Devs/Marinara-Engine/commit/626150541bf2240c8b9b1bc34ca2d06582b6ea98) fix: export unsaved connection cache duration ### 📊 Changes **16 files changed** (+417 additions, -231 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) 📝 `docs/connections/subscription-clis.md` (+8 -0) 📝 `e2e/game-experience-setup.e2e.ts` (+66 -0) ➕ `e2e/subscription-cache.e2e.ts` (+70 -0) 📝 `e2e/translation-only.e2e.ts` (+59 -1) 📝 `packages/client/src/components/connections/ConnectionEditor.tsx` (+25 -1) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+22 -193) 📝 `packages/client/src/hooks/use-translate.ts` (+9 -7) 📝 `packages/client/src/localization/locales/en.json` (+1 -0) 📝 `packages/server/src/services/agents/agent-executor.ts` (+8 -1) 📝 `packages/server/src/services/llm/base-provider.ts` (+1 -1) 📝 `packages/server/src/services/llm/providers/claude-subscription.provider.ts` (+33 -24) 📝 `packages/shared/src/types/connection.ts` (+1 -1) 📝 `scripts/regressions/agent-context-generation.regression.ts` (+2 -2) 📝 `scripts/regressions/agent-runtime.regression.ts` (+41 -0) ➕ `scripts/regressions/claude-subscription-cache.regression.ts` (+66 -0) </details> ### 📄 Description ## Linked issue Closes #6337 Closes #6339 Closes #6340 Closes #6341 ## Why this change Returning to a chat while its background translation is being saved can leave an older translation beside the regenerated source. Game Features uses switches with different thumb spacing, and Custom Tracker silently ignores the reported top-level incremental format. Claude Subscription also lacks an explicit one-hour cache option and assumes every cache write lasts five minutes. ## What changed - Publish translations after their queued persistence finishes, so returning during the save cannot leave the old in-memory translation in control. - Reuse `SettingsSwitchTrack` throughout Game Features and expose the existing toggle states to assistive technology, removing duplicate switch markup. - Normalize top-level Custom Tracker increments into `fields` once in the shared response parser. Normal generation and retry keep the existing merge, removal and lock behavior. - Reuse `anthropicExtendedCacheTtl` for Claude Subscription and pass `settings.promptCacheTtl: "1h"` to the SDK. Unsaved exports keep the current toggle value. Off preserves Claude's account-dependent default. Log reported 5m/1h writes and leave the estimate unknown when the breakdown is missing or incomplete. ## 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` Implemented on `3a4cbb29c`; export review correction on `626150541`: - `pnpm install --frozen-lockfile` and `pnpm check` passed, including localization, formatting, lint, TypeScript and production builds. - The hosted complete Node lane passed **309/309 with zero failures on final commit `626150541`**. This includes real normal-generation/retry persistence and existing prompt/lock regressions. The initial local run overlapped a shared build; its eight missing-artifact failures all passed on focused reruns after that build completed. - `pnpm smoke:ui e2e/translation-only.e2e.ts e2e/game-experience-setup.e2e.ts e2e/subscription-cache.e2e.ts --workers=2`: **33 passed**, covering desktop Chrome, mobile Chrome and mobile WebKit, light/dark themes, keyboard controls, save/reload, overlapping regenerations, inactive translation saves, widget locks and Experience setup compatibility. - Local CodeRabbit initially completed with **zero findings** across all 16 changed files. Hosted review found an unsaved-export gap, fixed in `626150541`; `pnpm check`, the three-project export/save/reload browser pass and focused local CodeRabbit (zero findings) passed again. Hosted CodeRabbit completed its review of final commit `626150541` with no further findings. All **40 distinct hosted checks passed**, including required checks, CodeQL, native platform builds and container checks. The full browser matrix finished with **1,086 passed, 246 skipped, zero failed and zero flaky** cases across 12 shards; all three aggregate lanes passed. ### Manual verification notes Manually verify the translation/navigation flow and Game Features on the reporter's Windows/Firefox setup and a physical phone. Manually verify the cache toggle with a signed-in Claude subscription and observe cache reuse across a pause. SDK request/usage tests are mocked; no live paid requests or hour-long expiry test were performed. Browser actions above were automated and their screenshots visually inspected. The local full ARM64 Docker image built on final commit `626150541` and passed `scripts/smoke-container.mjs` (API/frontend, native bindings, non-root runtime, clean shutdown and persistence after container replacement). Hosted platform/container checks also passed. ## 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 - [ ] Version/release files updated (only if this PR includes a version bump) Updated Unreleased entries, the canonical English UI catalog and `docs/connections/subscription-clis.md`. Translated documentation follow-up: #6344. No dependency, schema or version changes. ## UI evidence (if applicable) [Regression logs, claim boundaries and 11 unedited screenshots/trace frames](https://gist.github.com/SpicyMarinara/f3173d85a4a77510815f2250d6b72e4b). Download and open `marinara-sept19-ui-proof.html` for the visual proof. --- <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:55 +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#7142
No description provided.