[PR #5939] [MERGED] Issue Sweep: chat translation, guidance and notifications #6999

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

📋 Pull Request Information

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

Base: staging ← Head: fix/issue-sweep-chat-ux-sep7


📝 Commits (8)

  • c6f51ab chore: claim remaining chat issue sweep
  • 07827a3 chore: claim capability documentation issue
  • 53f0940 fix: sweep game translations, prompt guidance and notifications
  • b9b95e8 Merge remote-tracking branch 'origin/staging' into fix/issue-sweep-chat-ux-sep7
  • 1387a0c fix: complete translation hydration and settings search coverage
  • 124dab1 Merge remote-tracking branch 'origin/staging' into fix/issue-sweep-chat-ux-sep7
  • ebccfb2 Merge remote-tracking branch 'origin/staging' into fix/issue-sweep-chat-ux-sep7
  • c4362f0 fix(translation): keep delayed results scoped to their chat

📊 Changes

24 files changed (+653 additions, -66 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
➕ e2e/chat-sweep.e2e.ts (+216 -0)
📝 packages/client/src/App.tsx (+3 -2)
📝 packages/client/src/components/chat/ChatArea.tsx (+1 -0)
📝 packages/client/src/components/game/GameNarration.tsx (+90 -15)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+28 -0)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+25 -0)
📝 packages/client/src/hooks/use-chats.ts (+1 -1)
📝 packages/client/src/hooks/use-translate.ts (+28 -8)
📝 packages/client/src/localization/locales/en.json (+5 -0)
📝 packages/client/src/stores/translation.store.ts (+1 -0)
📝 packages/client/src/stores/ui.store.ts (+6 -0)
📝 packages/server/src/routes/game.routes.ts (+51 -25)
📝 packages/server/src/routes/generate.routes.ts (+1 -1)
📝 packages/server/src/services/game/storyboard-planner-fallback.ts (+22 -0)
📝 packages/server/src/services/generation/runtime-agent-sections.ts (+6 -6)
📝 packages/server/src/services/professor-mari/workspace-agent.service.ts (+10 -0)
📝 packages/shared/src/constants/game-storyboard-prompts.ts (+3 -2)
📝 packages/shared/src/features/agents/storyboard-agent-settings.ts (+2 -1)
📝 packages/shared/src/types/game.ts (+3 -0)

...and 4 more files

📄 Description

Linked issue

Closes #5888
Closes #5886
Closes #5931
Closes #5932
Closes #5933

Why this change

These assigned reports have no existing open/draft implementation PR. Game translations were stale after changed narration and inaccessible in the active panel; preset placement lost explicit Push Story direction; local Mari chat templates rejected trailing system context. Storyboard's hard-coded six-frame truncation and unusable local planner responses also prevented requested output. Notifications needed a saved location preference.

What changed

  • Reuse existing translation controls in Game's active narration and readable notes/books, suppress stale translations, and translate each completed source at most once automatically. Wait for the current chat's translation configuration, retain hidden saved translations on reload, and add opt-in translation to Game setup.
  • Preserve fresh Director output at preset markers or the normal fallback when a preset has no marker.
  • Combine Mari's trusted system context into one leading message before every command round, without rewriting stored chat history.
  • Remove Storyboard's six-frame truncation. Keep the existing 200-section request safety ceiling, scale planner output budget, and retry unusable local planner output once without reasoning. Remote providers and transport/cancellation failures are not retried.
  • Add a saved, searchable top/bottom preference for the existing notification stack in General Settings.

Validation

Executed: pnpm check; pnpm localization:check; pnpm regression:prompt (three lanes); pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/chat-sweep.regression.ts; pnpm exec playwright test e2e/chat-sweep.e2e.ts --workers=1 (6/6 across desktop Chromium, mobile Chromium, mobile WebKit).

Native proof covers twelve-frame plans, default/maximum bounds, reasoning-only and invalid planner output, retry ceilings, transport errors, current Director placement, and consecutive Mari command rounds. Browser proof uses mocked translation responses with real chat storage, verifies stale source replacement and hide persistence, and checks notification placement after reload. No paid model calls were made.

Review follow-up: open-issues.regression.ts now checks both notification positions/dismissal directions; its full run passed. The expanded browser run passed 6/6, including hidden-translation reload, readable translation and Settings search/focus. A CI WebKit Chroma-clock timeout was inspected from its trace and did not reproduce in three focused runs; no forced clicks, retries or weaker assertions were added for that timeout. A new full matrix is required before merge.

