Repository navigation
fix(mobile): close a menu sheet on Back instead of switching panes - #837
Conversation
Since deep links made each pane a history entry, the system Back on a phone with a ⋯ sheet open went to the previous pane and left the sheet up. A sheet now holds a history entry of its own: Back closes it, and a sheet closed any other way steps off its entry once the closing click's effects have run, so no Back press is wasted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to The More sheet’s Back behavior is mergeable after normal checks; no actionable issue remains from this review. Pre-merge checks |
|
Review findings on the sheet entry (Codex, pre-merge): - More → New tab closed the dialog by itself: the app replaced the sheet entry's address with the dialog's, and the sheet's cleanup then stepped back off it. An entry whose address changed while the sheet left is kept. - A navigation an item pushed (another pane, Settings, a file) left the sheet's entry between, so Forward landed on a duplicate. The push now replaces the sheet's entry; a sheet opened from a sheet reuses it. - Forward onto the entry of a sheet Back closed went back again; it goes on. Unit tests drive the module through a fake history; the phone deep-link check covers New tab and Move pane to… from the More sheet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…842) ## Problem #837 made a phone's ⋯ menu sheets (RowMenu) close on Back. The other dialogs a phone draws as bottom sheets still had no history entry, so Back opened the previously selected pane under them and left the dialog up. Seen on the plan sheet (header `1/3` button) during mobile testing. ## Change - `usePhoneSheetBack(onBack, open = true)` in `src/lib/sheetHistory.ts`: `useSheetHistory` gated on `SHEET_QUERY` (≤640px), so wider screens keep today's behavior (the desktop test that Back under the palette selects a pane is unchanged). - Applied to `PlanDialog`, `CommandPalette` (with its `open`), `ConfirmDialog`, `FilesDialog`, `WorktreeDialog`, `PaneRename` and `MermaidLightbox`. A dialog busy with its action (`pending`/`running`/`busy`) ignores Back, as its swipe-to-close already does. - Settings, New workspace and the file viewer are left alone: they already own history entries. - The merged `sheetHistory` handles the rest: a dialog opened from a ⋯ sheet (More → Command palette) reuses the sheet's entry, and a navigation made from a dialog takes it over. ## Tests - `deep-link-demo-regression`'s phone case now also opens the plan (Back closes it, pane kept) and the palette from More (takes the sheet's entry, Back closes it), then walks Back to the earlier panes. It fails without the component changes ("the plan is an entry"). - `bun run check fast`, `tab-menu-regression`, `mobile-tabs-regression`, `ui-regression`, `file-viewer-mobile-regression`, `file-viewer-regression` and `settings-pages-demo-regression` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Change Release 0.4.8, from main at ca6db6e (20 PRs since v0.4.7: the 0.4.7 mobile walk-through fixes, two contributor PRs and the revived #793). - `package.json` and `herdr-plugin.toml`: 0.4.8. - CHANGELOG: `[Unreleased]` becomes `[0.4.8] - 2026-10-12`, with the compare links. Twelve entries that had no PR link get theirs (#835 #837 #838 #840 #842 #843 #844+#848 #845 #847 #849 #851 #852). A Maintenance line says the remote-PC runtime is now version 27. - `release-summaries.json`: 0.4.8 in en/ko/ja/zh/tr (3 new, 6 improved, 8 fixed). The Turkish lines are not checked by a native speaker. - `REMOTE_BUNDLE_VERSION` 26 -> 27: #836 adds the `pending-hold` server feature and #787 serves precompressed assets, so `remote-v27` is published before the app release. Every PR merged since v0.4.7 is linked in the section: #787 #788 #793 #835 #836 #837 #838 #839 #840 #841 #842 #843 #844 #845 #846 #847 #848 #849 #851 #852. ## Validation - `bun scripts/release-notes.ts 0.4.8` renders the summaries and the full changelog (116 lines). - `bun run check fast`: generated types, typecheck, build and 2800+ unit tests pass. ## Release After this merges and its CI on `main` passes: push `remote-v27`, wait for its release, then run the Release workflow with `0.4.8`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Problem
On a phone, with a ⋯ menu open as a bottom sheet (header More, tab menu, row menus), the system Back button did not close the sheet: it went back to the previously opened pane, because #762 made every pane switch a history entry and the sheet had none.
Change
src/lib/sheetHistory.tswithuseSheetHistory(active, onBack):history.stateinto a new entry (the file viewer) does not copy the sheet's mark;RowMenuuses it in sheet mode only. Desktop popovers and other modals (palette, dialogs) are unchanged.Tests
deep-link-demo-regressiongains a phone case: Back with the More sheet open closes it and keeps the pane; Cancel then Back goes to the previous pane in one press. It fails without the fix ("an open sheet is an entry").bun run check fast,tab-menu-regression,mobile-tabs-regression,ui-regressionandfile-viewer-mobile-regressionpass.🤖 Generated with Claude Code