Repository navigation
v0.36.0 — per-session lifetime cost
Highlights
The Sessions tab now shows lifetime cost + token totals on every
session card, right under the header. Until v0.35.0 the tab only
exposed status + settings — auto-refresh from v0.33.0 made the gap
visible: you'd watch the page update with no signal about spend.
┌─ /Users/you/repo abc123def456 · idle ──┐
│ $0.42 1.2K in · 8.4K out · 14 ev │ ← new
│ loaded: CLAUDE.md · settings.json · .mcp.json (2: fs,db)│
│ model: claude-sonnet-4-5 · permissions: 14 allow… │
└─────────────────────────────────────────────────────────┘
How it works
| Step | Component |
|---|---|
GROUP BY (session_file, model) |
db.aggregateBySessionFile() |
Roll up by {sessionId}.jsonl basename |
buildSessionCostMap() |
raw_cost_usd preferred when every event in a bucket carries one |
mirrors aggregator semantics from v0.24.0 |
| Render under session card header | .session-stats row |
Live cost accuracy is preserved even when a session hops between
models — each (file, model) bucket is priced separately and summed.
Image
docker pull ghcr.io/onestepat4time/polaris:0.36.0
docker pull ghcr.io/onestepat4time/polaris:latestWhat's changed
- feat(metrics): per-session lifetime cost on Sessions tab (#87)
Full changelog: v0.35.0...v0.36.0