Skip to content

fix(agent): follow the pointer again after a shortcut it never saw move; a menu bar glyph 1x can draw - #20

Merged
rbstp merged 2 commits into
masterfrom
fix/handover-unseen-arrival
Sep 6, 2026
Merged

rbstp merged 2 commits into
masterfrom
fix/handover-unseen-arrival

Conversation

@rbstp

@rbstp rbstp commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Control-Command-1 to 9 hands the window it focuses a hold: focus stays there until the pointer travels to another window and rests on it. The same keystroke starts the typing cooldown, and for that half second no tick is allowed to look at the pointer -- long enough to cross to another screen, or to leave the window the pointer was on and come back. Both left focus stuck on the window the shortcut chose.

A pointer that arrived while nothing was looking was already at rest by the time anything looked, which read as a window arriving under a still pointer rather than as an entry, and the contest was dropped. A pointer that went out and came back landed on the anchor -- the one window a hold can never be overruled by -- so it held for good.

A hold now remembers where the pointer was and the frame it was in, and every tick folds in the pointer's position whether or not that tick may act on it. Leaving the frame spends the anchor for good, so coming back is an arrival like any other, and travel between two decisions counts as travel even when no tick watched it happen.

A window arriving under a pointer that has not moved still cannot take focus. That was the point of asking for movement in the first place, so the evidence of unwatched travel is spent on the one contest it explains; a hold declared with the pointer already outside the anchor is born spent rather than exempting a window the pointer had left; and movement that never leaves the anchor is measured from, not treated as, travel.

Two known edges, both benign and both left alone: a window dragged out from under a stationary pointer takes its frame with it and the saved one goes stale, which spends the anchor early and lets focus follow the pointer to the window it is on; and an excursion onto a window that overlaps the anchor, without leaving the anchor's own rectangle, is invisible while decisions are suppressed, so the hold stands as it did before.

The menu bar glyph is cursorarrow.motionlines rather than cursorarrow.rays. The rays draw a half-size pointer inside their box, which on a 1x display is an eight-pixel arrow behind one-pixel rays -- a smudge on the 1080p screen while looking correct on the Retina one beside it. The symbol is also left at the size AppKit ships it: sizing it by hand leaves the alignment rect behind, and the status item is laid out for the tallest menu bar on the system, so the glyph was drawn off centre and clipped in the shorter bar of an external display. The app icon follows the same symbol.

Tested by driving the pointer and the shortcuts with posted events against the running agent: the reported sequence now releases and follows, while the hold still survives a pointer that never leaves its window, a Cmd-Tab handover, and the step shortcuts. 190 unit tests, with the new ones checked against the unfixed code first.

Control-Command-1 to 9 hands the window it focuses a hold: focus stays there until the pointer
travels to another window and rests on it. The same keystroke starts the typing cooldown, and for
that half second no tick is allowed to look at the pointer -- long enough to cross to another
screen, or to leave the window it was on and come back. Both left focus stuck. A pointer that
arrived while nothing was looking was at rest by the time anything looked, which read as a window
arriving under a still pointer rather than an entry; and a pointer that came back to the window it
set out from was on the one window the hold could never be overruled by.

A hold now remembers where the pointer was and the frame it was in, and every tick folds in the
pointer's position whether or not that tick may act on it. Leaving the frame spends the anchor for
good, so coming back is an arrival like any other, and travel between two decisions counts as
travel even when no tick watched it happen. A window arriving under a pointer that has not moved
still cannot take focus: that evidence is spent on the one contest it explains, and a hold declared
with the pointer already outside the anchor is born spent rather than exempting a window the
pointer had left.
cursorarrow.rays draws a half-size pointer inside its box to leave room for the rays, which on a 1x
display is an eight-pixel arrow behind one-pixel rays: a smudge on the 1080p screen while looking
correct on the Retina one beside it. cursorarrow.motionlines keeps the pointer full size and says
the same thing, and it is now what the menu bar and the app icon both draw.

The symbol is also left at the size AppKit ships it. Sizing it by hand leaves the alignment rect
behind -- the rect is 9 points of an 18 point image -- and the status item is laid out for the
tallest menu bar on the system, so the glyph was drawn off centre and clipped in the shorter bar of
an external display.
@rbstp
rbstp merged commit 049a6a4 into master Sep 6, 2026
1 check passed
@rbstp
rbstp deleted the fix/handover-unseen-arrival branch September 6, 2026 17:46
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.

1 participant