Skip to content

feat: status bar (model, token count, cost estimate) #17

@andrewchumchal

Description

@andrewchumchal

Summary

Add a persistent status bar at the very bottom of the app showing the current model, token count for the active conversation, and estimated cost.

Motivation

Users switching between expensive and cheap models have no at-a-glance signal of what they're running or how much they've spent in a session. The status bar provides ambient awareness without interrupting the flow.

Proposed behaviour

Layout (left → right)

[ 🟣 claude-sonnet-4-5 ]  [ ↑ 1,240 / ↓ 3,810 tokens ]  [ ~$0.014 ]  [ ⚡ Routing: ON ]
  • Model indicator — provider colour dot + model name; click opens the model picker
  • Token counter — input / output tokens for the active conversation; resets per conversation
  • Cost estimate — running cost based on provider pricing; shown as ~$x.xxx
  • Routing badge — shows when intelligent routing is active; click opens routing settings

Right side (status items)

  • Error count if any IPC errors are present
  • MCP tools active count (e.g. 🔧 3 tools)

IPC requirements

Providers need to emit token usage events after each response. Requires small additions to ipc.ts in the client and a new window.api.onTokenUsage channel in preload.ts.

uiStore changes

  • No new state — reads from conversationStore (active conversation token totals)

conversationStore changes

  • tokenUsage: { input: number; output: number } per conversation (accumulated)

Acceptance criteria

  • Status bar renders at the bottom of the app at all times
  • Current model name and provider colour shown
  • Clicking the model opens the model picker
  • Token count shown for the active conversation
  • Cost estimate shown (can use hardcoded pricing table initially)
  • Token count and cost update in real time as responses stream in
  • Routing badge shown when routing is active

Prerequisites

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions