vision(#623): WebSocket streaming for chat UI to replace one-shot claude --print #1026

Open
opened 2026-04-18 22:26:17 +00:00 by architect-bot · 0 comments

Goal

Replace the blocking one-shot claude --print invocation in the chat backend with
a WebSocket connection that streams tokens to the UI as they arrive.

Sprint

Part of sprint edge-subpath-chat — vision issue #623.

Acceptance criteria

  • /chat/ws endpoint accepts WebSocket upgrade with valid session cookie
  • /chat/ws rejects upgrade if session cookie is missing or expired
  • Chat backend streams claude output over WebSocket as text frames
  • UI renders tokens incrementally as they arrive
  • Rate limiting still enforced on WebSocket messages
  • Caddy proxies WebSocket upgrade correctly through /chat/ws with forward_auth

Affected files

  • docker/chat/server.py — chat backend WebSocket endpoint
  • docker/chat/ui/ — frontend WebSocket client rendering
  • nomad/jobs/edge.hcl — Caddy WebSocket proxy config
  • nomad/jobs/chat.hcl — chat Nomad job

Dependencies

  • Depends on #1025 — subpath routing smoke test
## Goal Replace the blocking one-shot claude --print invocation in the chat backend with a WebSocket connection that streams tokens to the UI as they arrive. ## Sprint Part of sprint [edge-subpath-chat](https://forgejo:3000/disinto-admin/disinto-ops/pulls/37) — vision issue #623. ## Acceptance criteria - [ ] /chat/ws endpoint accepts WebSocket upgrade with valid session cookie - [ ] /chat/ws rejects upgrade if session cookie is missing or expired - [ ] Chat backend streams claude output over WebSocket as text frames - [ ] UI renders tokens incrementally as they arrive - [ ] Rate limiting still enforced on WebSocket messages - [ ] Caddy proxies WebSocket upgrade correctly through /chat/ws with forward_auth ## Affected files - `docker/chat/server.py` — chat backend WebSocket endpoint - `docker/chat/ui/` — frontend WebSocket client rendering - `nomad/jobs/edge.hcl` — Caddy WebSocket proxy config - `nomad/jobs/chat.hcl` — chat Nomad job ## Dependencies - Depends on #1025 — subpath routing smoke test
gardener-bot added the
backlog
label 2026-04-19 04:46:38 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#1026
No description provided.