Cycle Ctrl-Tab through available chats

When a tiled workspace has one chat pane, navigate the sidebar chat order while preserving pane state and composer focus. Keep pane and floating-window cycling behavior for their existing layouts, and update shortcut documentation and coverage.
This commit is contained in:
2026-11-13 12:23:52 +00:00
parent df0614e2f7
commit b4d67d6ba8
8 changed files with 158 additions and 77 deletions
+23 -25
View File
@@ -41,10 +41,11 @@ every destination and come back at app start without Chat being opened.
takes the keyboard. Open order is the order the windows were opened (a
restored window keeps its saved place), so a raise does not change the
cycle; the stacking order does change on a raise.
- **With no chat window shown**, Ctrl+Tab cycles the tiled panes only and
the keys focus the chosen pane's composer. With one tiled pane it does
nothing. A chat shown before, or a minimised or floating chat, is never
swapped in.
- **With no chat window focused**, Ctrl+Tab cycles the tiled panes and the
keys focus the chosen pane's composer. With exactly one tiled pane it
cycles all open chats in sidebar order, replacing that pane while keeping
its transcript and draft; closed, hidden-on-this-device and floating
chats are skipped. With two or more panes it cycles the panes only.
- Command+Tab stays with the system. While the terminal claims tab keys
(shown) Ctrl+Tab switches terminal tabs. A keyboard held by another window
(a run, terminal) is left to that window. Alt+` (`windowCycleShortcut`)
@@ -80,36 +81,33 @@ every destination and come back at app start without Chat being opened.
## Checks
- Focused, 2026-11-12, `tool/memwatch/full.sh` over
- Focused, 2026-11-13, `tool/memwatch/full.sh` over
`test/features/chat/chat_floating_pane_test.dart`,
`test/features/chat/chat_keyboard_focus_test.dart`,
`test/features/chat/chat_control_tab_test.dart`,
`test/features/chat/windows/chat_windows_test.dart` and
`test/features/terminal/terminal_chat_tab_test.dart`: 38 passed, 0 failed.
Related Ctrl+Tab users, `tool/memwatch/full.sh` over
`test/features/chat/windows/chat_windows_test.dart`,
`test/features/terminal/terminal_chat_tab_test.dart`, the keyboard
shortcuts registry test and related Ctrl+Tab users: 70 passed, 0 failed.
This included `tool/memwatch/full.sh` over
`test/shell/destination_shortcuts_test.dart`,
`test/shell/tab_history_back_test.dart`, `test/shell/search_escape_test.dart`
and `test/features/chat/shell/chat_shell_terminal_test.dart`: 26 passed,
0 failed.
- New in the first file: Ctrl+Tab and Ctrl+Shift+Tab over three floating chats
cycle in open order, not stacking order (order, wrap, composer focus,
Command+Tab ignored). With the tiling focused Ctrl+Tab goes to the top-most
shown window and leaves the panes alone; with one shown window it does
nothing; with the window minimised the panes cycle and the window stays
hidden. With one tiled pane and a minimised chat, Ctrl+Tab does nothing and
shows nothing. A terminal that claims tab keys keeps Ctrl+Tab over a focused
chat window.
- Removed: the single-pane recent-chat swap (the chat shown before, opened
back into the pane), with its tests in `chat_keyboard_focus_test.dart`. A
single pane with no shown window now does nothing on Ctrl+Tab, so
`chat_control_tab_test.dart` no longer expects the composer to take focus
from the sidebar.
- Floating-window Ctrl+Tab and Ctrl+Shift+Tab over three floating chats cycle
in open order, not stacking order (order, wrap, composer focus, Command+Tab
ignored). With the tiling focused, a single tiled pane cycles the open,
device-visible sidebar chats and skips closed, hidden and floating chats;
multiple tiled panes cycle panes. A terminal that claims tab keys keeps
Ctrl+Tab over a focused chat window.
- Changed: a single tiled pane now cycles the open, device-visible sidebar
chats in list order, skips closed, hidden-on-this-device and floating chats,
wraps in both directions, and focuses the replacement composer. Multiple
panes and focused floating windows retain their existing cycles.
- `tool/analyze.sh` on `lib/features/chat` and the three chat test files:
clean.
- Affected states: two or more floating chats; one floating chat shown;
floating chat minimised with one tiled pane; tiling focused with windows
shown and with none; a window focused; the terminal shown (claimed);
Command+Tab.
- Affected states: a single tiled pane with open chats; shown or minimised
floating chats; two or more tiled panes; a focused floating window; the
terminal shown (claimed); Command+Tab.
- Not covered: the terminal's own tab switching (the test app has no terminal
surface), real browser or device keys, and captures (ui-review's).
- Observed, not changed: in the widget harness, floating from a pane's More