Bug
The brain TUI sidebar (src/tui.tsx) subscribes to brain/{sessionId} when a session ID is available, and brain/status otherwise. The server (src/status.ts) starts publishing on the default brain/status channel and only switches to brain/{sessionID} after a session is created (via chat.message hook).
Repro
- Open a project where brain has not yet indexed all files
- Watch the TUI sidebar during initial ingest — no status updates appear (bus subscription is on the wrong channel)
- HTTP fallback eventually shows the state, but real-time push is broken
Fix
TUI must always subscribe to brain/status (catches pre-session ingest), and additionally subscribe to brain/{sessionID} once a session ID is available (catches post-chat events after server switches).
Bug
The brain TUI sidebar (
src/tui.tsx) subscribes tobrain/{sessionId}when a session ID is available, andbrain/statusotherwise. The server (src/status.ts) starts publishing on the defaultbrain/statuschannel and only switches tobrain/{sessionID}after a session is created (viachat.messagehook).Repro
Fix
TUI must always subscribe to
brain/status(catches pre-session ingest), and additionally subscribe tobrain/{sessionID}once a session ID is available (catches post-chat events after server switches).