You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The WebSocket server is dead code — the UI never connects, and no phase ever emits progress, contrary to the "real-time" claim #76
The README advertises: "🖥️ Web UI: inspect runs, questions, and failures interactively, in real-time!". The plumbing for that exists but is not connected at either end.
Server side.WebSocketManager implements a subscribe/unsubscribe protocol and a per-run broadcastToRun (src/server/websocket.ts:59-70). broadcastToRun is never called from anywhere:
So ClientInfo.subscribedRuns, the subscribe/unsubscribe message handlers, and broadcastToRun are all unreachable. The only broadcasts that happen are coarse global ones — run_started, run_complete, error, run_stopped from routes/runs.ts and routes/compare.ts. Nothing inside the ingest / indexing / search / answer / evaluate phases emits anything, so per-question and per-phase progress never leaves the process; it only goes to process.stdout (indexing.ts:69 writes the progress bar directly to the terminal).
Client side. The UI never opens a socket at all:
$ grep -rn "WebSocket\|new WebSocket\|/ws" ui/
(no matches)
The /ws upgrade endpoint (src/server/index.ts:40-44) therefore has no clients, and wsManager.broadcast writes to an empty map on every call.
Impact
The advertised real-time UI is polling-based at best; live phase progress that the CLI shows is simply unavailable in the browser.
Roughly a file's worth of subscription machinery is unused code that reads as working infrastructure — the next person to touch progress reporting will reasonably assume broadcastToRun is wired up and wonder why their messages vanish.
Suggested fix
Pick one and be explicit about it:
Wire it up. Give the phases access to wsManager (or an event emitter the server subscribes to) and call broadcastToRun(runId, { type: "phase_progress", phase, questionId, completed, total }) from the existing logger.progress / IndexingProgressTracker.update call sites; connect from the UI's run detail page.
Or delete it. Remove broadcastToRun, the subscribe/unsubscribe handlers, and the /ws route, and soften the README claim to match what the UI actually does.
Either is fine; the current half-state is the only bad option.
Activity