You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Usage and cost analytics view (per provider/model, 7/30/90-day ranges) #152
A Usage page with a rolling-24h hourly chart, 7/30/90-day ranges, cost vs token toggle, provider shares, model breakdowns and cache savings (usage docs).
Solenta today
Per-thread token/cost numbers and a single "today vs budget" meter in the sidebar (src/components/Sidebar.tsx:2685-2691). The store keeps spendByDay totals (docs/ARCHITECTURE.md:97-99) with no breakdown view.
Why it matters
Users juggling five providers on subscriptions want "where did my quota go this week" per provider and per model. The data is largely already recorded in usageByThread; it just is not aggregated into a view.
Implemented on coder/usage-and-cost-analytics-view-per-provid-52e120 (two grok workers + orchestrator wiring).
Store — new usageByDay { "YYYY-MM-DD": { provider: { model: { costUsd, inputTokens, outputTokens, turns } } } }, written by store.recordUsage() at the five existing usage sites (runner.js claude/codex/kimi/opencode + workflow.js) and pruned by the same 90-day retention as spendByDay. Recorded on tokens, not on cost, so subscription providers that bill $0 still show their quota burn. spendByDay and the budget meter are untouched.
Wire — usage:byDay handler + preload + CoderApi.usage.byDay(), with the wireClient/devCoder/fakeCoder mirrors.
View — new Usage nav row: 7/30/90 range toggle, cost/tokens toggle, CSS-only daily bar chart (no chart dep), provider shares, model table. Aggregation lives in pure src/usage.ts.
Not built: the rolling-24h hourly chart (needs hourly buckets and its own retention) and cache savings (not reported uniformly across providers).
Tests: 755 renderer pass, 883 electron pass (the 1 web-integration reconnect failure also fails on main), typecheck and build clean.
Research note (Copilot PR outcome metrics, Devin/Replit cost-opacity complaints): extend the analytics view with (1) agent-PR outcome metrics: merge rate and median time-to-merge per provider, and (2) pre-flight cost estimates per task before dispatch (Copilot CLI /limits predict suggests a session budget from similar past sessions; cost opacity is the #1 complaint against Devin, Factory and Replit, so transparency here is differentiating).
Research note (Diffblue): adopt minutes-of-human-attention-per-thread as the north-star metric — 'setup only vs 510 minutes' is the category's most compelling number. Track human interventions per thread/automation and report outcomes (PRs merged autonomously, review cycles saved), not tokens.
Activity
currentbits commentedon Aug 17, 2026
Implemented on
coder/usage-and-cost-analytics-view-per-provid-52e120(two grok workers + orchestrator wiring).Store — new
usageByDay { "YYYY-MM-DD": { provider: { model: { costUsd, inputTokens, outputTokens, turns } } } }, written bystore.recordUsage()at the five existing usage sites (runner.js claude/codex/kimi/opencode + workflow.js) and pruned by the same 90-day retention asspendByDay. Recorded on tokens, not on cost, so subscription providers that bill $0 still show their quota burn.spendByDayand the budget meter are untouched.Wire —
usage:byDayhandler + preload +CoderApi.usage.byDay(), with the wireClient/devCoder/fakeCoder mirrors.View — new Usage nav row: 7/30/90 range toggle, cost/tokens toggle, CSS-only daily bar chart (no chart dep), provider shares, model table. Aggregation lives in pure
src/usage.ts.Not built: the rolling-24h hourly chart (needs hourly buckets and its own retention) and cache savings (not reported uniformly across providers).
Tests: 755 renderer pass, 883 electron pass (the 1 web-integration reconnect failure also fails on main), typecheck and build clean.
currentbits commentedon Aug 17, 2026
Research note (Copilot PR outcome metrics, Devin/Replit cost-opacity complaints): extend the analytics view with (1) agent-PR outcome metrics: merge rate and median time-to-merge per provider, and (2) pre-flight cost estimates per task before dispatch (Copilot CLI /limits predict suggests a session budget from similar past sessions; cost opacity is the #1 complaint against Devin, Factory and Replit, so transparency here is differentiating).
currentbits commentedon Aug 17, 2026
Research note (Diffblue): adopt minutes-of-human-attention-per-thread as the north-star metric — 'setup only vs 510 minutes' is the category's most compelling number. Track human interventions per thread/automation and report outcomes (PRs merged autonomously, review cycles saved), not tokens.
currentbits commentedon Aug 17, 2026
Deep-dive implementation recipe (T3 PR #5684): read provider transcripts directly (~/.claude/projects/.jsonl, ~/.codex/sessions/.jsonl — catches turns driven outside Solenta too), price with LiteLLM's rate table cached 24h, aggregate server-side into (day, provider, model) buckets so raw transcripts never leave the machine, and flag unpriced models instead of zeroing them.