Merge: Next chat button cycles through the list
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Next chat button
|
||||
|
||||
An open chat's bar ends with a Next chat icon button (Material
|
||||
`Icons.keyboard_tab`, Cupertino `CupertinoIcons.arrow_right_to_line`; tooltip
|
||||
and semantics "Next chat"). It opens the chat after the current one and wraps
|
||||
from the last to the first, for one-tap cycling on a phone.
|
||||
|
||||
- Order: exactly the rows the list draws, the same rows Ctrl+1…Ctrl+9 count
|
||||
(`chatSessionsShown` in `lib/features/chat/domain/chat_cycle.dart`):
|
||||
Starred by name, then Chats grouped by directory, then Closed. A folded
|
||||
section's chats are skipped: they are not on screen, and Closed starts
|
||||
folded, so cycling never wanders into closed chats unless the operator
|
||||
unfolded them. A chat whose own section is folded moves to the first row.
|
||||
The destination now owns the `ChatSectionFolds` and passes it to the list.
|
||||
- Hidden when no other row is shown (one chat, or one plus folded ones).
|
||||
- Opening goes through `ChatScreen._open`, the same path as a row tap: the
|
||||
route names the new chat, the list row selection follows, and on a phone the
|
||||
existing detail page swaps its content (one Back still returns to the list;
|
||||
no page is stacked).
|
||||
- The button is not `SegmentedOverflowable`, so a narrow bar keeps it beside
|
||||
the model and mode pills instead of moving it into More.
|
||||
- No keyboard shortcut: Ctrl+Tab never reaches a web page (Chrome keeps it),
|
||||
and a shell-wide binding would mean editing `lib/shell/`.
|
||||
|
||||
Tests: `test/features/chat/domain/chat_cycle_test.dart`,
|
||||
`test/features/chat/chat_next_chat_test.dart`. Captures (560x1000, Material and
|
||||
Cupertino, fixture `chats=3`): chat 3 open, Next opens chat 1 (wrap), three
|
||||
presses return to chat 3.
|
||||
Reference in New Issue
Block a user