Skip to content

Close Threads when Tab lands on a page stop it stands over - #3164

Merged
max-sixty merged 2 commits into
mainfrom
tab-clears-hiding-panel
Oct 19, 2026
Merged

max-sixty merged 2 commits into
mainfrom
tab-clears-hiding-panel

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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 (clearFor in auxiliary-surfaces.js). Tab and key-led moves are trips the keyboard makes, so the surfaces owner now hears them through onStanding (causes step, and move when 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_it holds 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.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 19, 2026 12:14
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]>
@max-sixty
max-sixty merged commit f412db7 into main Oct 19, 2026
3 checks passed
@max-sixty
max-sixty deleted the tab-clears-hiding-panel branch October 19, 2026 19:28
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]>
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.

2 participants