[PR #2313] [MERGED] Mobile UX rework: Basics #5532

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2313
Author: @Gunterlie
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/6/2026
Merged by: @Gunterlie

Base: refactor ← Head: mobile-shenanigans


📝 Commits (10+)

  • 58792d9 feat(mobile): mobile UX rework — bottom tab bar, context-aware TopBar, navbar layering, discover panel overflow fix, quickstart fullwidth fix, recent chats cards redesign
  • f8c94c1 feat(mobile): game mode TopBar — Tools + More buttons, top sheets, hide avatar
  • 7f783de fix(mobile): multi-char avatars in TopBar, panel bottom offsets, tools sheet gap, schedule click
  • cc5d835 fix(mobile): status dots on multi-char avatars, hide activity text for group, click-to-show activity
  • 9744496 fix: mobile UX review — reactive breakpoints, popup dismissal, panel cleanup
  • fc52134 ci: re-trigger check with updated PR body
  • 6b554ba fix: mobile nav flow and remaining frozen breakpoint checks
  • 26d5b91 feat(mobile): convert More Menu from tile grid to single-column list
  • 27d19c0 feat(mobile): bottom sheet More Menu + full-width quick-start cards
  • 693250c Tighten mobile shell actions

📊 Changes

27 files changed (+1854 additions, -757 deletions)

View changed files

📝 .gitignore (+5 -0)
📝 src/app/shell/AppShell.tsx (+64 -20)
📝 src/app/shell/ChatSidebar.tsx (+2 -14)
➕ src/app/shell/MobileTabBar.tsx (+202 -0)
📝 src/app/shell/PanelNavButtons.tsx (+1 -1)
📝 src/app/shell/TopBar.tsx (+160 -144)
📝 src/features/catalog/characters/hooks/use-characters-panel-chat-actions.ts (+9 -2)
📝 src/features/modes/conversation/components/ConversationView.tsx (+464 -175)
📝 src/features/modes/game/components/GameSurface.tsx (+375 -215)
📝 src/features/modes/roleplay/components/ChatRoleplaySurface.tsx (+396 -138)
📝 src/features/modes/roleplay/components/RoleplayHUD.tsx (+1 -1)
📝 src/features/modes/router/components/ModeHomeSurface.tsx (+4 -3)
📝 src/features/modes/router/components/RecentChats.tsx (+6 -4)
📝 src/features/modes/shared/chat-ui/components/ChatBranchSelector.tsx (+35 -10)
📝 src/features/modes/shared/chat-ui/components/ChatMessage.tsx (+2 -2)
📝 src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx (+5 -2)
📝 src/features/modes/shared/chat-ui/components/ChatSetupWizard.tsx (+3 -2)
📝 src/features/modes/shared/chat-ui/components/EchoChamberPanel.tsx (+6 -4)
📝 src/features/modes/shared/chat-ui/components/SummaryPopover.tsx (+2 -1)
📝 src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.ts (+2 -17)

...and 7 more files

📄 Description

Linked issue

Closes #2358

Why this change

This PR improves the mobile shell and mode surfaces so core app navigation, panels, tools, chat controls, and mode-specific actions remain usable on narrow viewports. It also addresses follow-up review findings around mobile overlay ownership, linked-chat switching, stale status invalidation, top-bar registration, activity popup identity, and global page overflow behavior.

What changed

  • Added/refined mobile shell navigation, bottom tab behavior, and AppShell-owned mobile overlays.
  • Kept mobile Tools/More sheets aligned with AppShell focus, Escape, history, and inert handling.
  • Restored mobile roleplay linked-chat switching and made the visible Summary row the actual trigger.
  • Fixed conversation status refresh invalidation after partial successful persistence.
  • Fixed character activity popup identity to use stable character IDs instead of display names/indexes.
  • Limited game-mode TopBar right-slot registration to mobile viewports.
  • Removed global page-level horizontal clipping while keeping wide markdown code/table content in localized scroll containers.

Refactor impact

Primary owner:

  • App shell, conversation mode, roleplay mode, game mode, shared mobile shell styling.

Impact areas reviewed:

  • src/app/shell/AppShell.tsx
  • src/app/shell/MobileTabBar.tsx
  • src/features/modes/conversation/components/ConversationView.tsx
  • src/features/modes/roleplay/components/ChatRoleplaySurface.tsx
  • src/features/modes/game/components/GameSurface.tsx
  • src/styles/globals.css

Boundary notes:

  • Changes stay in React feature/app shell styling and mode surfaces.
  • No engine-to-React boundary changes.
  • No raw Tauri, remote-runtime, Rust command, storage schema, or provider transport changes added.
  • Existing focused shared API/storage wrappers remain in use.

Pressure points touched:

  • AppShell mobile overlay ownership, focus/inert/history behavior.
  • MobileTabBar panel selection.
  • ConversationView periodic status refresh.
  • ChatRoleplaySurface mobile More sheet actions.
  • GameSurface TopBar right-slot registration.
  • Global stylesheet root/body overflow behavior.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

Automatic/local checks run:

  • pnpm typecheck — passed.
  • pnpm build — passed after merging latest origin/refactor; only existing chunk-size warnings were reported.
  • pnpm check:architecture — passed.
  • git diff --check — passed.
  • VS Code diagnostics — clean.
  • Focused mocked-storage proof for conversation status refresh invalidation:
    • first character update succeeds, later get fails → invalidation still runs.
    • first character update succeeds, later update fails → invalidation still runs.
    • no status changes → no update and no invalidation.
  • Review finding checks verified against current code before fixing or skipping:
    • Conversation status invalidation fixed.
    • Roleplay linked-chat switch fixed.
    • Roleplay top-bar More sheet backdrop fixed so it no longer blurs/hides the TopBar.
    • Global page overflow clipping fixed.
    • Game TopBar mobile-only registration fixed.
    • CI merge-ref regexScripts build failure resolved by merging latest origin/refactor and validating pnpm build.

Human test checklist:

  • Open the app on a mobile viewport around 390×844 and confirm the home screen layout matches the intended mobile design.
  • In a normal chat view, confirm the mobile back button returns to the home screen.
  • Open the mobile Tools sheet and confirm it opens, starts focus inside the sheet, keeps Tab focus inside the sheet, closes with Escape, and closes with browser back without navigating away.
  • From the mobile Tools sheet, open a tool/panel and confirm the Tools sheet closes while the selected panel opens.
  • Confirm mobile bottom navigation and panel overlays do not leave stuck scrims, stale focus traps, or inert background issues.
  • In conversation mode, open the top-bar three-dot menu and confirm it opens below the TopBar without hiding or blurring the TopBar.
  • In conversation mode, verify More-sheet actions work: Branches, Summary, World Info, Author Notes, Gallery, Chat Files, and Chat Settings.
  • In conversation mode with multiple characters, confirm character activity/status popups target the tapped character and do not collide for duplicate names.
  • In roleplay mode, open the top-bar three-dot menu and confirm the TopBar remains sharp and visible, not blurred or hidden.
  • In roleplay mode with a linked chat, confirm the connected-chat switch appears in the mobile More sheet and switches to the paired chat.
  • In roleplay mode, verify More-sheet actions work: Branches, Summary, World Info, Author Notes, Gallery, Chat Files, and Chat Settings.
  • In game mode on mobile, confirm top-bar More/Tools buttons appear only during the active game UI and that both sheets open below the TopBar.
  • In game mode, confirm More/Tools sheet actions open the expected settings, files, gallery, panels, or game tools.
  • On desktop width, confirm mobile-only sheets/buttons do not remain visible and do not steal or overwrite desktop top-bar actions.
  • Check wide markdown content with code blocks and tables; confirm wide code/table content scrolls locally and the page is not globally clipped.
  • Review the attached UI evidence screenshots and recapture any view whose current UI no longer matches.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • This changes mobile presentation and existing controls; it does not add a new discoverable product feature or workflow.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

Home Screen:
Bildschirmfoto 2026-06-06 um 16 32 34

Chat View:
Bildschirmfoto 2026-06-06 um 16 32 50

Prof. Mari Tab:
Bildschirmfoto 2026-06-06 um 16 32 40

Panels:
Bildschirmfoto 2026-06-06 um 16 32 45

Convo:
Convo

Panels in Chat:
Panels in Chat

RP:
RP

RP Chat Settings:
Bildschirmfoto 2026-06-06 um 16 39 48

Game Mode:
Game

Summary by CodeRabbit

  • New Features

    • Mobile bottom navigation (Chats / Home / Tools) and a Tools bottom-sheet with selectable panels.
    • New top-bar actions region for per-screen mobile header controls.
    • SSR-safe mobile breakpoint hook to drive responsive behaviors.
  • Improvements

    • Redesigned mobile chat header with stacked avatars, activity/status, and unified back/navigation.
    • Consistent mobile overlays: focus trapping, Escape-to-close, and unified panel open/close flows.
    • Improved touch handling, small UI animations, and normalized character/avatar handling for consistency.

🔄 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/2313 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 6/5/2026 **Status:** ✅ Merged **Merged:** 6/6/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `refactor` ← **Head:** `mobile-shenanigans` --- ### 📝 Commits (10+) - [`58792d9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/58792d9fbfb8dcf1130b2d3c1b8f9a0475b4e2e2) feat(mobile): mobile UX rework — bottom tab bar, context-aware TopBar, navbar layering, discover panel overflow fix, quickstart fullwidth fix, recent chats cards redesign - [`f8c94c1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f8c94c194fdfdff8d8da8f4af986d349f6e0ded8) feat(mobile): game mode TopBar — Tools + More buttons, top sheets, hide avatar - [`7f783de`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7f783de46f32852036b5f61cd1286078333567a3) fix(mobile): multi-char avatars in TopBar, panel bottom offsets, tools sheet gap, schedule click - [`cc5d835`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cc5d835ed6bf77cd5f9862ea642d73fd6934b90e) fix(mobile): status dots on multi-char avatars, hide activity text for group, click-to-show activity - [`9744496`](https://github.com/Pasta-Devs/Marinara-Engine/commit/97444963e8dd3e610434414cb9484a7d9423191d) fix: mobile UX review — reactive breakpoints, popup dismissal, panel cleanup - [`fc52134`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fc521349c55b999636d20109cf67fbd35dbfe721) ci: re-trigger check with updated PR body - [`6b554ba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6b554baf8b768eea912b75f1d00719af882f8503) fix: mobile nav flow and remaining frozen breakpoint checks - [`26d5b91`](https://github.com/Pasta-Devs/Marinara-Engine/commit/26d5b91c4484486092ce143d2d19bc572130fa7c) feat(mobile): convert More Menu from tile grid to single-column list - [`27d19c0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/27d19c0f9abfd250bf9f2c0fb9dc7a02361e6c7e) feat(mobile): bottom sheet More Menu + full-width quick-start cards - [`693250c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/693250cd496edb810e3439c8efc681e11587b6b8) Tighten mobile shell actions ### 📊 Changes **27 files changed** (+1854 additions, -757 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+5 -0) 📝 `src/app/shell/AppShell.tsx` (+64 -20) 📝 `src/app/shell/ChatSidebar.tsx` (+2 -14) ➕ `src/app/shell/MobileTabBar.tsx` (+202 -0) 📝 `src/app/shell/PanelNavButtons.tsx` (+1 -1) 📝 `src/app/shell/TopBar.tsx` (+160 -144) 📝 `src/features/catalog/characters/hooks/use-characters-panel-chat-actions.ts` (+9 -2) 📝 `src/features/modes/conversation/components/ConversationView.tsx` (+464 -175) 📝 `src/features/modes/game/components/GameSurface.tsx` (+375 -215) 📝 `src/features/modes/roleplay/components/ChatRoleplaySurface.tsx` (+396 -138) 📝 `src/features/modes/roleplay/components/RoleplayHUD.tsx` (+1 -1) 📝 `src/features/modes/router/components/ModeHomeSurface.tsx` (+4 -3) 📝 `src/features/modes/router/components/RecentChats.tsx` (+6 -4) 📝 `src/features/modes/shared/chat-ui/components/ChatBranchSelector.tsx` (+35 -10) 📝 `src/features/modes/shared/chat-ui/components/ChatMessage.tsx` (+2 -2) 📝 `src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx` (+5 -2) 📝 `src/features/modes/shared/chat-ui/components/ChatSetupWizard.tsx` (+3 -2) 📝 `src/features/modes/shared/chat-ui/components/EchoChamberPanel.tsx` (+6 -4) 📝 `src/features/modes/shared/chat-ui/components/SummaryPopover.tsx` (+2 -1) 📝 `src/features/modes/shared/chat-ui/hooks/use-chat-surface-data.ts` (+2 -17) _...and 7 more files_ </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #2358 ## Why this change This PR improves the mobile shell and mode surfaces so core app navigation, panels, tools, chat controls, and mode-specific actions remain usable on narrow viewports. It also addresses follow-up review findings around mobile overlay ownership, linked-chat switching, stale status invalidation, top-bar registration, activity popup identity, and global page overflow behavior. ## What changed - Added/refined mobile shell navigation, bottom tab behavior, and AppShell-owned mobile overlays. - Kept mobile Tools/More sheets aligned with AppShell focus, Escape, history, and inert handling. - Restored mobile roleplay linked-chat switching and made the visible Summary row the actual trigger. - Fixed conversation status refresh invalidation after partial successful persistence. - Fixed character activity popup identity to use stable character IDs instead of display names/indexes. - Limited game-mode TopBar right-slot registration to mobile viewports. - Removed global page-level horizontal clipping while keeping wide markdown code/table content in localized scroll containers. ## Refactor impact Primary owner: - App shell, conversation mode, roleplay mode, game mode, shared mobile shell styling. Impact areas reviewed: - `src/app/shell/AppShell.tsx` - `src/app/shell/MobileTabBar.tsx` - `src/features/modes/conversation/components/ConversationView.tsx` - `src/features/modes/roleplay/components/ChatRoleplaySurface.tsx` - `src/features/modes/game/components/GameSurface.tsx` - `src/styles/globals.css` Boundary notes: - Changes stay in React feature/app shell styling and mode surfaces. - No engine-to-React boundary changes. - No raw Tauri, remote-runtime, Rust command, storage schema, or provider transport changes added. - Existing focused shared API/storage wrappers remain in use. Pressure points touched: - AppShell mobile overlay ownership, focus/inert/history behavior. - MobileTabBar panel selection. - ConversationView periodic status refresh. - ChatRoleplaySurface mobile More sheet actions. - GameSurface TopBar right-slot registration. - Global stylesheet root/body overflow behavior. ## Validation - [x] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [x] Full `pnpm check` passes before PR push/handoff - [x] Human/manual validation completed by contributor or reviewer ### Manual verification notes Automatic/local checks run: - `pnpm typecheck` — passed. - `pnpm build` — passed after merging latest `origin/refactor`; only existing chunk-size warnings were reported. - `pnpm check:architecture` — passed. - `git diff --check` — passed. - VS Code diagnostics — clean. - Focused mocked-storage proof for conversation status refresh invalidation: - first character update succeeds, later `get` fails → invalidation still runs. - first character update succeeds, later `update` fails → invalidation still runs. - no status changes → no update and no invalidation. - Review finding checks verified against current code before fixing or skipping: - Conversation status invalidation fixed. - Roleplay linked-chat switch fixed. - Roleplay top-bar More sheet backdrop fixed so it no longer blurs/hides the TopBar. - Global page overflow clipping fixed. - Game TopBar mobile-only registration fixed. - CI merge-ref `regexScripts` build failure resolved by merging latest `origin/refactor` and validating `pnpm build`. Human test checklist: - [x] Open the app on a mobile viewport around 390×844 and confirm the home screen layout matches the intended mobile design. - [x] In a normal chat view, confirm the mobile back button returns to the home screen. - [x] Open the mobile Tools sheet and confirm it opens, starts focus inside the sheet, keeps Tab focus inside the sheet, closes with Escape, and closes with browser back without navigating away. - [x] From the mobile Tools sheet, open a tool/panel and confirm the Tools sheet closes while the selected panel opens. - [x] Confirm mobile bottom navigation and panel overlays do not leave stuck scrims, stale focus traps, or inert background issues. - [x] In conversation mode, open the top-bar three-dot menu and confirm it opens below the TopBar without hiding or blurring the TopBar. - [x] In conversation mode, verify More-sheet actions work: Branches, Summary, World Info, Author Notes, Gallery, Chat Files, and Chat Settings. - [x] In conversation mode with multiple characters, confirm character activity/status popups target the tapped character and do not collide for duplicate names. - [x] In roleplay mode, open the top-bar three-dot menu and confirm the TopBar remains sharp and visible, not blurred or hidden. - [x] In roleplay mode with a linked chat, confirm the connected-chat switch appears in the mobile More sheet and switches to the paired chat. - [x] In roleplay mode, verify More-sheet actions work: Branches, Summary, World Info, Author Notes, Gallery, Chat Files, and Chat Settings. - [x] In game mode on mobile, confirm top-bar More/Tools buttons appear only during the active game UI and that both sheets open below the TopBar. - [x] In game mode, confirm More/Tools sheet actions open the expected settings, files, gallery, panels, or game tools. - [x] On desktop width, confirm mobile-only sheets/buttons do not remain visible and do not steal or overwrite desktop top-bar actions. - [x] Check wide markdown content with code blocks and tables; confirm wide code/table content scrolls locally and the page is not globally clipped. - [x] Review the attached UI evidence screenshots and recapture any view whose current UI no longer matches. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - This changes mobile presentation and existing controls; it does not add a new discoverable product feature or workflow. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence Home Screen: <img width="390" height="681" alt="Bildschirmfoto 2026-06-06 um 16 32 34" src="https://github.com/user-attachments/assets/f7098165-9f9e-45cb-909d-d9c1eba21a79" /> Chat View: <img width="378" height="675" alt="Bildschirmfoto 2026-06-06 um 16 32 50" src="https://github.com/user-attachments/assets/0f35fafb-09df-4e57-bd92-c12565766035" /> Prof. Mari Tab: <img width="385" height="678" alt="Bildschirmfoto 2026-06-06 um 16 32 40" src="https://github.com/user-attachments/assets/012fe605-7a64-4e1a-bbac-17f5d981a47f" /> Panels: <img width="387" height="678" alt="Bildschirmfoto 2026-06-06 um 16 32 45" src="https://github.com/user-attachments/assets/9bc75178-7cb2-4543-836d-14c28f0cfe19" /> Convo: <img width="400" height="861" alt="Convo" src="https://github.com/user-attachments/assets/dc72e2bb-1196-491b-8d61-bbf04cdf6f36" /> Panels in Chat: <img width="399" height="862" alt="Panels in Chat" src="https://github.com/user-attachments/assets/f1d02495-a402-490b-9798-2d2e7af48a82" /> RP: <img width="405" height="864" alt="RP" src="https://github.com/user-attachments/assets/195bdf40-4844-4f75-999c-b71312c8a67f" /> RP Chat Settings: <img width="384" height="676" alt="Bildschirmfoto 2026-06-06 um 16 39 48" src="https://github.com/user-attachments/assets/2a67c17b-45e7-4a7e-8b79-3fa37a62b582" /> Game Mode: <img width="407" height="865" alt="Game" src="https://github.com/user-attachments/assets/cc898ee0-e3af-4480-8c09-6bb4ac21235b" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Mobile bottom navigation (Chats / Home / Tools) and a Tools bottom-sheet with selectable panels. * New top-bar actions region for per-screen mobile header controls. * SSR-safe mobile breakpoint hook to drive responsive behaviors. * **Improvements** * Redesigned mobile chat header with stacked avatars, activity/status, and unified back/navigation. * Consistent mobile overlays: focus trapping, Escape-to-close, and unified panel open/close flows. * Improved touch handling, small UI animations, and normalized character/avatar handling for consistency. <!-- 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-22 04:17:08 +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#5532
No description provided.