Skip to content

test: expect key-opened panel views to stand on their first row - #5337

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5125
Nov 4, 2026
Merged

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

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

#5039 made every panel view a key opens stand on its first row: g Shift+T, g Shift+L and g Shift+M now focus the first thread, page or card instead of the view. It also opened page threads in the panel on windows narrower than the rail room. Five tests still expected the old behavior, so they failed in the scheduled runs on Linux and macOS (e.g. 41622727492) with to_be_focused reading inactive on .lf-fp-view. This PR changes only those tests, to match what #5039 intended. No product behavior changes.

  • test_go_to_threads_lands_on_threads_from_a_page_thread[1200, 600]: from the page, g T expects the first Threads row. At 600px, the page thread t t reaches is now looked up in the panel as well as in a margin card.
  • test_the_g_chord_reaches_the_all_leaves_panel: expects the first page link right after g L, with no ArrowDown before it.
  • test_a_panel_thread_closes_with_the_panel_as_go_to_threads_does and test_the_g_chord_reaches_named_surfaces_and_visible_targets: expect the first row after g T, and the first On me card right after g M.

On current main, the Threads test failed locally at both widths. All five cases pass with this change (--run-main --run-nightly). The arrow-key walk these tests stopped making is still covered by test_all_pages_takes_the_keyboard. The other two failures noted on the issue already pass on main: #5321 fixed the Versions rollback test, and test_all_pages_takes_the_keyboard passed in the latest scheduled run. The wheel-after-resize journey is #5140's.

Closes #5125 — automated triage

#5039 made every view a key opens stand on its first row (`g Shift+T`, `g Shift+L`,
`g Shift+M`), and opened page threads in the panel on a phone-width window. Four
tests still expected the view itself to hold focus, and the 600px case of the
Threads test still looked for a margin card. They now expect the first row, and the
panel's thread where the window is narrow. No product behavior changes.

Closes #5125
@leaf-agent
leaf-agent merged commit 3e44426 into main Nov 4, 2026
4 of 5 checks passed
leaf-agent added a commit that referenced this pull request Nov 4, 2026
…cuses (#5353)

#5039 made `g Shift+T` stand Threads on its first row rather than on the
view. `test_a_newer_wheel_supersedes_a_panel_resize_landing` still
pressed ArrowDown six times from there. That reached row 6 while the
test watched row 5, so its first `to_be_focused` timed out on Linux and
macOS in every scheduled run since 2 November (e.g.
[41432142330](https://github.com/max-sixty/leaf/actions/runs/41432142330),
[41622727492](https://github.com/max-sixty/leaf/actions/runs/41622727492)).
The test now presses ArrowDown five times. What it protects is
unchanged: a native wheel during a held panel resize keeps the reader's
scroll and focus. #5337 made the same change to five other tests that
#5039 shifted, but it missed this one.

Only the test changes, so no product behavior moves. On current main the
test fails locally at the same assertion. With this change it passes
three times, including once under `--cpu-throttle 4`.

Closes #5140 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Nov 4, 2026
#5039 opens page threads in the floating panel on windows narrower than
the rail room (`--lf-rail-room`, 958px).
`test_a_key_pressed_before_presentation_runs_once_the_page_presents`
runs its touch cases at 390px, so the `t` it holds before presentation
now replays into the panel's thread view instead of a margin card. The
test read `[data-lf-thread="held-thread"]` and took `.first`, which on a
phone resolves to the panel's head (`.lf-fp-head`), an element that
never takes focus, so the scheduled runs failed on Linux and macOS (e.g.
[41432142330](https://github.com/max-sixty/leaf/actions/runs/41432142330))
with `to_be_focused` reading `inactive`.

The assertion now looks for the thread in the panel's thread view or in
a margin card. #5337 made the same change for the 600px Threads test
(`test_go_to_threads_lands_on_threads_from_a_page_thread`). No product
behavior changes. The held key is still held, echoed and replayed once
the page presents, which is the behavior this test protects.

On current main the `[True-module]` and `[True-state]` cases failed
locally with the same message. All four cases pass with this change.

Closes #5137 — 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.

Panel navigation leaves destination views unfocused

1 participant