[GH-ISSUE #1797] [Issue]: Mode router parity gaps for game recent chats and session routing #877

Closed
opened 2026-10-21 05:22:48 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1797

Originally assigned to: @cha1latte on GitHub.

Summary

Static parity audit of features/modes/router against the legacy client found:

  • Confirmed regression: home Recent Chats renders game chats with the Conversation fallback badge because MODE_BADGE lacks a game entry.
  • Product decision / likely parity gap: legacy navigated game groups to the current/latest session; refactor router/sidebar can keep an older remembered or active session as the representative. Decide whether refactor should preserve latest-session routing or intentionally allow old sessions as the primary route.

Expected behavior

  • Game chats shown in Recent Chats should use a Game label/color/icon.
  • Game group navigation should have explicit behavior for older sessions vs. current/latest session, matching the intended Session History workflow.

Actual behavior

  • src/features/modes/router/components/RecentChats.tsx defines MODE_BADGE for conversation and roleplay only, then uses MODE_BADGE[chat.mode] ?? MODE_BADGE.conversation.
  • Legacy packages/client/src/components/chat/RecentChats.tsx had a game-colored visual_novel badge.
  • Legacy ChatArea used resolveCurrentGameSessionChatId(...) to switch an older game session to the current/latest session. Refactor GameConversationView receives and renders the current activeChatId; ChatSidebar chooses active/remembered representatives for grouped chats, not necessarily the latest session.

Steps to reproduce

  1. Create or open a game chat and let it appear in home Recent Chats.
  2. Return to the home surface.
  3. Observe the Recent Chats game chip badge/color.
  4. For the session-routing decision, create a multi-session game, select an older session in the grouped game sidebar entry, and confirm whether the app should stay on the older session or jump to the current/latest session. This needs product confirmation rather than an assumed fix.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor branch; static parity audit on 2026-06-01
  • Run mode: Not run; static code audit only
  • OS + version: Not runtime-specific
  • Node + pnpm versions: Not run
  • Rust version, if relevant: Not relevant
  • Remote Runtime URL configured? Not relevant
  • Provider, model, or integration, if relevant: Not relevant

Logs, screenshots, or video

No screenshots or logs. Static evidence:

  • Refactor game route exists: src/features/modes/router/components/ModeSurface.tsx
  • Refactor home creates game chats: src/features/modes/router/components/ModeHomeSurface.tsx
  • Refactor Recent Chats lacks game badge: src/features/modes/router/components/RecentChats.tsx
  • Legacy Recent Chats had game-colored visual_novel badge: packages/client/src/components/chat/RecentChats.tsx
  • Legacy current-session resolver: packages/client/src/lib/game-session-resolution.ts
  • Refactor grouped sidebar representative selection: src/app/shell/ChatSidebar.tsx

Regression notes

Legacy supported a game-colored Recent Chats badge through the old visual_novel mode. Refactor now has canonical game mode, so the router should handle game directly.

Legacy also redirected older game sessions to the current/latest session from the chat surface. Refactor has a richer Session History flow, so this difference may be intentional, but it needs an explicit product decision before code changes.

Additional context

The refactor router split is cleaner than the legacy monolithic chat surface. Keep any fix inside the router/sidebar/game route owners rather than reintroducing broad cross-mode routing.

Cheapest confirmed fix: add a game entry to MODE_BADGE in src/features/modes/router/components/RecentChats.tsx.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1797 Originally assigned to: @cha1latte on GitHub. ## Summary Static parity audit of `features/modes/router` against the legacy client found: - Confirmed regression: home Recent Chats renders `game` chats with the Conversation fallback badge because `MODE_BADGE` lacks a `game` entry. - Product decision / likely parity gap: legacy navigated game groups to the current/latest session; refactor router/sidebar can keep an older remembered or active session as the representative. Decide whether refactor should preserve latest-session routing or intentionally allow old sessions as the primary route. ## Expected behavior - Game chats shown in Recent Chats should use a Game label/color/icon. - Game group navigation should have explicit behavior for older sessions vs. current/latest session, matching the intended Session History workflow. ## Actual behavior - `src/features/modes/router/components/RecentChats.tsx` defines `MODE_BADGE` for `conversation` and `roleplay` only, then uses `MODE_BADGE[chat.mode] ?? MODE_BADGE.conversation`. - Legacy `packages/client/src/components/chat/RecentChats.tsx` had a game-colored `visual_novel` badge. - Legacy `ChatArea` used `resolveCurrentGameSessionChatId(...)` to switch an older game session to the current/latest session. Refactor `GameConversationView` receives and renders the current `activeChatId`; `ChatSidebar` chooses active/remembered representatives for grouped chats, not necessarily the latest session. ## Steps to reproduce 1. Create or open a game chat and let it appear in home Recent Chats. 2. Return to the home surface. 3. Observe the Recent Chats game chip badge/color. 4. For the session-routing decision, create a multi-session game, select an older session in the grouped game sidebar entry, and confirm whether the app should stay on the older session or jump to the current/latest session. This needs product confirmation rather than an assumed fix. ## Impact area <!-- Check the areas you think are relevant. Leave uncertain items unchecked. --> - [x] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [x] Game mode - [x] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor branch; static parity audit on 2026-06-01 - Run mode: Not run; static code audit only - OS + version: Not runtime-specific - Node + pnpm versions: Not run - Rust version, if relevant: Not relevant - Remote Runtime URL configured? Not relevant - Provider, model, or integration, if relevant: Not relevant ## Logs, screenshots, or video No screenshots or logs. Static evidence: - Refactor game route exists: `src/features/modes/router/components/ModeSurface.tsx` - Refactor home creates `game` chats: `src/features/modes/router/components/ModeHomeSurface.tsx` - Refactor Recent Chats lacks `game` badge: `src/features/modes/router/components/RecentChats.tsx` - Legacy Recent Chats had game-colored `visual_novel` badge: `packages/client/src/components/chat/RecentChats.tsx` - Legacy current-session resolver: `packages/client/src/lib/game-session-resolution.ts` - Refactor grouped sidebar representative selection: `src/app/shell/ChatSidebar.tsx` ## Regression notes Legacy supported a game-colored Recent Chats badge through the old `visual_novel` mode. Refactor now has canonical `game` mode, so the router should handle `game` directly. Legacy also redirected older game sessions to the current/latest session from the chat surface. Refactor has a richer Session History flow, so this difference may be intentional, but it needs an explicit product decision before code changes. ## Additional context The refactor router split is cleaner than the legacy monolithic chat surface. Keep any fix inside the router/sidebar/game route owners rather than reintroducing broad cross-mode routing. Cheapest confirmed fix: add a `game` entry to `MODE_BADGE` in `src/features/modes/router/components/RecentChats.tsx`. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:22:48 +07:00
Author
Owner

@cha1latte commented on GitHub (Jun 1, 2026):

Fixed in #1832

<!-- gh-comment-id:4595180497 --> @cha1latte commented on GitHub (Jun 1, 2026): Fixed in #1832
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#877
No description provided.