[PR #1190] [MERGED] Fix mobile onboarding and mobile chat controls #4967

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1190
Author: @Xelvanis
Created: 5/25/2026
Status: ✅ Merged
Merged: 5/25/2026
Merged by: @Xelvanis

Base: refactor ← Head: fix/android-onboarding-inert


📝 Commits (6)

  • b49159d Fix mobile onboarding inert restoration
  • 02dd594 Fix mobile chat chrome controls
  • bcdb55d Fix dynamic onboarding inert targets
  • 71a2165 Fix mobile chat setup chrome states
  • 6d94dce Keep onboarding inert state authoritative
  • 7cf94ab Fix extra narrow mobile topbar overflow

📊 Changes

7 files changed (+250 additions, -100 deletions)

View changed files

📝 src/app/shell/AppShell.tsx (+14 -6)
📝 src/app/shell/ChatSidebar.tsx (+2 -1)
➕ src/app/shell/ChatTitleControls.tsx (+106 -0)
📝 src/app/shell/TopBar.tsx (+17 -1)
📝 src/app/shell/WindowTitleBar.tsx (+8 -77)
📝 src/features/shell/onboarding/components/OnboardingTutorial.tsx (+77 -15)
📝 src/styles/globals.css (+26 -0)

📄 Description

Summary

  • Preserve existing AppShell inert state while the onboarding tutorial is mounted, then re-sync mobile panel inert state after onboarding unmounts.
  • Track shell elements mounted while onboarding is open so later-added mobile panels/backdrops are also inerted and restored on cleanup.
  • Keep AppShell mobile panel inert/focus effects from overriding onboarding while the tutorial is mounted.
  • Reuse the desktop chat, Home, and Professor Mari controls in the mobile top bar so mobile users can reopen the chat sidebar from Roleplay.
  • Keep the extra-narrow mobile top bar within the viewport while preserving the required chat/sidebar and panel controls.
  • Close the mobile chat sidebar before starting a new chat so setup/connection gates mount in an interactive main surface.
  • Prefer visible onboarding tour targets when desktop and mobile chrome both provide the same data-tour hook.

Behavior changed

Skipping onboarding on mobile no longer leaves the chat sidebar or main app surfaces stuck in the wrong inert state. Mobile Roleplay now also has a visible Open chats control in the top bar; tapping it opens the full-width chat sidebar so users can switch between CONVO/RP/GM or create/select chats without relying on the Android back gesture.

Starting a new chat from the mobile sidebar now closes the sidebar first, so any setup or connection gate that appears in the main route is reachable instead of being inert underneath the sidebar dialog. On very narrow mobile widths, the optional Professor Mari top-bar button is hidden to prevent clipping; it remains visible at Pixel 7 Pro width and in the desktop titlebar.

Primary files/modules touched

  • src/app/shell/AppShell.tsx
  • src/app/shell/ChatSidebar.tsx
  • src/app/shell/ChatTitleControls.tsx
  • src/app/shell/TopBar.tsx
  • src/app/shell/WindowTitleBar.tsx
  • src/features/shell/onboarding/components/OnboardingTutorial.tsx
  • src/styles/globals.css

Impact / dependent areas reviewed

  • AppShell mobile panel inert and focus behavior.
  • First-run onboarding modal inert/focus cleanup.
  • Dynamic shell children mounted while onboarding is open.
  • Mobile top app chrome layout and sidebar access.
  • Mobile new-chat setup/connection gate flow from the sidebar.
  • Desktop titlebar chat/Home/Professor Mari controls, now routed through the shared control component.
  • Onboarding spotlight target lookup with duplicate desktop/mobile tour hooks.

Verification

  • pnpm typecheck
  • pnpm check:architecture
  • pnpm build passed; Vite reported existing chunk/dynamic-import warnings.
  • Browser/Vite mobile viewport check: at 360px, AppChrome and TopBar scrollWidth both stayed at 360px, Professor Mari was hidden, and the visible top-bar controls fit within the viewport.
  • Browser/Vite mobile viewport check: at 411px, Professor Mari was visible and AppChrome/TopBar still had no horizontal overflow.
  • Browser/Vite mobile interaction check: with the mobile sidebar open, tapping New Conversation closed the sidebar, cleared main inert/aria-hidden, and left setup buttons without an inert ancestor.
  • Android ADB/CDP targeted QA: replay tutorial, Next -> Skip, sidebar stays interactive, main/header stay inert, and RP tab tap works.
  • Android ADB/CDP targeted QA: skip tutorial while sidebar is already open, sidebar stays interactive and background remains inert.
  • Android ADB/CDP targeted QA: mobile top bar shows Open chats, Home, and Professor Mari controls; Open chats opens the full-width sidebar dialog; tapping CONVO activates the Conversation tab and exposes New Conversation.
  • Android WebView/CDP targeted QA: while onboarding is open, a newly appended shell child outside the tutorial becomes inert; after Skip/cleanup it is restored.

Docs / release notes

  • Not updated: scoped mobile shell/onboarding bugfix, no repo changelog/release-note source found.

Remaining risk

  • Full mobile app QA sweep was not run. The latest setup-gate and narrow-topbar proof was Browser/Vite mobile viewport proof; native Android proof was focused on onboarding and sidebar access paths.

Summary by CodeRabbit

  • Improvements
    • Sidebar automatically closes when creating a new chat on mobile devices for a smoother workflow
    • Enhanced responsive design optimizations for screens under 380px wide
    • Improved onboarding tutorial integration with better management of app interface interactions during the tutorial experience

Review Change Stack


🔄 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/1190 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/25/2026 **Status:** ✅ Merged **Merged:** 5/25/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `fix/android-onboarding-inert` --- ### 📝 Commits (6) - [`b49159d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b49159d6d3ac4f54d0d63ec10c8c29bdc132a440) Fix mobile onboarding inert restoration - [`02dd594`](https://github.com/Pasta-Devs/Marinara-Engine/commit/02dd594992e61c60028d804daeaa0563fea5cf5b) Fix mobile chat chrome controls - [`bcdb55d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bcdb55dc268723e2895e641c649a482448870ad1) Fix dynamic onboarding inert targets - [`71a2165`](https://github.com/Pasta-Devs/Marinara-Engine/commit/71a2165f9d035da3972236f85e62ce066cf84139) Fix mobile chat setup chrome states - [`6d94dce`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6d94dcec15101d2b04dccfdfb421e5cd9116100c) Keep onboarding inert state authoritative - [`7cf94ab`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7cf94abd1a1360bb3e93a20e125b027d7f4aec7a) Fix extra narrow mobile topbar overflow ### 📊 Changes **7 files changed** (+250 additions, -100 deletions) <details> <summary>View changed files</summary> 📝 `src/app/shell/AppShell.tsx` (+14 -6) 📝 `src/app/shell/ChatSidebar.tsx` (+2 -1) ➕ `src/app/shell/ChatTitleControls.tsx` (+106 -0) 📝 `src/app/shell/TopBar.tsx` (+17 -1) 📝 `src/app/shell/WindowTitleBar.tsx` (+8 -77) 📝 `src/features/shell/onboarding/components/OnboardingTutorial.tsx` (+77 -15) 📝 `src/styles/globals.css` (+26 -0) </details> ### 📄 Description ## Summary - Preserve existing AppShell inert state while the onboarding tutorial is mounted, then re-sync mobile panel inert state after onboarding unmounts. - Track shell elements mounted while onboarding is open so later-added mobile panels/backdrops are also inerted and restored on cleanup. - Keep AppShell mobile panel inert/focus effects from overriding onboarding while the tutorial is mounted. - Reuse the desktop chat, Home, and Professor Mari controls in the mobile top bar so mobile users can reopen the chat sidebar from Roleplay. - Keep the extra-narrow mobile top bar within the viewport while preserving the required chat/sidebar and panel controls. - Close the mobile chat sidebar before starting a new chat so setup/connection gates mount in an interactive main surface. - Prefer visible onboarding tour targets when desktop and mobile chrome both provide the same `data-tour` hook. ## Behavior changed Skipping onboarding on mobile no longer leaves the chat sidebar or main app surfaces stuck in the wrong inert state. Mobile Roleplay now also has a visible Open chats control in the top bar; tapping it opens the full-width chat sidebar so users can switch between CONVO/RP/GM or create/select chats without relying on the Android back gesture. Starting a new chat from the mobile sidebar now closes the sidebar first, so any setup or connection gate that appears in the main route is reachable instead of being inert underneath the sidebar dialog. On very narrow mobile widths, the optional Professor Mari top-bar button is hidden to prevent clipping; it remains visible at Pixel 7 Pro width and in the desktop titlebar. ## Primary files/modules touched - `src/app/shell/AppShell.tsx` - `src/app/shell/ChatSidebar.tsx` - `src/app/shell/ChatTitleControls.tsx` - `src/app/shell/TopBar.tsx` - `src/app/shell/WindowTitleBar.tsx` - `src/features/shell/onboarding/components/OnboardingTutorial.tsx` - `src/styles/globals.css` ## Impact / dependent areas reviewed - AppShell mobile panel inert and focus behavior. - First-run onboarding modal inert/focus cleanup. - Dynamic shell children mounted while onboarding is open. - Mobile top app chrome layout and sidebar access. - Mobile new-chat setup/connection gate flow from the sidebar. - Desktop titlebar chat/Home/Professor Mari controls, now routed through the shared control component. - Onboarding spotlight target lookup with duplicate desktop/mobile tour hooks. ## Verification - `pnpm typecheck` - `pnpm check:architecture` - `pnpm build` passed; Vite reported existing chunk/dynamic-import warnings. - Browser/Vite mobile viewport check: at 360px, AppChrome and TopBar `scrollWidth` both stayed at 360px, Professor Mari was hidden, and the visible top-bar controls fit within the viewport. - Browser/Vite mobile viewport check: at 411px, Professor Mari was visible and AppChrome/TopBar still had no horizontal overflow. - Browser/Vite mobile interaction check: with the mobile sidebar open, tapping New Conversation closed the sidebar, cleared `main` inert/`aria-hidden`, and left setup buttons without an inert ancestor. - Android ADB/CDP targeted QA: replay tutorial, `Next -> Skip`, sidebar stays interactive, main/header stay inert, and RP tab tap works. - Android ADB/CDP targeted QA: skip tutorial while sidebar is already open, sidebar stays interactive and background remains inert. - Android ADB/CDP targeted QA: mobile top bar shows Open chats, Home, and Professor Mari controls; Open chats opens the full-width sidebar dialog; tapping CONVO activates the Conversation tab and exposes New Conversation. - Android WebView/CDP targeted QA: while onboarding is open, a newly appended shell child outside the tutorial becomes inert; after Skip/cleanup it is restored. ## Docs / release notes - Not updated: scoped mobile shell/onboarding bugfix, no repo changelog/release-note source found. ## Remaining risk - Full mobile app QA sweep was not run. The latest setup-gate and narrow-topbar proof was Browser/Vite mobile viewport proof; native Android proof was focused on onboarding and sidebar access paths. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Sidebar automatically closes when creating a new chat on mobile devices for a smoother workflow * Enhanced responsive design optimizations for screens under 380px wide * Improved onboarding tutorial integration with better management of app interface interactions during the tutorial experience <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1190?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- 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:12:06 +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#4967
No description provided.