Skip to content

Read a hint map again once the page shows a script's scroll - #6055

Merged
max-sixty merged 3 commits into
mainfrom
motion-ahead
Nov 16, 2026
Merged

max-sixty merged 3 commits into
mainfrom
motion-ahead

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

t g Tab Enter typed 60–80 ms apart in Chromium ended in the thread card's Reply field, where typed slowly it opens the thread in the panel. g lands the walk's glide and reads the Go-to map in the same task, but a box CSS anchors to page content, such as the thread card, takes a script's scroll only at the next rendering update. So the margin entry the card covers read as uncovered and got a hint, which Tab walked to. The map's re-read at the scroll's end also came before that update, so the stray hint stayed.

  • arrivals.js records each scroll write a script makes and says when the page shows it (scrollDrawn, two frame callbacks later). stopBrowserScroll waits on it in place of its own two frames.
  • The hint session, shared by Go-to and the target picker, reads its map at once as before, and again once the scene is drawn. Its re-read at a scroll's end waits for that too.

Where to look: a key pressed within two frames of a landing still reads the undrawn scene. That covers the known Chromium t-then-Tab case, and a let-go Codex found with keys ~10 ms apart, which fails on main too.

Max asked for a review of a proposed redesign; this fixes the failure that redesign was meant to address. Tests: a Go-to browser test that fails on main; the probe ends as typed slowly in 6 of 6 runs at 60 ms gaps, against 0 of 6 on main; the glide matrix's g and t cases; test:runtime; check:browser. Codex reviewed it.

This was written by Claude Code on behalf of max-sixty

`t g Tab Enter` typed 60-80 ms apart in Chromium at 1440x900 ended in the
card's Reply field, where typed slowly it opens the thread in the panel: the
Go-to map `g` armed as the walk landed named the thread's margin entry, which
the card the walk opened covers, and Tab walked to it. A box CSS anchors to
page content takes a script's scroll only as the next rendering update lays
the page out, so in the task where `g` landed the glide, the card still stood
where the glide had carried it and the entry read as uncovered. The map's
re-read at the scroll's end didn't correct it, since a script's scroll ends
before that update; the entry kept its hint until something else re-read the
map.

arrivals.js now records each scroll write a script makes (`setScroll`,
`stopWhereItStands`) and says when the page shows it (`scrollDrawn`), two
frame callbacks later. The hint session reads its map only from a drawn
scene: armed before then, it holds no members until it is, and its re-read
at a scroll's end waits for it too. `stopBrowserScroll` waits on the same
promise for its stop, in place of its own two frames. A reader waits only for
the writes made before it asked, so a log kept at its end as it streams holds
no reading back.

At 60 ms between keys, 4 of 4 Chromium runs now end as typed slowly, against
0 of 4 before; Firefox ended right before and after. Keys pressed within the
two frames of a landing still read the undrawn scene.
…ce it is

Codex's review found that the first commit left an armed map empty until the
landing was drawn, so a hint letter typed in those two frames was refused and
Tab and Enter reached other commands, where on main they acted on the map read
at once. The map is read at once again, as on main, and read again once the
scene is drawn, keeping the target Tab had reached where it keeps its code,
unless a letter typed meanwhile holds it. The re-read is the one a paint makes
at rest (`readAgain`).
@max-sixty max-sixty changed the title Read a hint map only from a scene the browser has drawn Read a hint map again once the page shows a script's scroll Nov 16, 2026
@max-sixty
max-sixty merged commit 7d4ef63 into main Nov 16, 2026
5 checks passed
@max-sixty
max-sixty deleted the motion-ahead branch November 16, 2026 00:14
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.

2 participants