Repository navigation
Close Threads when Tab lands on a page stop it stands over - #3164
Merged
Merged
Conversation
Where the window leaves a usable page beside it, Threads stands over the page's right side and leaves the page live, so Tab still reached page controls under the panel: focus and its ring went where the user could not see them. With the panel open, 6 of the 22 examples have such stops at 1440px (13 of 63 page stops), and 2 still do at 1920px, mostly code blocks' Copy buttons and wide exhibits at the right edge. Travel already clears a surface that hides its destination (`clearFor`). Tab and key-led moves are trips the keyboard makes, so the surfaces owner now hears them (`onStanding`, causes `step` and key-led `move`) and applies the same rule. A press lands on what the user could see and a return where they already stood, so neither clears. The nightly Tab walk now goes on with the panel closed once a stop closes it. That put the walk's thread list in a new state, where revealing a thread that narrowing had hidden first painted the list's previous choice open, closing the hidden card, and then reopened it in the same task. The reveal now chooses the card before narrowing lets it back in, so the list's paint opens it once. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 19, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 19, 2026
The remaining failure in [main CI run 39312200383](https://github.com/max-sixty/leaf/actions/runs/39312200383) is an outdated browser test expectation. [#3164](#3164) made keyboard focus close Threads when the panel covers its destination. In this fixture the margin marker is under Threads, so focusing it closes the panel; the old test then waits for a thread inside that closed panel to expand. Update the existing case to follow the visible route: focus exposes the marker, Enter opens its page card, and `c` focuses that card’s reply box. The note route still verifies that a target beside the panel expands its thread in Threads. This keeps both user paths covered without changing the runtime behavior chosen in #3164. The marker case failed on current `main` before the change; both parameters pass locally after it (`uv run pytest tests/browser/navigation/test_threads.py::test_a_target_offers_c_in_the_thread_card_left_on_screen -q -n0`). The run’s other two failing tests pass on current `main` after [#3170](#3170) moved their targets clear of the expanded comment card. 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.
Where the window leaves a usable page beside it, Threads stands over the page's right side and leaves the page live, so Tab still reached page controls under the panel. Focus and its ring went where the user couldn't see them, and Enter or Space would act on a control they couldn't see. A Tab walk of every example with the panel open found such stops on 6 of 22 examples at 1200px and 1440px (13 of 63 page stops at 1440), and on 2 still at 1920px. Most are code blocks' Copy buttons and wide exhibits at the right edge.
Travel already clears a surface that hides its destination (
clearForinauxiliary-surfaces.js). Tab and key-led moves are trips the keyboard makes, so the surfaces owner now hears them throughonStanding(causesstep, andmovewhen no press led it) and applies the same rule. A press lands on what the user could see and a return where they already stood, so neither clears.test_a_tab_onto_a_stop_under_threads_beside_the_page_closes_itholds it, and fails without the change.The nightly Tab walk now goes on with the panel closed once a stop closes it. That left the thread list in a state the walk hadn't reached before, and the write watch caught a flap there. Revealing a thread that narrowing had hidden first painted the list's previous choice open, which closed the hidden card, and then reopened the card in the same task. The reveal (
presentation.js,onReveal) now chooses the card before narrowing lets it back in, so the list's paint opens it once.