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
+7
View File
@@ -5,8 +5,15 @@ package protocol
type ChatOpenWorkspaceEntry struct {
SessionID string `json:"session_id"`
Floating bool `json:"floating,omitempty"`
// Group names the chat group this chat belongs to in the phone's chat
// stack; entries sharing a name form one group, ordered as the entries
// are. Empty for an ungrouped chat. Older clients ignore it.
Group string `json:"group,omitempty"`
}
// ChatOpenWorkspaceGroupLimit bounds a group name, in characters.
const ChatOpenWorkspaceGroupLimit = 80
// ChatOpenWorkspaceRequest replaces the open-chat set. A chat_open_workspace
// without a request only reads the current snapshot.
type ChatOpenWorkspaceRequest struct {