Repository navigation
test: expect key-opened panel views to stand on their first row - #5337
Merged
Merged
Conversation
#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
This was referenced Nov 4, 2026
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]>
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.
#5039 made every panel view a key opens stand on its first row:
g Shift+T,g Shift+Landg Shift+Mnow 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) withto_be_focusedreadinginactiveon.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 Texpects the first Threads row. At 600px, the page threadt treaches 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 afterg L, with no ArrowDown before it.test_a_panel_thread_closes_with_the_panel_as_go_to_threads_doesandtest_the_g_chord_reaches_named_surfaces_and_visible_targets: expect the first row afterg T, and the first On me card right afterg 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 bytest_all_pages_takes_the_keyboard. The other two failures noted on the issue already pass on main: #5321 fixed the Versions rollback test, andtest_all_pages_takes_the_keyboardpassed in the latest scheduled run. The wheel-after-resize journey is #5140's.Closes #5125 — automated triage