Skip to content

fix: draw a last-resort thread's part only after the primary's view lands - #7074

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7071
Nov 24, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-7071

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_keyboard_file_navigation_keeps_its_destination_beside_a_retained_reply has failed on main since #7046 (run 45468221584). After the user leaves a reply in a diff seat and moves to another file, g i should bring them back into the reply. Instead focus stays on the file tree. git bisect run over the test names b39f054 (#7046) as the first bad commit, and the test fails every time on main.

Cause. #7046 had inPrimary start revealThread in the press's own task, so that under the panel choice a diff's search clears in the press rather than after the route's awaits. While the user is on another file, the panel holds the reply's thread as the last resort. g i asks the panel to show it, and the early reveal now draws the thread's line in the diff before the panel's view has landed. The page drawing the thread sends it back there (returnToPage), which aborts the route before it focuses the reply. Before #7046, the line was drawn only after the user landed in the panel's view, which then handed the reply to the page's seat.

Fix. The early reveal skips a thread the primary holds as the last resort (lastResort). Such a thread's part is drawn after the view lands, as before. A route under the panel choice holds no last-resort thread, so #7046's search clearing still happens in the press's task.

Verification. The failing test fails on main and passes on this branch. These also pass: all of test_reply_sessions and test_threads_in_panel; test_seated_threads; the two diff journeys #7046 repaired in test_render_anchors (test_a_data_bound_diff_aims_and_selects_one_source_line, test_a_diff_surface_keeps_the_complete_thread_lifecycle_inline); and pnpm run test:runtime.

Closes #7071 — automated triage

…ands

#7046 started revealThread in inPrimary's own task whenever a travelling route found the thread's part undrawn. Where the primary held the thread as the last resort, as the panel holds a reply whose diff file the user left, that drawing gave the thread a seat on the page before the panel's view landed. returnToPage then took the thread back and aborted the route before focus moved, so `g i` left the user on the file tree instead of in their reply. The early drawing now skips a thread the primary holds as the last resort, which draws its part after the view lands, as before #7046. The panel-choice route #7046 fixed still draws in the press's task.

test_keyboard_file_navigation_keeps_its_destination_beside_a_retained_reply fails on main and passes here.

Closes #7071
@leaf-agent
leaf-agent merged commit d874a93 into main Nov 24, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7071 branch November 24, 2026 21:39
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.

ci failing on main (push)

1 participant