Files
pipelines/app/notes/chat-stack.md
T
alan 8e19459d6f Chat stack: notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 20:22:55 +00:00

2.8 KiB

Chat stack (phone chat navigation)

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.

Behaviour

  • The stack's chats are the workspace's panes: the same open-chat set the server syncs (ChatOpenWorkspaceController). Choosing one opens it as a tap on its list row does (_openBySelection); Add chat is the pane menu's Add chat pane picker (searchable, the list's own rows) titled "Add chat"; long press removes the chat's pane, with an Undo snack bar that re-adds it and keeps the chat on screen.
  • Collapsed: up to four avatars piled with small offsets and turns, the chat on screen on top; a count badge when more are open, and a bell when another open chat waits on the operator. It sits bottom-end in the active chat's 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 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 colour. Add chat is the last item, at the top: the reachable bottom slots go to switching, the frequent action. Tap outside, Back or Escape folds it.
  • Motion: one controller, 280 ms open (staggered, a slight-overshoot ease), 220 ms fold (top first). Items move through ChatStackPoseTransition, a repaint-only transform render object that reuses its matrix and layer; no per-frame rebuilds, no blur. Reduced motion: a 120 ms plain fade in place.
  • Design tokens: circle discs with a short shadow under Default; the design's square corners and no shadow under flat designs (Terminal, Paper); label pills take the design radius and frame.

Structure

  • lib/features/chat/stack/: setting, pose, motion, disc/label, column, FAB, anchor (a LayerLink the active pane's transcript marks; the one stack above the workspace follows it, so it survives switching chats).
  • lib/features/chat/chat_screen_stack.dart: entries, open/add/remove.
  • chat_thread_view.dart: anchor target, bottom clearance, Jump offset.
  • tool/search_selection_probe_entry.dart: ?chatNav=stack.

Not verified

On-device behaviour (Android keyboard insets, haptics) was not run on a device; web captures used Chrome's touch emulation at 390x844.