[PR #3626] [MERGED] Fix open client, prompt, browser, and game regressions #6021

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

📋 Pull Request Information

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

Base: staging ← Head: fix/3616-3625-open-issues


📝 Commits (3)

  • 752bcce fix: restore mobile toast swipes
  • e2a13d1 fix: resolve open browser and game regressions
  • 9e0e382 Apply CodeRabbit regression fixes

📊 Changes

25 files changed (+532 additions, -425 deletions)

View changed files

📝 CHANGELOG.md (+7 -0)
📝 packages/client/src/App.tsx (+1 -0)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+12 -3)
📝 packages/client/src/components/game/GameCombatUI.tsx (+2 -2)
📝 packages/client/src/components/game/GameJournal.tsx (+5 -2)
📝 packages/client/src/components/game/GameNarration.tsx (+2 -2)
📝 packages/client/src/components/game/GameSurface.tsx (+14 -12)
📝 packages/client/src/components/game/TacticalCombatUI.tsx (+2 -2)
📝 packages/client/src/components/panels/ConnectionsPanel.tsx (+22 -2)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+10 -6)
📝 packages/client/src/hooks/use-game-assets.ts (+37 -11)
➕ packages/client/src/lib/game-npc-avatar.ts (+33 -0)
➕ packages/client/src/lib/sidecar-download-stream.ts (+77 -0)
📝 packages/client/src/stores/game-asset.store.ts (+3 -57)
📝 packages/client/src/stores/game-mode.store.ts (+10 -5)
📝 packages/client/src/stores/sidecar.store.ts (+118 -230)
📝 packages/server/src/routes/bot-browser-chartavern.routes.ts (+13 -46)
📝 packages/server/src/routes/bot-browser-wyvern.routes.ts (+10 -19)
📝 packages/server/src/routes/bot-browser.routes.ts (+9 -19)
📝 packages/server/src/routes/noodle.routes.ts (+1 -3)

...and 5 more files

📄 Description

Linked issues

Closes #3616
Closes #3617
Closes #3619
Closes #3622
Closes #3623
Closes #3624
Closes #3625

Why this change

Seven current-staging issues shared a common failure pattern: UI or prompt behavior had drifted away from the state and security boundaries that should own it. The result ranged from stale Game Asset and NPC portrait data to unnecessary Noodle generations, unsafe duplicated Bot Browser transport, broken journal interaction, escaped standard dialogue markers, and inaccessible mobile toast dismissal.

What changed

  • Made React Query the single owner of the Game Assets manifest and mutation invalidation while leaving only transient playback selections in Zustand.
  • Consolidated sidecar model/runtime and Local Whisper SSE parsing, propagated destructive-action failures, and surfaced Local Whisper deletion errors in Connections.
  • Replaced the three duplicated Bot Browser JSON proxy helpers with a bounded HTTPS-only safeFetch wrapper using explicit provider hosts, JSON content types, strict redirects, timeouts, and per-route size caps.
  • Removed random-user instructions and the Random User Profiles placeholder from Noodle refresh prompts when Random Characters are disabled.
  • Updated Character Colors preview to use the active card's cropped avatar with a safe icon fallback.
  • Preserved exact and importer-encoded <START> example-dialogue markers while continuing to escape all other XML-looking card content.
  • Gave the embedded Game Journal a real bounded scroll viewport on desktop and mobile.
  • Forced replaced/generated NPC portraits to refresh when their stable server URL is reused, while preserving the refreshed URL through metadata resync.
  • Restored horizontal and upward swipe-to-dismiss gestures for mobile web toasts.
  • Updated the v2.3.0 changelog for every linked fix.

Validation

  • pnpm check
  • pnpm regression:issues
  • pnpm regression:prompt
  • pnpm smoke:ui
  • Manually verify Character Colors avatar/crop preview in a browser
  • Manually verify Game Journal scrolling and NPC portrait replacement on Windows and iOS
  • Manually verify toast swipe dismissal in a mobile web browser
  • Read and followed CONTRIBUTING.md

Automated evidence completed locally:

  • pnpm check passed (TypeScript, ESLint, shared/server/client production builds).
  • pnpm regression:issues passed, including new state-boundary, prompt, portrait-cache, and UI configuration guards.
  • pnpm regression:prompt passed.
  • pnpm smoke:ui passed: 51 passed, 35 intentionally skipped, 0 failed.
  • A final client lint and pnpm regression:issues rerun passed after the last portrait-loop guard.
  • git diff --check passed.

Documentation and release impact

  • CHANGELOG.md documents all seven fixes under v2.3.0.
  • No version-bearing files changed.

UI evidence

The UI changes restore existing responsive surfaces rather than introduce a new layout. OS/touch-specific manual verification remains explicitly listed above for reviewers.

Summary by CodeRabbit

  • Bug Fixes
    • Improved game asset updates, rescans, downloads, and deletion feedback.
    • Fixed Game Journal scrolling on desktop and iOS.
    • NPC portraits now refresh immediately after replacement or generation.
    • Character Colors previews now show cropped avatars with a fallback icon.
    • Restored mobile toast swipe-to-dismiss in all supported directions.
    • Improved prompt formatting and removed irrelevant random-user instructions when disabled.
    • Strengthened external bot-browser request validation and response limits.

