Repository navigation
fix: repair the sixteen journeys #6796 broke, and clear a diff's search in the thread row's own press - #7046
Merged
Merged
Conversation
…ff's search hides in the press's task #6796 made "threads open in the panel" a choice kept for the tab. Its journeys, which run only nightly, still read the old routing: - choose_threads_in_panel called window.__lfCheckApi, which only a watched page defines, so test_pressed_controls (9 cases) failed on its unwatched page. It now imports the check API from the page's entry. - open_panel_thread chooses the panel, and later steps expected a margin card or the inline seat from `t` or a marker press. Those steps now choose cards again first (test_chrome_contracts, the diff lifecycle in test_render_anchors, each scope of the focus-ring sweep). - A Threads row opens a passage's thread in its card by default, so the site's comment test chooses the panel before reading the panel's view, and the demo recording reads the answer in the card and closes the card. The demo scrolls the board's section to the top before the drag, since the panel's row covered the card it drags. - Show on page chooses cards, so it lands on the thread rather than in its reply (thread/focus.js, `openingPart`); the data-bound diff test expects that. Behavior change: under the panel choice, a route that travels drew the passage's widget part only after the reader's awaits, so a Threads row press cleared a diff's search outside the press and the typed-words watch reported the search's words as lost. inPrimary now starts drawing the part in the gesture's own task, as the page's route does, sharing the condition (partUndrawn). The data-bound diff test refills the search before Show on page, so that press's own clearing is still checked. Closes #7017
This was referenced Nov 24, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 24, 2026
…ands (#7074) `test_keyboard_file_navigation_keeps_its_destination_beside_a_retained_reply` has failed on `main` since #7046 ([run 45468221584](https://github.com/max-sixty/leaf/actions/runs/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 Co-authored-by: leaf-agent <[email protected]>
This was referenced Nov 24, 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.
#6796 made "threads open in the panel" a choice the tab keeps. Sixteen nightly journeys still assumed the old routing, and #6796's own CI didn't run them, because
journeys/runs only nightly. Each repair keeps #6796's intent: the default is cards, the panel route chooses the panel, and Show on page chooses cards and lands on the thread. One fix is in the runtime: under the panel choice, a Threads row press cleared a diff's search after the route's awaits rather than in the press's task, so the typed-words watch reported the search's words as lost. All sixteen cases fail onmainand pass on this branch, together with the browser tests of the thread routes (test_threads_in_panel, diff travel intest_seated_threadsandtest_render_anchors),test:runtimeandpnpm run check.Runtime change. Under the panel choice, a route that travels drew the passage's widget part only after the reader's awaits (
scrollToThread). The card route and Show on page draw it in the gesture's own task.inPrimarynow startsrevealThreadin the press's task too, and shares its condition with the card route aspartUndrawn(thread/destination.js). What the user sees doesn't change: the search clears and the line shows, as #6796 intended. The clearing now belongs to the press.Test repairs
test_pressed_controls, 9 caseschoose_threads_in_panelcalledwindow.__lfCheckApi, which only a watched page definestest_chrome_contractsconversation, 2 cases;test_render_anchorsdiff lifecycle;test_render_controlsfocus ringsopen_panel_threadchooses the panel, so a later marker press ortopened the panel instead of the card or seattest_render_anchorsdata-bound diffopeningPart). The row press now clears the search, so the test fills it again before Show on page to keep checking that press's clearingtest_sitecomment persistencetest_demo_recording_drives_the_browser_journeyDecision for the maintainer: what the demo shows.
leaf-dev site demonow reads the agent's answer in the thread's card beside the passage, #6796's default, rather than in the panel. So the next published GIF and README stills will show the card. The panel's row then covered the board card the demo drags, so the demo now scrolls the board's section to the top before the drag. If the README should keep showing the panel, the demo can press the card's Open in panel first, which also puts that choice's notice on screen. The assets pin is unchanged, so nothing published moves until someone reruns the demo. The still this branch records:The macOS
test-macoscrash in the focus-ring sweep wasn't reproduced here. It ran the same sweep, so the next scheduled run will show whether it persists.Closes #7017 — automated triage