mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
Scope the drill-through fetch by the Projects filter and fix dead drill entries
Rebasing onto main put the new getSessionsContributions handler beside the Projects-pane filter from #1307 without picking it up, so the drill-through would have listed unfiltered sessions under a filtered headline. - main.ts: add projectArgs() to the new handler, matching getSessions; the existing filter test now asserts the new channel too. - usage-aggregator/day-aggregator: actually set categories[].rawCategory. menubar-json already declared and forwarded it, but no producer wrote it, so topActivities[].rawCategory was always undefined and the category drill entry was permanently disabled in both aggregation paths. - Models.tsx: key the model drill off modelDisplayName. Contribution segments are keyed by canonical short name ("Fable 5"); the row's raw provider ids ("claude-fable-5") matched 0 of 19 segment keys on real data.
This commit is contained in:
parent
756af7fcdf
commit
989d953a78
5 changed files with 12 additions and 7 deletions
|
|
@ -300,7 +300,7 @@ export function buildPeriodDataFromDays(days: DailyEntry[], label: string): Peri
|
|||
cacheWriteTokens,
|
||||
categories: Object.entries(catTotals)
|
||||
.sort(([, a], [, b]) => b.cost - a.cost)
|
||||
.map(([cat, d]) => ({ name: CATEGORY_LABELS[cat as TaskCategory] ?? cat, ...d })),
|
||||
.map(([cat, d]) => ({ name: CATEGORY_LABELS[cat as TaskCategory] ?? cat, rawCategory: cat, ...d })),
|
||||
models: Object.entries(modelTotals)
|
||||
.sort(([, a], [, b]) => b.cost - a.cost)
|
||||
.map(([name, d]) => ({ name, ...d })),
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ export function buildPeriodData(label: string, projects: ProjectSummary[]): Peri
|
|||
inputTokens, outputTokens, cacheReadTokens, cacheWriteTokens,
|
||||
categories: Object.entries(catTotals)
|
||||
.sort(([, a], [, b]) => b.cost - a.cost)
|
||||
.map(([cat, d]) => ({ name: CATEGORY_LABELS[cat as TaskCategory] ?? cat, ...d })),
|
||||
.map(([cat, d]) => ({ name: CATEGORY_LABELS[cat as TaskCategory] ?? cat, rawCategory: cat, ...d })),
|
||||
models: Object.entries(modelTotals)
|
||||
.sort(([, a], [, b]) => b.cost - a.cost)
|
||||
.map(([name, d]) => ({ name, calls: d.calls, cost: d.cost, savingsUSD: d.savingsUSD, estimatedCostUSD: d.estimatedCostUSD })),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue