Skip to content

Fix resuming a session from the drawer by click or enter#563

Merged
tobocop2 merged 2 commits into
mainfrom
fix/sessions-picker-selection
Jul 19, 2026
Merged

Fix resuming a session from the drawer by click or enter#563
tobocop2 merged 2 commits into
mainfrom
fix/sessions-picker-selection

Conversation

@tobocop2

Copy link
Copy Markdown
Owner

Problem

Opening the sessions drawer with ctrl+o and clicking a conversation did nothing, and after a click, pressing enter also did nothing. The drawer was only usable by typing into the filter box first and then pressing enter, so with a single saved session it looked completely dead. The full-screen Sessions tab had the same problem: enter never resumed anything there.

Two separate causes. Resume was wired only to the filter box's submit event, so the list's own click and enter (which Textual already reports) were never handled, and a click also moves keyboard focus off the filter box, leaving no working key to resume with. On top of that, once focus left the chat input the chat screen dropped into normal mode, where its key handling swallowed enter for every drawer except the fleet one, which had a hardcoded exemption.

Solution

Resume now comes from the list's own selection event, so a click and enter both resume the highlighted row, on the drawer and the full-screen tab alike. The chat screen's normal-mode check now asks whether focus sits inside any drawer through a shared base rather than naming a single drawer class, so a drawer keeps its own enter without having to opt in by name and a future drawer can't silently regress the same way.

Verified live in a real terminal across single and multiple sessions on both surfaces (click, click then filter then enter, and the tab), and covered by tests that fail on the old behavior.

tobocop2 added 2 commits July 19, 2026 15:43
Clicking a row in the sessions drawer did nothing, and once a click had
moved focus off the filter box, enter did nothing either, so the drawer
could only be used by typing into the filter first. Two causes: resume was
wired only to the filter box's submit, so the list's own click/enter was
never handled; and the chat screen's normal-mode key handling swallowed
enter for every drawer except the fleet one.

Route resume through the list's own selection event so a click and enter
both work, on the drawer and the full-screen tab alike, and give the chat
screen a shared drawer base to check against so any drawer keeps its own
enter instead of each one having to opt in by name.
The test pressed ctrl+d right after opening the drawer and relied on the
drawer's mount-time focus having settled on the filter box. Both the filter
Input and the chat TextArea bind ctrl+d as delete-right, so when the keypress
reached the chat input first under CI load it was eaten silently: no dialog
opened, the test failed, and the delete flow stayed uncovered, taking total
coverage to 99.99% under the 100% gate. Focus the list explicitly before
pressing: it binds no ctrl+d, so the key bubbles to the panel's Delete
binding on every runner.
@tobocop2
tobocop2 merged commit 66aa3ee into main Jul 19, 2026
32 of 34 checks passed
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.

1 participant