mirror of
https://github.com/turnstonelabs/turnstone.git
synced 2026-08-12 23:12:23 -06:00
9df8ab836f
* feat: per-workstream status bar above input Move the global token counter and model name from the header into a per-pane telemetry strip between messages and the text input. Each workstream pane now independently shows model name, token usage with context percentage, tool calls this turn, and turn count. Backend: add _ws_turn_tool_calls counter (reset per user turn, emitted in SSE status event alongside turn_count). MQ bridge forwards the new fields. SDK and TypeScript types updated. Frontend: build .ws-status-bar DOM in _createDOM, rewrite updateStatus to target per-pane elements, update SSE connect/disconnect handlers. Remove #model-name and #status-bar from global header. Restore console #status-bar CSS in its own stylesheet. Accessibility: aria-atomic, aria-labels on each field, warning symbols (▲/⚠) at 80%/95% context for color-blind users, placeholder text before first status event. Disconnect state uses 2px red border with dimmed stale fields. * fix: emit status event on SSE connect so status bar populates on resume When resuming a workstream, the event_generator only sent connected + history events. The status bar stayed at placeholder values until the next LLM response. Now replays session._last_usage as a synthetic status event right after connected, so token count, tool calls, and turn count render immediately. * fix: address Copilot review — remove dead function, clarify locals Remove updateHeaderForFocusedPane() and its call site (no-op since status moved per-pane). Rename ambiguous ttc/tc locals to turn_tool_calls/turn_count in the status replay block.