Skip to content

Chat workspace redesign: React Flow graph, live fleet state, alert queue - #267

Open
justsml wants to merge 3 commits into
mainfrom
design/chat-realtime-graph
Open

justsml wants to merge 3 commits into
mainfrom
design/chat-realtime-graph

Conversation

@justsml

@justsml justsml commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Design tokens: the :root palette is retuned into semantic signal colors (teal confirmed, violet agent activity, amber awaiting human, severity ramp). Space Grotesk, Inter and JetBrains Mono are now self-hosted through next/font. Everything that reads the existing tokens picks this up.
  • Investigation graph: the hand-rolled SVG in ResearchMapPanel is replaced by a React Flow canvas (ResearchGraphFlow, @xyflow/react 12). Nodes sit in left-to-right lanes, findings are colored by severity, and the canvas has confidence meters, a pulse on live updates, a minimap and a legend bar. The existing filters, inspector and selection are unchanged.
  • Live fleet state: each thread in the sidebar shows a running/blocked/failed/done/idle indicator, so you can see every worker's state at a glance.
  • Alert queue: a drawer with a persistent launcher collects pending approvals. Each item shows the full approval context: command preview, target, scope and risk. Quick buttons cover the common grant durations and "same as last". The launcher no longer pulses continuously; it pulses briefly when a request arrives or when you return after 10+ minutes idle. The sidebar's clipped approve/reject controls are replaced by a banner that opens the queue.
  • Durable approvals are preserved: the queue reuses the existing confirm/cancel handlers (/api/chat → persistDurableChatApprovals). It never uses the manual PATCH /approvals path, so it does not bypass enforcement.
  • Fix: ToolRunCard crashed when a surface omitted the artifacts/redactionMarkers arrays. The render path doesn't apply the schema defaults, so the component now guards against missing values.
  • Dev fixture: scripts/dev/seed-replay.ts seeds a deterministic seed-replay-demo project so the UI can be iterated without live inference. It only clears rows for that project and refuses any other project id.

Test plan

  • tsc --noEmit: 0 errors (re-run after a host reboot)
  • Dev server renders the chat, research map (58 nodes / 66 edges), sidebar status indicators and alert queue against seed-replay-demo. Checked in headless Chromium screenshots.
  • Full next build not run
  • No new automated tests. Changes are visual/UI. The ToolRunCard guard and the alert queue's durable-path wiring are candidates for integration coverage.
  • Known limit: the queue lists the active thread's pending approval. Aggregating across threads needs threadId exposed in the approvals REST view.

🤖 Generated with Claude Code

justsml and others added 3 commits October 11, 2026 06:59
scripts/dev/seed-replay.ts writes a deterministic docslurp.io web-pentest
project (seed-replay-demo) into the app database: a multi-turn transcript
with generative-UI surfaces, a pending durable approval, runs in every
state, and a 58-node investigation graph. It clears only rows scoped to
the seed-replay-demo project and refuses any other project id, so real
projects are never touched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Retune :root tokens into a semantic palette (signal teal, agent violet,
  awaiting-human amber, severity ramp) and self-host Space Grotesk, Inter
  and JetBrains Mono via next/font.
- Replace the hand-rolled SVG research map with a React Flow graph
  (@xyflow/react): left-to-right lanes, severity-colored findings,
  confidence meters, live update pulse, minimap and legend bar.
- Show live run state for every thread in the sidebar.
- Add a centralized alert queue drawer with a persistent launcher. It
  reuses the durable confirm/cancel handlers, so approvals still go
  through durable enforcement. Adds frequent-duration and "same as last"
  shortcuts. The launcher pulses only when a request arrives or after
  10+ minutes idle.
- Replace the clipped sidebar approval controls with a banner that opens
  the queue.
- Guard ToolRunCard against surfaces missing schema-defaulted arrays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant