Skip to content

fix: repair the sixteen journeys #6796 broke, and clear a diff's search in the thread row's own press - #7046

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

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

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

#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 on main and pass on this branch, together with the browser tests of the thread routes (test_threads_in_panel, diff travel in test_seated_threads and test_render_anchors), test:runtime and pnpm 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. inPrimary now starts revealThread in the press's task too, and shares its condition with the card route as partUndrawn (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

Tests Cause Repair
test_pressed_controls, 9 cases choose_threads_in_panel called window.__lfCheckApi, which only a watched page defines The helper imports the check API from the page's entry
test_chrome_contracts conversation, 2 cases; test_render_anchors diff lifecycle; test_render_controls focus rings open_panel_thread chooses the panel, so a later marker press or t opened the panel instead of the card or seat Choose cards again before that step, and before each focus-ring scope
test_render_anchors data-bound diff Show on page chooses cards, so it lands on the thread, not its reply (openingPart). The row press now clears the search, so the test fills it again before Show on page to keep checking that press's clearing Expect the thread focused; refill the search
test_site comment persistence A Threads row opens a passage's thread in its card by default Choose the panel before reading the panel's view
test_demo_recording_drives_the_browser_journey Same: the reply shows in the card Below

Decision for the maintainer: what the demo shows. leaf-dev site demo now 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:

README still recorded on this branch, with the thread in its card

The macOS test-macos crash 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

…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
@leaf-agent
leaf-agent merged commit b39f054 into main Nov 24, 2026
7 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7017 branch November 24, 2026 19:06
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]>
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.

Sixteen nightly journeys fail since #6796 kept the threads-in-panel choice for the tab

1 participant