feat(desktop): reflect Claude Code session title/color in tabs and sidebar

Closed
MO
3mo ago
+1284-118

Summary

  • Reflect the active Claude Code session's title and color in desktop tabs and the sidebar
  • Tint tab backgrounds with the Claude session color, with an appearance toggle to disable it
  • Surface a clear message when Postgres/Neon is unreachable
  • Address code review findings from prior iterations

Summary by cubic

Reflects each Claude Code session’s live title and color across the desktop: single-terminal tabs use the session name and get a matching background tint (toggle in Settings). Also shows a clear “Database unavailable” message when Postgres/Neon can’t be reached.

  • New Features

    • Tabs: Single-terminal Terminal tabs use the session’s title and tint the entire tab with the session /color; the tab-bar icon matches the in-pane icon, and pane icons show a small color dot. Toggle in Settings → Appearance (“Claude Code session name & color”).
    • Sidebar: Agent hover rows show a color dot and use the session title when available.
    • Live updates: Host-service tails Claude’s transcript to read /color and /rename/auto-title, overlays live title/color on bindings, publishes agent:meta events, and the renderer updates via React Query selectors without unnecessary re-renders.
  • Bug Fixes

    • Database connectivity: Detects DB-down errors in auth and tRPC, sets a shared flag/message, and shows a throttled “Database unavailable” toast in the desktop app instead of a silent 500.
    • Security/robustness: Sanitizes sessionId when resolving transcript paths and forwards cwd from the agent hook. Clears static pane titles once a live session title is known. Adds tests for transcript parsing, store overlays, and DB error detection.

Summary by CodeRabbit

  • New Features
    • Claude Code terminal tabs can now display live session names and color accents.
    • Added an Appearance setting to enable or disable Claude tab decorations.
    • Sidebar agent entries now show session-specific labels and color indicators.
    • Terminal session metadata updates appear automatically without restarting the workspace.
  • Bug Fixes
    • Improved handling of database connectivity failures with clearer messages and temporary-unavailability notifications.