Chat stack: the default, also on a wide phone or tablet; a close button where the pile was

Chat stack is now the default phone chat navigation (a stored choice is
kept), and on Android or iOS it stays on a wide layout (an unfolded
foldable) above the active pane, where floating is ignored too. When
expanded, the pile turns into a close button at its own spot and the
column rises above it; while a chat is dragged that button is the remove
target, replacing the separate x at the bottom. Chat widget tests start
on Quick switch (they run as Android); the stack's tests choose it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 21:47:57 +00:00
parent fba3b924f1
commit 130c1e6708
18 changed files with 344 additions and 184 deletions
+19 -11
View File
@@ -2,11 +2,16 @@
## Setting
Settings → Mobile chat navigation: Quick switch (default, the next chat's
peek under the current one) or Chat stack. Per device
(`pipelines.mobile-chat-navigation.v1`, `MobileChatNavigationController`,
restored in `bootstrap.dart`), applied live, and only on a phone-width layout
(`!showsListBesideDetail`). A wide window keeps its panes and shows no stack.
Settings → Mobile chat navigation: Chat stack (the default without a stored
choice) or Quick switch (the next chat's peek under the current one). Per
device (`pipelines.mobile-chat-navigation.v1`, `MobileChatNavigationController`,
restored in `bootstrap.dart`; a stored choice is kept), applied live. It
applies on a phone-width layout (`!showsListBesideDetail`); the Chat stack
also stays on a wide layout on Android or iOS (an unfolded foldable, a
tablet, a browser on one), floating above the active pane beside the list
(`chatStackOnMobile`). A wide desktop or web window keeps its panes alone.
Widget tests run as Android: `test/features/chat/flutter_test_config.dart`
starts each chat test on Quick switch (`debugUse`); the stack's tests pick it.
## Behaviour
@@ -19,11 +24,11 @@ restored in `bootstrap.dart`), applied live, and only on a phone-width layout
(flat designs: a primary-colour frame instead). Dragged up or down, the
others slide aside (200 ms ease-out) to open its slot, with a selection
tick per slot; dropping commits through `ChatWorkspaceController.movePane`
(the pane order the server syncs as the open-chat order). A "×" fades and
slides in, centred in the band below the stack's slot (over the composer,
above the safe area); over it (a reach of 0.8x its size around its centre)
it grows 1.2x and fills with the error colour, and the chat shrinks into
it. Dropping there removes the pane with the Undo snack bar; Undo re-adds
(the pane order the server syncs as the open-chat order). The close
button at the stack's slot is the remove target while dragging: its "×"
turns the error colour, and over it (a reach of 0.7 slot around its
centre, short of item 0 a pitch above) it grows 1.2x and fills with the
error colour, and the chat shrinks into it. Dropping there removes the pane with the Undo snack bar; Undo re-adds
it at its old index and keeps the chat on screen. A drop far to the side
(more than 1.5 pitches) or Escape or a cancelled pointer puts it back.
Add chat never lifts and is never a slot. Semantics: Move up, Move down,
@@ -36,7 +41,10 @@ restored in `bootstrap.dart`), applied live, and only on a phone-width layout
transcript area, just above the composer, so it never covers Send; the
transcript pads its last line and Jump to latest above it. It hides while
the on-screen keyboard is up (the window's view insets).
- Expanded: a scrim, and a column rising from the stack's slot. The chats keep
- Expanded: a scrim; the pile turns into a close button ("×", a quarter
turn and scale in, `ChatStackCloseTarget`) exactly where it was, so a
second tap on the same spot folds the column; the column rises from one
pitch above it. The chats keep
the open-chat order bottom-up (stable positions for muscle memory); the chat
on screen wears a ring in its colour; each avatar keeps its list badges
(waiting, working, background tasks) and has a name pill tinted with its