Skip to content

Radar: pick a screen quadrant, then sweep from its centre - #1046

Merged
enaboapps merged 3 commits into
mainfrom
claude/1045-quadrant-radar
Oct 13, 2026
Merged

enaboapps merged 3 commits into
mainfrom
claude/1045-quadrant-radar

Conversation

@enaboapps

@enaboapps enaboapps commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1045

What changed

  • Area first. Radar now starts by picking an area of the display the mouse panel is on. The four quarters are drawn with point scanning's grid (the display edges plus the cross between quarters). The highlighted area is filled and outlined, and the areas take turns in this order: top left, top right, bottom left, bottom right, whole screen. Select chooses the highlighted area. The highlight moves once per mouse-scan interval. Next/Previous step one area and wrap. Reverse direction starts at Whole screen and goes backwards. A wrap past either end counts as one pass towards the pass limit. Colour and thickness are the same as the beam's (the cursor overlay colour).
  • Sweep from the centre. Radar::new no longer takes the pointer as its origin. The origin is the centre of the chosen area, and reach()/target() are bounded by that area, so the marker never leaves it. For Whole screen the bound is the display edge. A chosen quarter stays outlined during the direction and distance phases.
  • Back navigation. Workflow::radar_back: Open Mouse during direction or distance goes back to picking an area, with the highlight starting again from the beginning. Open Mouse while picking an area returns to the mouse panel. The runtime used to rebuild the engine for every Open/Mode action, which would have skipped the step back. A new Technique::steps_back hook (default false) lets the workflow keep its scan for that single case: Open Mouse while radar is in direction or distance. From picking an area, Open Mouse still rebuilds as it does today, which also releases a held drag.
  • Quarters split on whole units (floor(width / 2)), so odd-sized displays have no gap or overlap. Geometry uses the display rect and scale already used by point scanning, so negative-origin and scaled (Windows) displays work.
  • point_scan::outline is now pub(crate) so radar can reuse it. No new native rendering: only the existing Frame fills, grid and strips are used.
  • Copy: the Settings status for mouseRadar and docs/point-scan.md (Help and the demonstrations had no radar copy).
  • No protocol, phase string or persisted/synced schema changes.

Judgement calls

  • Pass limit steps back one level, like Open Mouse. An unattended direction or distance goes back to picking an area. An unattended area pick then returns to the panel. Before this change it went straight to the panel.
  • Starting point after going back. Area picking restarts from the first area in the scan direction rather than from the area chosen before.
  • Pointer requirement kept. Radar still shows "Pointer unavailable · Try again" when the pointer can't be read, even though it no longer sweeps from the pointer. Without the pointer the runtime hasn't confirmed which display it is on, so point.screen may be stale.

Validation (Windows, Node 24.13.0, Rust 1.97.1)

  • npm run lint: pass
  • npm test: 13 files, 295 tests passed, plus 12 node tests passed
  • npm run build: pass
  • cargo fmt --check: pass
  • cargo clippy --all-targets -D warnings: pass
  • cargo test at 4860760: 771 passed, 5 ignored (plus 7 in a second target). On an earlier run, the unrelated prediction::tests::cancellation_kills_and_reaps_a_blocked_worker (a 3 s PowerShell-spawn timing check) failed under load and passed on rerun.
  • fmt and clippy were rerun at 4860760 and pass. The npm checks above ran at 5902b30; no frontend files changed after that.
  • npm run prediction-model was not run: it fails locally with an EPERM rename caused by a lock. The gitignored src-tauri/resources/prediction-model, src-tauri/resources/prediction-neural and src-tauri/binaries were copied from the main checkout.

New and updated tests (fake input only):

  • scan_radar: quarter and whole-screen geometry, including a negative-origin, odd-sized display; scan order, wrapping and pass counting; reverse order; origin at the area centre at 1.0 and 1.5 scale; the marker stays inside every area at every whole degree and while stepping or sweeping; quarter reach; back navigation; area frame drawing; the chosen quarter's outline. Existing beam tests now start from Whole screen.
  • point_workflow: area → direction → distance → MouseMoveAbsolute at the quarter's centre line; the Open Mouse back steps and steps_back; a scaled display to the left of the main one; an unattended direction goes back to picking an area and then to the panel.
  • scan_executor: the radar's chosen point moves the fake pointer (move -320 280) inside the top right quarter.

Review notes

  • An independent review of 5902b30 found one low-severity issue. Open Mouse during direction or distance kept the scan without clearing a pause, because a rebuild used to clear it. As a result, a paused radar stepped back to picking an area that never moved. Fixed in 4860760: Session::action now clears the pause when steps_back holds. Test: stepping_back_from_a_paused_direction_resumes_picking_an_area.

Needs real-device checks

Please check on Windows and macOS (npm run macos:run on macOS), ideally with a second display to the left of or above the main one, and on Windows with scaling:

  • The quarter grid, highlight and outline are drawn on the panel's display, are click-through and non-focusable, and clear on Stop, Escape, disconnect and shutdown.

  • The marker stays inside the chosen quarter.

  • Open Mouse during direction or distance goes back to picking an area, and Open Mouse while picking an area returns to the panel.

  • Independent review of the latest head 4860760 reported no actionable findings. It confirmed the pause fix only affects the radar step-back, matches the old rebuild, and its test fails without the fix.
    🤖 Generated with Claude Code

OwenMcGirr and others added 2 commits October 13, 2026 16:36
…ts centre

The radar now starts by highlighting the four quarters of the mouse
panel's display and then the whole display, in turn, using the mouse
scan timing, direction and pass limit. The beam turns around the centre
of the chosen area and the marker stops at that area's edge.

Open Mouse, or an unattended pass limit, goes from the direction or
distance back to picking an area, and from there to the mouse panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@enaboapps enaboapps added this to the v1.0.0-rc.26 milestone Oct 13, 2026
Starting afresh used to clear the pause; keeping the scan in place for a
step back now clears it too, so picking an area moves again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@enaboapps
enaboapps marked this pull request as ready for review October 13, 2026 15:54
@enaboapps
enaboapps merged commit 0776cc2 into main Oct 13, 2026
6 checks passed
@enaboapps
enaboapps deleted the claude/1045-quadrant-radar branch October 13, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Radar: pick a screen quadrant, then sweep from its centre

2 participants