Repository navigation
feat(nav): the mouse forward button retraces a back - #236
Conversation
The window's side-button TapHandler now accepts Qt.ForwardButton beside Qt.BackButton. Forward calls the new Nav.mouseForward, which goes forward through the history behind the same context-menu and collision-card refusal mouseBack uses (now one mouseRefused), does nothing with nothing ahead, and never acts while Trash is open, as Pane.goForward refuses there. The overlay refusals in ui/WindowBody.qml cover both buttons. keys.toml declares the button as a window pointer row, with "forward" in the does legend; ui/js/Keymap.js is regenerated. Tests: tests/js/navmouse.js drives mouseForward (nav.js is at its hard cap), tests/js/tap.js counts the new row, and tests/ui.sh case click presses the real button (ydotool 0xC4) between its two back presses.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe window now handles both back and forward mouse side buttons. Forward input follows pane history when available and is refused under specified overlays. JavaScript and UI tests cover forward navigation and its refusal conditions. ChangesMouse navigation
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant User
participant WindowBody
participant Nav
participant Pane
User->>WindowBody: Press forward side button
WindowBody->>Nav: Call mouseForward(pane) unless Trash is open
Nav->>Nav: Check mouseRefused(pane)
Nav->>Pane: Follow forward history when navigation is not refused
Suggested reviewers: Merge Risk: ⚪ Minimal · up to Forward side-button navigation follows existing history behavior while respecting overlays and Trash. No actionable merge-blocking risk is established; the window integration test remains unrun because its required tool was unavailable. 🚥 Pre-merge checks | ✅ 4 | ❓ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 4 files. (5 skipped: 4 unsupported, 1 too large.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Biome (2.5.13)tests/js/navmouse.jsFile contains syntax errors that prevent linting: Line 1: Expected a statement but instead found '.'.; Line 1: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 1: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 2: Expected a semicolon or an implicit semicolon after a statement, but found none tests/js/tap.jsFile contains syntax errors that prevent linting: Line 1: Expected a statement but instead found '.'.; Line 1: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 1: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 2: Expected a semicolon or an implicit semicolon after a statement, but found none ui/js/Keymap.jsFile contains syntax errors that prevent linting: Line 1: Expected a statement but instead found '.pragma library'.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
merged as authored; the mouse forward button retraces a back (770c611, v0.3.8). Thanks @t1nk333r! https://github.com/thisisgm/flea/releases/tag/v0.3.8 |
What
The mouse's forward side button now goes forward through the history, retracing a back. Issue #20 / PR #49 bound only the back button; forward had no binding.
ui/WindowBody.qml: the window's side-buttonTapHandleracceptsQt.BackButton | Qt.ForwardButtonand branches on the button. Both buttons share the existing overlay refusals (dialogs, preview, share overlay, path bar, rename editors). Forward does nothing while Trash is open, matchingPane.goForward; back still closes Trash. The file stays at its recorded 547 lines.ui/js/Nav.js: addsmouseForward(pane). The context-menu and collision-card refusalmouseBackhad is now one sharedmouseRefused. With nothing ahead, forward does nothing: no climb, no listing request. A press during a load keeps its history entry, asforwardalready guards.keys.toml: a secondwhere = "window"pointer row (press = "forward",does = "forward") andforwardin thedoeslegend.ui/js/Keymap.jsis regenerated.AGENTS.md: updates the pointer-table paragraph, the back-button testing paragraph and the collision-card sentence that said no forward binding existed.Tests
tests/js/navmouse.js(new, 6 checks): covers the back-then-forward round trip, nothing ahead, a press during a load, and refusal behind the context menu and behind the collision card. It is a separate suite becausetests/js/nav.jsis one line under its hard cap; it reusesnav.js'sbrowsing()pane.tests/js/tap.js: the pointer table now has 21 rows, 2 of them for the window.tests/ui.shcaseclick: between its two back presses it now sendsydotool click 0xC4(BTN_EXTRA, which Qt reports asQt.ForwardButton), requires the path forward, and backs again, so the existing climb check still finds the history spent.Verification
./tests/js.sh: 5587 checks, 0 failed../tests/keymap-gen.sh: all ok.cargo test --release --locked: 1139 passed.tools/flea-qmllint-gate: 0 regressions.tools/flea-file-budget: no new growth.tests/ui.sh clickitself, becauseomarchy-drivewas not installed on the test box.Summary by CodeRabbit