Skip to content

Read an undo's place where the walk's scroll leaves it - #6460

Merged
max-sixty merged 2 commits into
mainfrom
undo-take-at-once
Nov 19, 2026
Merged

max-sixty merged 2 commits into
mainfrom
undo-take-at-once

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

⌘Z pressed during a scroll Leaf runs, such as the 140 ms scroll t starts toward a thread, now reads whether the user saw its gesture where that scroll will land rather than where it stands. Before, a choice still in view at the press was taken without travel, and the scroll then carried the user to the thread, away from what the undo changed: pressing Shift+t then ⌘Z before the scroll's first frame left the choice out of view in 3 of 3 runs. #6429's description named this as found in review and not yet probed.

Undo's seen now calls seenLanded, the glide-aware reading the reading place already uses, which gains the destination's box and the at-rest reading of covers that #6429 gave undo for a panel closing over its place. Its other callers pass neither and read as before.

To weigh: the reading place, the user's place and the current target still read covers as drawn now while they read glides where they land, so a key pressed as a panel closes is judged against the panel. Nothing reported has hit that.

Checks: the new test presses ⌘Z before the walk's first frame and waits for the travel to the choice; it times out against the old reading and passes in Chromium and Firefox. The 27 undo tests in test_render_outbox.py and threads/test_resolving.py, pnpm run test:runtime and check:browser pass.

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

⌘Z pressed while a scroll Leaf runs is still under way, such as the 140 ms
scroll `t` starts toward a thread, read whether the user saw its gesture
where that scroll stood, not where it would land. A choice still in view
at the press was taken without travel, and the scroll then carried the
user to the thread, away from what the undo changed. In a probe pressing
Shift+t then ⌘Z before the scroll's first frame, with the choice in view
and the thread 2,260 px above, the undo took the choice and left the page
at the top in 3 of 3 runs, the choice out of view; pressed 2 or 5 frames
in, the choice had already left view and the undo travelled to it.

Undo now reads its place as `seenLanded` does for the reading place: moved
by the glides under way, which this also measures with the destination's
own box and covers at rest, the reading #6429 gave undo for a panel
closing over its place.

The new test presses ⌘Z before the walk's first frame and waits for the
travel to the choice; it times out against the old reading. It passes in
Chromium and Firefox.
@max-sixty
max-sixty merged commit 8222124 into main Nov 19, 2026
5 checks passed
@max-sixty
max-sixty deleted the undo-take-at-once branch November 19, 2026 02:33
max-sixty added a commit that referenced this pull request Nov 27, 2026
Comment only. `undo.js`'s header now names the simpler design that is
open should undo's press-time reading of visibility keep needing fixes:
⌘Z returns the user to where they stood when they made the gesture in
this tab (`records/history.js`, `readPlace`) and otherwise moves nobody,
giving up travel to a gesture made far away.

That reading has needed three fixes (#6429, #6460, #7369), and #7396 is
a fourth case it misreads, a widget hidden in a closed disclosure. All
29 undos in this machine's page logs came within 33 s of their gesture,
so none needed the far travel.

Asked for by max-sixty after #7369.

> _This was written by Claude Code on behalf of max-sixty_
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