Final review proof: a delayed translation/chat-switch regression failed before the fix, confirming the old request repopulated the active cache. Completion/error/loading updates now check the request chat ID; persistence still targets the original chat and reuses the existing cached-message updater, without refetching history. The combined chat/prompt browser suite passed 12/12 on desktop Chromium, mobile Chromium and mobile WebKit, including returning to the saved translation after a real chat switch.

  • 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

  • Manually verify translation from a new Game's first response, manual translation and rerolled narration with the configured provider.
  • Manually verify Push Story with and without an agent marker in the preset.
  • Manually verify Professor Mari against the reported local model and Storyboard against Gemma/KoboldCPP. Native fixtures prove request shaping and fallback logic, not compatibility with every local template or physical device.
  • Manually verify top/bottom notifications on iPhone Home Screen mode; Playwright WebKit is not real-device crash proof.

Docs and release impact

User-facing labels use the canonical English catalog; missing community translations fall back to English. Changelog entries added. No version bump or docs-page changes.

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

The runnable e2e/chat-sweep.e2e.ts demonstrates active-panel translation and the saved native notification selector on all three browser projects. Browser traces/screenshots are retained on failure by the existing matrix.

Summary by CodeRabbit

  • New Features

    • Added automatic game narration translation with configurable output language.
    • Added controls to show, hide, and manually translate narration and notes.
    • Added top or bottom notification placement in General Settings, with preferences preserved across reloads.
    • Increased storyboard support to up to 200 frames.
  • Bug Fixes

    • Prevented stale translations from appearing after switching chats or when source narration changes.
    • Preserved valid storyboard frames during planning and sanitization.
    • Improved storyboard generation reliability for local inference.
    • Improved Story Director result handling and context delivery for supported chat templates.

