Repository navigation
Read an undo's place where the walk's scroll leaves it - #6460
Merged
Merged
Conversation
⌘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.
# Conflicts: # browser/runtime/undo.js
leaf-agent
approved these changes
Nov 19, 2026
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_
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.
⌘Z pressed during a scroll Leaf runs, such as the 140 ms scroll
tstarts 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
seennow callsseenLanded, 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.pyandthreads/test_resolving.py,pnpm run test:runtimeandcheck:browserpass.