Repository navigation
Use the panel UI for Home and action menus - #1042
Merged
Merged
Conversation
Every menu kind renders as a scan_panel::Panel with text keys and the panel status header, docked at the shared panel position and moved out of the pointer's way like the keyboard and mouse panels. Point menus keep the crosshair, and Confirm drag also marks the destination. Errors show in the menu's status. The square menu artwork, the tile icon field and the menu title host are removed on Windows and macOS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Long failure messages wrapped past the one-line status tile and lost "Select to return". The status now reads "<Menu> · Action failed · Select to return", and the full message is shown in the shared HUD prompt at the end of the screen the menu panel leaves clear. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The prompt now goes in the larger space the docked panel leaves in the menu's work area, kept inside that area, so it no longer covers tall or middle panels, the taskbar or the menu bar. An empty message reads "Action failed.". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When neither gap above nor below the docked menu fits the prompt, it goes in the wider gap beside the panel at a narrower width. The test covers all nine docks, every panel size and 1280x720 displays at 100, 150 and 200 percent, and checks that pointer avoidance moved the panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1041
What changed
Layout. Every menu kind (Home, Actions, Scroll, Confirm drag, More, Mouse actions and all their submenus) is now drawn as a
scan_panel::Panel, built by a newMenu::frame(screen, units, dock, error)inscan_menu.rs.key_widthis 176, so a three-column menu is about as wide as the mouse panel.Policy::MENUscan timing are unchanged.Header. The panel status tile replaces the floating menu title. Its wording follows the panels:
Home · Select a rowandActions · Select Left clickBack to rows · Select to return<Menu> paused · Select to resume<Menu> · Select to continueKind::Actionsis now titled "Actions" instead of "Choose an action", so it reads as a page name like the panels' pages.Position.
Workflow.dock. With Remember the scanning panel position between sessions #1040 merged, that includes the saved panel position.avoiding()andmove_framepath as the keyboard and mouse panels, so they follow "Move away from the pointer".unsaved_dock/dock_savedflow from Remember the scanning panel position between sessions #1040 applies unchanged. A test now covers Home opening at the restored dock without marking it unsaved.point_scan_runtimenow passes the pointer to the workflow while Home or a point menu is open and pointer avoidance is on. Before, only the keyboard and mouse panels received it.Points. The crosshair still marks the chosen point on point menus. Confirm drag also marks the destination, because the docked menu no longer sits beside it.
Errors. The menu's status stays one short line, for example
Actions · Action failed · Select to return, and nothing is highlighted until Select.<error> Select to return) is shown in the HUD prompt that the countdown and drag-destination prompts also use, so no new rendering code was added.Removed code that became dead.
scan_tile.rs: all of the icon drawing and its helpers, about 750 lines.FrameTile.icon,Item::KeyboardKey,Menu::centered_frameandplace().present_scan_tile.Host::tile.MenuTitle,menu_title_geometryand macOSHost::menu_title.Host::labelandrender_labelno longer take tiles.Settings copy (
ScannerPreferences.tsx).Judgement calls and what was left alone
Policy::MENUand their own colour, thickness, timing and size overrides. The panel policy was not needed.point.screen).mouse_area. Any other menu preferskeyboard_area.menu_area()skips any area that is not insidepoint.screenand falls back topoint.screenitself.FrameTile.style: it stays anOption, even though every tile now has a style, to keep the diff focused.src/helpare separate artwork and were not changed.keyboard_areawhen the keyboard then opens. This change does not touch that. Menus avoid it through the containment check.Validation (Windows 11, Node 24.13.0)
npm run lint: passednpm test: 13 files and 295 tests passed, plus 12 of 12 node testsnpm run build: passedcargo fmt --check: cleancargo clippy --all-targets -- -D warnings: clean (Windows target)cargo testat 1dc0f0a: 761 passed, 0 failed, 5 ignored, plus 7 integration tests passedprediction::tests::cancellation_kills_and_reaps_a_blocked_workerfailed after a 53 s run. The rerun passed in full.npm run prediction-modelwas not run, because of a local EPERM rename lock on this machine. The gitignoredsrc-tauri/resources/prediction-model,src-tauri/resources/prediction-neuralandsrc-tauri/binarieswere copied from the main checkout.scan_host.rscould not be compiled here. An independent reviewer read it and found no compile issues. macOS CI should confirm.frame.label.paused · Select to resume, so a second Select is needed.Needs a real-device check
Check Windows and macOS (
npm run macos:run):Home and each submenu at Small, Medium and Large sizes, on both a single display and multiple displays.
Pointer avoidance on Home and point menus.
That the crosshair is visible when a menu covers the point.
An error message in a menu.
That long labels wrap within keys on both platforms.
Independent review of the latest head
1dc0f0areported no actionable findings. It checked placement of the error prompt above, below or beside the panel on Windows and macOS, confirmed with a deliberately broken version that the placement test catches regressions, and read the macOS code for compile problems.🤖 Generated with Claude Code