🔄 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/5939 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/7/2026 **Status:** ✅ Merged **Merged:** 9/8/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/issue-sweep-chat-ux-sep7` --- ### 📝 Commits (8) - [`c6f51ab`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c6f51abc74c38c50dd106945f7337fe9ac80b9ea) chore: claim remaining chat issue sweep - [`07827a3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/07827a3a2dd0de30a5536a7d6048331f456ba8c1) chore: claim capability documentation issue - [`53f0940`](https://github.com/Pasta-Devs/Marinara-Engine/commit/53f0940c1e07100e67cca1391ebab6de12407b68) fix: sweep game translations, prompt guidance and notifications - [`b9b95e8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b9b95e8dee1665edd755f45fd0865f579731c379) Merge remote-tracking branch 'origin/staging' into fix/issue-sweep-chat-ux-sep7 - [`1387a0c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1387a0cbf66836f3596f8691adbecb8722d8ac51) fix: complete translation hydration and settings search coverage - [`124dab1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/124dab139691f6e71f31ac3eb3cd93ccfc10fc36) Merge remote-tracking branch 'origin/staging' into fix/issue-sweep-chat-ux-sep7 - [`ebccfb2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ebccfb2d621f1b71fe9c30077f57499f828ad25f) Merge remote-tracking branch 'origin/staging' into fix/issue-sweep-chat-ux-sep7 - [`c4362f0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c4362f03a787f92ea871fc365c5d667cda9e4cb9) fix(translation): keep delayed results scoped to their chat ### 📊 Changes **24 files changed** (+653 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) ➕ `e2e/chat-sweep.e2e.ts` (+216 -0) 📝 `packages/client/src/App.tsx` (+3 -2) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+1 -0) 📝 `packages/client/src/components/game/GameNarration.tsx` (+90 -15) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+28 -0) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+25 -0) 📝 `packages/client/src/hooks/use-chats.ts` (+1 -1) 📝 `packages/client/src/hooks/use-translate.ts` (+28 -8) 📝 `packages/client/src/localization/locales/en.json` (+5 -0) 📝 `packages/client/src/stores/translation.store.ts` (+1 -0) 📝 `packages/client/src/stores/ui.store.ts` (+6 -0) 📝 `packages/server/src/routes/game.routes.ts` (+51 -25) 📝 `packages/server/src/routes/generate.routes.ts` (+1 -1) 📝 `packages/server/src/services/game/storyboard-planner-fallback.ts` (+22 -0) 📝 `packages/server/src/services/generation/runtime-agent-sections.ts` (+6 -6) 📝 `packages/server/src/services/professor-mari/workspace-agent.service.ts` (+10 -0) 📝 `packages/shared/src/constants/game-storyboard-prompts.ts` (+3 -2) 📝 `packages/shared/src/features/agents/storyboard-agent-settings.ts` (+2 -1) 📝 `packages/shared/src/types/game.ts` (+3 -0) _...and 4 more files_ </details> ### 📄 Description ## Linked issue Closes #5888 Closes #5886 Closes #5931 Closes #5932 Closes #5933 ## Why this change These assigned reports have no existing open/draft implementation PR. Game translations were stale after changed narration and inaccessible in the active panel; preset placement lost explicit Push Story direction; local Mari chat templates rejected trailing system context. Storyboard's hard-coded six-frame truncation and unusable local planner responses also prevented requested output. Notifications needed a saved location preference. ## What changed - Reuse existing translation controls in Game's active narration and readable notes/books, suppress stale translations, and translate each completed source at most once automatically. Wait for the current chat's translation configuration, retain hidden saved translations on reload, and add opt-in translation to Game setup. - Preserve fresh Director output at preset markers or the normal fallback when a preset has no marker. - Combine Mari's trusted system context into one leading message before every command round, without rewriting stored chat history. - Remove Storyboard's six-frame truncation. Keep the existing 200-section request safety ceiling, scale planner output budget, and retry unusable local planner output once without reasoning. Remote providers and transport/cancellation failures are not retried. - Add a saved, searchable top/bottom preference for the existing notification stack in General Settings. ## Validation Executed: `pnpm check`; `pnpm localization:check`; `pnpm regression:prompt` (three lanes); `pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/chat-sweep.regression.ts`; `pnpm exec playwright test e2e/chat-sweep.e2e.ts --workers=1` (6/6 across desktop Chromium, mobile Chromium, mobile WebKit). Native proof covers twelve-frame plans, default/maximum bounds, reasoning-only and invalid planner output, retry ceilings, transport errors, current Director placement, and consecutive Mari command rounds. Browser proof uses mocked translation responses with real chat storage, verifies stale source replacement and hide persistence, and checks notification placement after reload. No paid model calls were made. Review follow-up: `open-issues.regression.ts` now checks both notification positions/dismissal directions; its full run passed. The expanded browser run passed 6/6, including hidden-translation reload, readable translation and Settings search/focus. A CI WebKit Chroma-clock timeout was inspected from its trace and did not reproduce in three focused runs; no forced clicks, retries or weaker assertions were added for that timeout. A new full matrix is required before merge. Final review proof: a delayed translation/chat-switch regression failed before the fix, confirming the old request repopulated the active cache. Completion/error/loading updates now check the request chat ID; persistence still targets the original chat and reuses the existing cached-message updater, without refetching history. The combined chat/prompt browser suite passed 12/12 on desktop Chromium, mobile Chromium and mobile WebKit, including returning to the saved translation after a real chat switch. - [ ] `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 - Manually verify translation from a new Game's first response, manual translation and rerolled narration with the configured provider. - Manually verify Push Story with and without an agent marker in the preset. - Manually verify Professor Mari against the reported local model and Storyboard against Gemma/KoboldCPP. Native fixtures prove request shaping and fallback logic, not compatibility with every local template or physical device. - Manually verify top/bottom notifications on iPhone Home Screen mode; Playwright WebKit is not real-device crash proof. ## Docs and release impact User-facing labels use the canonical English catalog; missing community translations fall back to English. Changelog entries added. No version bump or docs-page changes. - [ ] 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) The runnable `e2e/chat-sweep.e2e.ts` demonstrates active-panel translation and the saved native notification selector on all three browser projects. Browser traces/screenshots are retained on failure by the existing matrix. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added automatic game narration translation with configurable output language. * Added controls to show, hide, and manually translate narration and notes. * Added top or bottom notification placement in General Settings, with preferences preserved across reloads. * Increased storyboard support to up to 200 frames. * **Bug Fixes** * Prevented stale translations from appearing after switching chats or when source narration changes. * Preserved valid storyboard frames during planning and sanitization. * Improved storyboard generation reliability for local inference. * Improved Story Director result handling and context delivery for supported chat templates. <!-- 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:15: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#6999
No description provided.