Repository navigation
Description
On a phone-width window, Show on page for a thread on an lf-diff line leaves the user nowhere: the panel folds, the diff's inline thread seat is removed, the line carries no lf-mark-here, there's no margin marker (the seat replaces it), and focus falls to body. #5039 says Show on page on a phone "folds the panel, brings the passage into view and lands on its marker". A thread seated in a widget has no marker, so that landing has nothing to stand on.
tests/browser/test_render_anchors.py::test_a_deferred_diff_renders_only_opened_files_and_hydrates_comment_travel[keyboard-False] catches this. It resizes to 400×900, opens the second file's thread and presses Show on page. After the deferred file is released, the outlet briefly reaches count 1. Then landed() times out waiting for focus inside .lf-diff-thread-outlet .lf-page-thread. Sampling the page every 250 ms for 3 s after the press reads the same thing each time: activeElement is BODY, with 0 outlets, 0 panel views, 0 margin markers, and 0 .lf-mark-here or .lf-traced.
Until #5342, a separate interceptor bug (#5071) made this test fail earlier, which hid this failure. With that interceptor corrected, the case passes at e698b75 (#4873), and git bisect over e698b7552..dc27bd09e names d000889 (#5039) as the first bad commit.
@max-sixty, this needs your call on #5039's phone rule for threads seated in a widget. One option is for Show on page to land in the seat, as on a wide window. The other is for the seat to give way to the panel, with the test's narrow case expecting some other landing, such as the line itself. Either way, focus on body with nothing traced doesn't match #5039's stated landing. The [mouse-False] and [mouse-True] cases of the test (wide window) pass.
Reproduce
On a checkout with #5342's one-character interceptor fix:
uv run pytest -q "tests/browser/test_render_anchors.py::test_a_deferred_diff_renders_only_opened_files_and_hydrates_comment_travel[keyboard-False]"Bisect script: apply the same args[1] → args[0] substitution in HOLD_SECOND_FILE, run the node id above, then git checkout the file.
Cause of a failure tracked in #3985.
Activity
max-sixty commentedon Nov 5, 2026
Max's decision from the backlog triage: go ahead with this repair.
Repair: On a phone, Show on page lands in a widget-seated thread's seat, as it does on a wide window.
What decides it: One rule at every width; the seat is where the thread stands on the page.