Chat stack: groups of open chats, synced with the open-chat set

A chat dropped onto the middle of another makes a named group (asked at
once, "Group N" by default); onto a group it joins, a group dropped onto
a chat takes it in, groups merge. The top level shows each group as a
small pile with its name and count; a tap opens it in place under a
header that leads back (also the scrim, Back and Escape). In a group,
dropping a chat on the header leaves the group; a group of one
dissolves. The close button ungroups a dropped group with Undo. Rename,
Ungroup, Close all (with Undo), Move to group and Remove from group are
in the group menu and as semantic actions.

Each open-chat entry carries its group name (protocol field "group",
omitted when ungrouped; older clients ignore it), stored and pushed by
the server like the order; names are trimmed, printable, at most 80
characters. Needs a server restart to keep groups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 22:18:44 +00:00
parent 130c1e6708
commit efaa0d9fca
30 changed files with 2399 additions and 308 deletions
@@ -159,8 +159,8 @@ void main() {
// Lifted: the remove target comes in.
await tester.pumpAndSettle();
expect(_shown(tester), 1);
// Up two slots: b and c slide down to open the gap.
await gesture.moveBy(const Offset(0, -kChatStackPitch * 2));
// Up past the middle of c (its middle would group): b and c slide down.
await gesture.moveBy(const Offset(0, -kChatStackPitch * 2.4));
await tester.pumpAndSettle();
expect(tester.getCenter(_button(tester, 'b')).dy, b.dy + kChatStackPitch);
await gesture.up();
@@ -305,7 +305,7 @@ void main() {
final b = tester.getCenter(_button(tester, 'b'));
final gesture = await _lift(tester, _button(tester, 'a'));
expect(_shown(tester), 1);
await gesture.moveBy(const Offset(0, -kChatStackPitch));
await gesture.moveBy(const Offset(0, -kChatStackPitch * 1.4));
await tester.pump();
expect(tester.getCenter(_button(tester, 'b')).dy, b.dy + kChatStackPitch);
// No turn or growth: the button only fades.