Group & List Context Menus
Lists and Groups expose their actions through context/options menus in the sidebar (src/islands).
The menu islands and the offline mutation API they invoke:
flowchart LR
LTB["ListTopBar.tsx"] --> LOM["ListOptionsMenu.tsx"]
GH["GroupHeader.tsx"] --> GCM["GroupContextMenu.tsx"]
LOM -->|"duplicateList()<br/>deleteList()"| SYNC["lib/offline/sync.ts<br/>(optimistic + outbox)"]
GCM -->|"onRename / onMoveUp<br/>onMoveDown / onUngroup"| LC["ListCollection.tsx"]
LC -->|"moveGroup() / deleteGroup()"| SYNC
LOM -->|"onRequestShare"| SS["ShareSurface.tsx<br/>(membership)"]
SYNC --> DEX[("Dexie cache<br/>(optimistic write)")]
SYNC -->|"replayOutbox()"| API{{"Worker API"}}
Components
Section titled “Components”ListOptionsMenu.tsx— per-List actions: rename, duplicate, move to/out of a Group, delete, share. (Duplicating a List yields a copy owned by the duplicating user, not shared — Product Brief §5.2.)GroupContextMenu.tsx/GroupHeader.tsx— per-Group actions: rename, delete (which ungroups its Lists rather than deleting them — spec 008), collapse/expand.ListTopBar.tsx— the active List’s header actions.
All actions invoke the offline mutation API (optimistic + queued); destructive actions follow the domain rules (deleting a List permanently deletes its Tasks/Steps; deleting a Group only ungroups). Sharing opens the membership surface (see Worker Factory & Member API).
A typical destructive action — deleting a List from ListOptionsMenu.tsx:
sequenceDiagram participant U as User participant LOM as ListOptionsMenu.tsx participant WC as WorkspaceContext participant SYNC as lib/offline/sync.ts participant DEX as Dexie cache participant API as Worker API U->>LOM: click "Delete" LOM->>U: window.confirm() U-->>LOM: confirm LOM->>WC: setSelectedListId(null) LOM->>SYNC: deleteList(listId) SYNC->>DEX: optimistic soft-delete SYNC->>API: replayOutbox() (queued DELETE) API-->>DEX: reconcile on ACK
Related: List Sidebar & Drag-Drop, Worker Factory & Member API (sharing), Offline Outbox & Optimistic Writes.