sequenceDiagram
participant UI as ChatPane
participant SS as Session start API
participant TH as Chat threads API
participant S as useChatSender
participant AI as AI stream API
UI->>SS: request new session
SS->>TH: bootstrap thread by agent and scope
TH-->>SS: thread scope
SS-->>UI: thread id and canonical path
UI->>S: sendMessage()
S->>S: append pending user message
alt fallback when thread missing
S->>TH: create thread
TH-->>S: thread id
S->>UI: update route silently
end
S->>S: persist user message + assistant placeholder
S->>AI: start stream with thread and scope
AI-->>S: SSE chunks + actions + done
S->>S: normalize actions + persist final assistant
S-->>UI: sync pending IDs -> persisted IDs
sequenceDiagram
participant UI as Action UI
participant A as useChatActions
participant R as /api/ai/resume
participant DB as Persistence
UI->>A: approve/reject decisions[]
A->>A: stage by toolCallId
A->>R: resume(threadId, decisions)
alt stream path
R-->>A: chunk/interim/done
else fallback path
R-->>A: non-stream response
end
A->>DB: persist follow-up summary/actions
A-->>UI: refresh workspace by scope
sequenceDiagram
participant FE as MapsWorkspace
participant TK as /api/maps/realtime/token
participant ST as /api/maps/realtime/state
participant RT as Realtime Room
FE->>TK: token request(mapId)
TK->>TK: assertCanvasScope(agent=maps, mapId)
TK-->>FE: jwt + roomId(map:mapId)
FE->>ST: bootstrap state(mapId)
ST-->>FE: state snapshot
FE->>RT: connect with jwt + roomId
RT-->>FE: realtime updates
flowchart LR
A[Open analytics mode] --> B[load dashboard context]
B --> C{dataset selected?}
C -- no --> D[block chat input]
C -- yes --> E{template ready?}
E -- no --> D
E -- yes --> F[enable chat send]
D --> G[poll readiness every 2s]
G --> C