Repository navigation
Let Home stop a glide that hasn't moved the page, and keep the error dot still after a refused Resolve - #5319
Merged
Merged
Conversation
…s undone or refused `z` on a Resolve, and the log refusing one, returned the user to the thread by a route that chose a surface from the thread as it then stood, not from where the user had it. A thread resolved in its margin card came back in the floating panel, where resolved threads open: the reported case, in which the agent had picked the Resolve up, so `z` showed it before taking it. A thread about a passage that the user resolved in the panel's view came back in a card beside the passage, after `z` and after a refusal alike. The surface that settles a thread now names the reader the user had it in (`reader`, thread/folding.js): the panel's view names the primary reader, a margin card the page. folding.js returns the user there when the log refuses the settlement, and undo.js keeps the reader under the gesture's attempt: showing the settlement opens it there, and so does taking it back, by any of `z`'s three ways or the notice's Undo. The thread destinations own the route: `openPageThread`'s `page: true` becomes `reader: "page"`, and the new `reader: "primary"` asks the primary reader to show the thread as its last resort is asked, without handing it back to the page once the page could draw it, and closes the page's card, so one thread stands open. Seats and a primary reader's parts name no reader and keep the route's own choice. A settlement from another tab or before a reload has no reader and opens as a route opens it. Behavior changes: - Resolve in the panel's view, then `z` or a refusal: back in that view, not in a card. - Resolve in a card, then `z` once the user has scrolled away or the agent has picked it up: the first press shows the passage and the second opens the card, with no turn through the panel. - Taking back a settlement this tab made returns the user to its thread even when its place was already in view, as when a small scroll cleared the landing's arm. - A settlement's notice names the thread by its name, as `z` names the same gesture; it named it by the words it is about, so the two notices gave one thread two names. The panel row's notice now ends long words in an ellipsis before Undo, where it wrapped to two lines and stood Undo over its key. Known gap: resolve in a card, narrow the window until no card can stand, then `z`: the thread reopens and the user lands on its margin marker, as Show on page lands on a narrow window, rather than in the panel. Tests: `test_a_thread_resolved_in_the_panel_comes_back_to_the_panel` and `test_z_shows_a_thread_resolved_in_its_card_by_its_passage` fail on the base and pass here. Undo, resolve, refusal, notice, row and fold selections in test_resolving.py, test_render_outbox.py, test_render_floating_panel.py, test_render_aim.py and test_render_reactions.py pass, except five that fail the same way on the base: `test_a_remote_resolve_disarms_the_open_reply_list_it_takes_away`, `test_z_names_what_it_takes_and_how_long_ago_in_a_fresh_tab`, `test_a_pointer_folds_the_panel_from_its_corner` and both `test_borrowed_scroll_stops_leave_code_selection_and_marks_with_their_owners` cases. `pnpm run check` and `pnpm run test:runtime` pass.
# Conflicts: # dist/kernel/kernel.json # dist/kernel/runtime/bundle-data.js
Only the rebuilt kernel conflicted; it is main's, rebuilt from the merged sources. Brought this branch's additions up to main's conventions: the two new tests read the panel's thread by `data-lf-thread` (#5244), and the two comments that pointed at destination.js's `page` option now name `reader: "page"`, its name on this branch. test_z_shows_a_thread_resolved_in_its_card_by_its_passage now waits for the page to scroll to the card before resolving it. After this merge, Shift+t focused the card before the page had scrolled there, and Home pressed during that scroll lost to it in two runs out of three under xdist.
…ne the DOM holds A refused Resolve in the panel's thread view leaves its error in the field. The next Resolve closes the view, and the paint that closes it read the field before moving the page's editor in: `sayable` required the editor to be connected, found the departing reply's place empty, and counted the error as unsaid. The leaf's error dot was set for that paint and cleared by the next one in the same task, which the write watch reports as an unchanged write. `sayable` now reads the editor `fieldInput` names, the one the paint stands in the field, whether or not it stands there yet. A folded panel, a search and a view with no editor still say none. The panel-refusal test in test_resolving.py now resolves once more after the refusal, which failed on the write watch before this change.
# Conflicts: # dist/kernel/kernel.json # dist/kernel/leaf.js
…moves nothing Shift+t, then Home before the page had started moving, left the page at the card: Home at the top scrolls nothing, and a glide stood down only when another hand moved its box, so it carried the page down regardless. A probe that sends Home 0–300 ms after the t keydown lost Home in 15 of 21 Chromium runs; with this change, in none of 21, and in none of 8 Firefox runs with frames held so Home lands before the first. A wheel, a touch, or one of the browser's scroll keys pressed outside a field that takes it now stops every glide in a box on the event's path. Keys Leaf binds, such as `r` or `d`, still leave a glide running, so a press made mid-glide still lands where the glide is headed. The old rule stays for a hand that moves the box without an input Leaf sees, such as a scrollbar's drag. test_keys_pressed_while_the_page_moves_act_as_if_it_had_landed gains a phase: `d` and Home pressed before a frame runs end at the top. It failed before this change (the page ended one step down).
leaf-agent
approved these changes
Nov 4, 2026
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.
Two fixes that came out of the undo review (#5286).
Home pressed before a glide has moved the page keeps it at the top
Shift+t, then Home before the page had started moving, left the page at the card. Home at the top scrolls nothing, and a glide stood down only when another hand moved its box, so it carried the page down regardless. A probe that sends Home 0–300 ms after the t keydown lost Home in 15 of 21 Chromium runs before this change and in none of 21 after; in Firefox, with frames held so Home lands before the first, none of 8 lost it.
A wheel, a touch, or one of the browser's scroll keys pressed outside a field that takes it now stops every glide in a box on the event's path (
aimsScrollinscrolling.js). Keys Leaf binds, such asrord, leave a glide running. A hand that moves the box without an input Leaf sees, such as a scrollbar's drag, still stops it as before.test_keys_pressed_while_the_page_moves_act_as_if_it_had_landedgains a phase:dthen Home, pressed before a frame runs, end at the top. It failed before this change, with the page one step down.A refused Resolve no longer sets and clears the leaf's error dot in one task
After the server refused a Resolve in the panel's thread view, its error stood in the field. The next Resolve closed the view, and the paint that closed it read the field before moving the page's editor in:
sayablerequired the editor to be connected, found the departing reply's place empty, and counted the error as unsaid. The error dot was set for that paint and cleared by the next one in the same task, which the write watch reports as an unchanged write.sayablenow reads the editorfieldInputnames, the one the paint stands in the field. A folded panel, a search and a view with no editor still say none.test_a_thread_resolved_in_the_panel_comes_back_to_the_panelnow resolves once more after the refusal, which failed on the write watch before this change.Testing
The two tests above, the other glide, wheel and scroll-key tests in
test_obligation_walk.py,test_panes.py,test_covering.pyandtest_render_send_placement.py, the error and refusal tests across the panel and drafts,pnpm run test:runtimeandpnpm run check:framework. Two of those fail locally with and without this change:test_a_wheel_return_attaches_the_comment_box_in_the_first_visible_frame[combined-selection](#5182) andtest_a_click_on_a_panes_words_makes_it_the_subject_of_every_scroll_key.