🔄 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/3626 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3616-3625-open-issues` --- ### 📝 Commits (3) - [`752bcce`](https://github.com/Pasta-Devs/Marinara-Engine/commit/752bcce3289b83d173d96e4421c1bbf62b37e849) fix: restore mobile toast swipes - [`e2a13d1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e2a13d1140ce1754934eff788224790343ff611a) fix: resolve open browser and game regressions - [`9e0e382`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9e0e382c568197740e92b67bb13f9ee7f0d0cc63) Apply CodeRabbit regression fixes ### 📊 Changes **25 files changed** (+532 additions, -425 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+7 -0) 📝 `packages/client/src/App.tsx` (+1 -0) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+12 -3) 📝 `packages/client/src/components/game/GameCombatUI.tsx` (+2 -2) 📝 `packages/client/src/components/game/GameJournal.tsx` (+5 -2) 📝 `packages/client/src/components/game/GameNarration.tsx` (+2 -2) 📝 `packages/client/src/components/game/GameSurface.tsx` (+14 -12) 📝 `packages/client/src/components/game/TacticalCombatUI.tsx` (+2 -2) 📝 `packages/client/src/components/panels/ConnectionsPanel.tsx` (+22 -2) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+10 -6) 📝 `packages/client/src/hooks/use-game-assets.ts` (+37 -11) ➕ `packages/client/src/lib/game-npc-avatar.ts` (+33 -0) ➕ `packages/client/src/lib/sidecar-download-stream.ts` (+77 -0) 📝 `packages/client/src/stores/game-asset.store.ts` (+3 -57) 📝 `packages/client/src/stores/game-mode.store.ts` (+10 -5) 📝 `packages/client/src/stores/sidecar.store.ts` (+118 -230) 📝 `packages/server/src/routes/bot-browser-chartavern.routes.ts` (+13 -46) 📝 `packages/server/src/routes/bot-browser-wyvern.routes.ts` (+10 -19) 📝 `packages/server/src/routes/bot-browser.routes.ts` (+9 -19) 📝 `packages/server/src/routes/noodle.routes.ts` (+1 -3) _...and 5 more files_ </details> ### 📄 Description ## Linked issues Closes #3616 Closes #3617 Closes #3619 Closes #3622 Closes #3623 Closes #3624 Closes #3625 ## Why this change Seven current-staging issues shared a common failure pattern: UI or prompt behavior had drifted away from the state and security boundaries that should own it. The result ranged from stale Game Asset and NPC portrait data to unnecessary Noodle generations, unsafe duplicated Bot Browser transport, broken journal interaction, escaped standard dialogue markers, and inaccessible mobile toast dismissal. ## What changed - Made React Query the single owner of the Game Assets manifest and mutation invalidation while leaving only transient playback selections in Zustand. - Consolidated sidecar model/runtime and Local Whisper SSE parsing, propagated destructive-action failures, and surfaced Local Whisper deletion errors in Connections. - Replaced the three duplicated Bot Browser JSON proxy helpers with a bounded HTTPS-only `safeFetch` wrapper using explicit provider hosts, JSON content types, strict redirects, timeouts, and per-route size caps. - Removed random-user instructions and the Random User Profiles placeholder from Noodle refresh prompts when Random Characters are disabled. - Updated Character Colors preview to use the active card's cropped avatar with a safe icon fallback. - Preserved exact and importer-encoded `<START>` example-dialogue markers while continuing to escape all other XML-looking card content. - Gave the embedded Game Journal a real bounded scroll viewport on desktop and mobile. - Forced replaced/generated NPC portraits to refresh when their stable server URL is reused, while preserving the refreshed URL through metadata resync. - Restored horizontal and upward swipe-to-dismiss gestures for mobile web toasts. - Updated the v2.3.0 changelog for every linked fix. ## Validation - [ ] `pnpm check` - [ ] `pnpm regression:issues` - [ ] `pnpm regression:prompt` - [ ] `pnpm smoke:ui` - [ ] Manually verify Character Colors avatar/crop preview in a browser - [ ] Manually verify Game Journal scrolling and NPC portrait replacement on Windows and iOS - [ ] Manually verify toast swipe dismissal in a mobile web browser - [ ] Read and followed `CONTRIBUTING.md` Automated evidence completed locally: - `pnpm check` passed (TypeScript, ESLint, shared/server/client production builds). - `pnpm regression:issues` passed, including new state-boundary, prompt, portrait-cache, and UI configuration guards. - `pnpm regression:prompt` passed. - `pnpm smoke:ui` passed: 51 passed, 35 intentionally skipped, 0 failed. - A final client lint and `pnpm regression:issues` rerun passed after the last portrait-loop guard. - `git diff --check` passed. ## Documentation and release impact - `CHANGELOG.md` documents all seven fixes under v2.3.0. - No version-bearing files changed. ## UI evidence The UI changes restore existing responsive surfaces rather than introduce a new layout. OS/touch-specific manual verification remains explicitly listed above for reviewers. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved game asset updates, rescans, downloads, and deletion feedback. * Fixed Game Journal scrolling on desktop and iOS. * NPC portraits now refresh immediately after replacement or generation. * Character Colors previews now show cropped avatars with a fallback icon. * Restored mobile toast swipe-to-dismiss in all supported directions. * Improved prompt formatting and removed irrelevant random-user instructions when disabled. * Strengthened external bot-browser request validation and response limits. <!-- 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:06:19 +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#6021
No description provided.