Skip to content

Commit f84bac4

Browse files
feat: show both real compute and with-cache total in agent bar
Splitting purely by cache-excluded real compute made the headline number look tiny next to the cache-inclusive telemetry (e.g. 73M vs 7.15B), which read as "no usage." Keep the fair real-compute split for the bar but surface both totals in the subtitle — "<real> real · <with-cache> with cache reads" — so total magnitude is visible without cache overpowering the cross-agent comparison. Bumps desktop app to 1.1.63. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 00184a8 commit f84bac4

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

apps/desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code-reviewer/desktop",
3-
"version": "1.1.62",
3+
"version": "1.1.63",
44
"private": true,
55
"scripts": {
66
"dev": "lsof -ti:1420 | xargs kill -9 2>/dev/null; vite",

apps/desktop/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-utils/schema.json",
33
"identifier": "com.codevetter.desktop",
44
"productName": "CodeVetter",
5-
"version": "1.1.62",
5+
"version": "1.1.63",
66
"build": {
77
"beforeDevCommand": "npm run dev",
88
"beforeBuildCommand": "npm run build",

apps/desktop/src/pages/Home.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,14 +906,19 @@ function WeeklyAgentSplit() {
906906

907907
// All-time real compute so every indexed agent shows — Grok/Cursor sessions
908908
// are often older than the current week and would vanish from a week-only view.
909+
// The bar splits by real compute (input − cache + output) for a fair
910+
// cross-agent comparison; the with-cache total is surfaced alongside so the
911+
// headline magnitude isn't lost (cache reads are ~98% of Claude's input).
909912
const segments = rows
910913
.map((r) => ({
911914
agent: r.agent_type,
912915
tokens: r.real_input_tokens + r.output_tokens,
916+
withCache: r.real_input_tokens + r.cache_read_tokens + r.output_tokens,
913917
}))
914918
.filter((s) => s.tokens > 0)
915919
.sort((a, b) => b.tokens - a.tokens);
916920
const grandTotal = segments.reduce((acc, s) => acc + s.tokens, 0);
921+
const grandWithCache = segments.reduce((acc, s) => acc + s.withCache, 0);
917922

918923
if (segments.length === 0 || grandTotal === 0) {
919924
return null;
@@ -929,7 +934,7 @@ function WeeklyAgentSplit() {
929934
<div>
930935
<div className="text-[11px] text-slate-500">By agent · real compute (all time)</div>
931936
<div className="text-xs text-slate-400 tabular-nums">
932-
{formatTokens(grandTotal)} tokens · cache reads excluded · {segments.length} agent{segments.length === 1 ? "" : "s"}
937+
{formatTokens(grandTotal)} real · {formatTokens(grandWithCache)} with cache reads · {segments.length} agent{segments.length === 1 ? "" : "s"}
933938
</div>
934939
</div>
935940
</div>

0 commit comments

Comments
 (0)