[PR #1259] [MERGED] Fix mobile sidebar browser back escape #5007

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1259
Author: @cha1latte
Created: 5/26/2026
Status: ✅ Merged
Merged: 5/26/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-1223-mobile-sidebar-exit


📝 Commits (2)

  • 0eaf14e Fix mobile sidebar browser back escape
  • 17333c8 Add issue 1223 mobile sidebar proof

📊 Changes

6 files changed (+66 additions, -0 deletions)

View changed files

➕ docs/evidence/issue-1223-mobile-sidebar/issue-1223-after-after-browser-back.png (+0 -0)
➕ docs/evidence/issue-1223-mobile-sidebar/issue-1223-after-resize-sidebar-open.png (+0 -0)
➕ docs/evidence/issue-1223-mobile-sidebar/issue-1223-after-sidebar-open.png (+0 -0)
➕ docs/evidence/issue-1223-mobile-sidebar/issue-1223-before-after-browser-back.png (+0 -0)
➕ docs/evidence/issue-1223-mobile-sidebar/issue-1223-before-sidebar-open.png (+0 -0)
📝 src/app/shell/AppShell.tsx (+66 -0)

📄 Description

Linked issue

Closes #1223

Why this change

  • On narrow/mobile viewports, the chat sidebar can become the whole visible app surface. A close button now exists on refactor, but browser Back still had no mobile-panel state to consume, so Back could leave the app instead of returning users to the main surface.

What changed

  • Adds a temporary browser-history entry while a mobile shell panel is open.
  • Closes the active mobile panel on popstate so browser Back returns users to the main app surface first.
  • Consumes that temporary history entry when the user closes the mobile panel with the visible in-app control.
  • Adds scoped UI evidence for the mobile sidebar repro and verification.

Refactor impact

Primary owner:

App shell

Impact areas reviewed:

  • Mobile chat sidebar overlay
  • Mobile right/tracker panel overlay history behavior
  • State-based navigation with no URL router

Boundary notes:

  • Client-only app-shell state fix.
  • No storage, schema, shared API, Rust command, generation, remote runtime, dependency, or version changes.

Pressure points touched:

  • src/app/shell/AppShell.tsx mobile active-panel handling.
  • No ModeSurface, GameSurface, Rust command registration, import modules, or prompt/runtime pressure points touched.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Codex ran node scratch/mobile-sidebar-repro.mjs http://127.0.0.1:5178 before before the fix. The mobile sidebar opened at 320x568, and browser Back left the app instead of closing the panel.
  • Codex ran node scratch/mobile-sidebar-repro.mjs http://127.0.0.1:5178 after after the fix. Browser Back closed the mobile sidebar and kept AppShell visible at the same URL.
  • Codex verified the visible Back to chat control still closes the sidebar at 320x568.
  • Codex verified desktop-to-mobile resize with the sidebar already open at 390x844; browser Back closed the sidebar and kept the app visible.
  • Codex ran pnpm check; dependency cruiser, Rust structure, TypeScript build, cargo check, and docs check passed.
  • Codex ran node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json; proof gate passed.
  • Bunny review pass completed before opening this PR.

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

Before: sidebar open at 320x568.

Before: mobile sidebar open

After: browser Back closes the sidebar and keeps the app visible.

After: browser Back returns to app

Resize path: desktop sidebar resized down to mobile still has an escape path.

After: resized mobile sidebar open


🔄 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/1259 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/26/2026 **Status:** ✅ Merged **Merged:** 5/26/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-1223-mobile-sidebar-exit` --- ### 📝 Commits (2) - [`0eaf14e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0eaf14e568b31161a4495f4fa06277e621c985aa) Fix mobile sidebar browser back escape - [`17333c8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/17333c8afbf5f1cc8e2a76fd1f5e98df8283822a) Add issue 1223 mobile sidebar proof ### 📊 Changes **6 files changed** (+66 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `docs/evidence/issue-1223-mobile-sidebar/issue-1223-after-after-browser-back.png` (+0 -0) ➕ `docs/evidence/issue-1223-mobile-sidebar/issue-1223-after-resize-sidebar-open.png` (+0 -0) ➕ `docs/evidence/issue-1223-mobile-sidebar/issue-1223-after-sidebar-open.png` (+0 -0) ➕ `docs/evidence/issue-1223-mobile-sidebar/issue-1223-before-after-browser-back.png` (+0 -0) ➕ `docs/evidence/issue-1223-mobile-sidebar/issue-1223-before-sidebar-open.png` (+0 -0) 📝 `src/app/shell/AppShell.tsx` (+66 -0) </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 <!-- Every user-facing PR should reference a feature request or issue report when practical. --> Closes #1223 ## Why this change <!-- What user problem, bug, refactor goal, or maintenance need does this solve? --> - On narrow/mobile viewports, the chat sidebar can become the whole visible app surface. A close button now exists on `refactor`, but browser Back still had no mobile-panel state to consume, so Back could leave the app instead of returning users to the main surface. ## What changed <!-- List the key changes in this PR. --> - Adds a temporary browser-history entry while a mobile shell panel is open. - Closes the active mobile panel on `popstate` so browser Back returns users to the main app surface first. - Consumes that temporary history entry when the user closes the mobile panel with the visible in-app control. - Adds scoped UI evidence for the mobile sidebar repro and verification. ## Refactor impact Primary owner: <!-- Examples: app shell, catalog, chat mode, roleplay mode, game mode, runtime generation, world-state, shared API, engine generation, Rust storage, imports, remote runtime. --> App shell Impact areas reviewed: - Mobile chat sidebar overlay - Mobile right/tracker panel overlay history behavior - State-based navigation with no URL router Boundary notes: <!-- Note engine/shared-api/feature/Rust/remote-runtime boundaries. Say "none" only if you checked. --> - Client-only app-shell state fix. - No storage, schema, shared API, Rust command, generation, remote runtime, dependency, or version changes. Pressure points touched: <!-- Mention ModeSurface, GameSurface, shared mode UI, src-tauri/src/lib.rs command registration, or import modules if touched. --> - `src/app/shell/AppShell.tsx` mobile active-panel handling. - No `ModeSurface`, `GameSurface`, Rust command registration, import modules, or prompt/runtime pressure points touched. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app/runtime, step by step. If an AI agent filled this out, verify it yourself before ticking boxes. --> - Codex ran `node scratch/mobile-sidebar-repro.mjs http://127.0.0.1:5178 before` before the fix. The mobile sidebar opened at `320x568`, and browser Back left the app instead of closing the panel. - Codex ran `node scratch/mobile-sidebar-repro.mjs http://127.0.0.1:5178 after` after the fix. Browser Back closed the mobile sidebar and kept `AppShell` visible at the same URL. - Codex verified the visible `Back to chat` control still closes the sidebar at `320x568`. - Codex verified desktop-to-mobile resize with the sidebar already open at `390x844`; browser Back closed the sidebar and kept the app visible. - Codex ran `pnpm check`; dependency cruiser, Rust structure, TypeScript build, cargo check, and docs check passed. - Codex ran `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json`; proof gate passed. - Bunny review pass completed before opening this PR. ## 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 <!-- Add before/after screenshots or recordings for visible UI changes. --> Before: sidebar open at `320x568`. ![Before: mobile sidebar open](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/fix/issue-1223-mobile-sidebar-exit/docs/evidence/issue-1223-mobile-sidebar/issue-1223-before-sidebar-open.png) After: browser Back closes the sidebar and keeps the app visible. ![After: browser Back returns to app](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/fix/issue-1223-mobile-sidebar-exit/docs/evidence/issue-1223-mobile-sidebar/issue-1223-after-after-browser-back.png) Resize path: desktop sidebar resized down to mobile still has an escape path. ![After: resized mobile sidebar open](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/fix/issue-1223-mobile-sidebar-exit/docs/evidence/issue-1223-mobile-sidebar/issue-1223-after-resize-sidebar-open.png) --- <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:25 +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#5007
No description provided.