codeburn/app/renderer/sections
reviewer a3a4c97ec5 sessions: harden PR attribution and add models + category breakdown
Addresses the review findings on the per-turn PR attribution and adds the
model and task-category surfaces.

Correctness:
- Cache migration: the 5 -> 6 session-cache bump now adopts the prior v5
  file's expired-source PR entries instead of abandoning them, and the claude
  scan preserves and surfaces PR-bearing orphans, so a session whose transcript
  was deleted still appears as a legacy even-split instead of vanishing. The
  daily cache is untouched.
- Date-range carry: the parser captures the PR set active at the start of the
  in-range turn slice and seeds the state machine with it, so a PR referenced
  before the window still owns its later, in-range, ref-less turns instead of
  the session falling back to a whole-session approx split.
- Calls are split across a multi-PR turn by largest-remainder, keeping per-PR
  counts whole (a 1-call, 2-PR turn no longer renders as 2 calls).
- The CLI and app footers reconcile to the rounded row values actually shown.
- Distinct sessions are keyed by project + sessionId, not sessionId alone.
- The app tolerates an older by-reference payload (no attributedCost): it keeps
  the old non-summable footer and never renders NaN.

Features:
- Each PR contribution records the models of its calls and the turn's task
  category (split by the same share on a multi-PR turn); legacy even-split rows
  carry the model union but no category breakdown.
- Payload rows gain models (short names, cost-desc) and categories (label + cost,
  cost-desc, omitted when empty); the payload gains otherPrCount/otherPrCost for
  the PRs beyond the sent top 20.
- CLI --by-pr gains a Models column. The desktop table is now full-width with a
  Models column and click-to-expand rows showing a per-category cost breakdown
  with proportional bars, keyboard accessible, with an "Other (N more PRs)" row
  when capped.

Tests: state-machine seed/models/categories/largest-remainder/dedup, the prRefs
round-trip through the real incremental-append path (continuation + straddle),
v5 adoption of an expired PR session, payload round-trip, and the desktop
expansion/models/old-payload cases.
2026-07-21 01:08:52 +02:00
..
Compare.test.tsx fix(app): accuracy batch A — provider scoping, honest chart axes, range threading, stale-error banner 2026-07-16 01:14:41 -07:00
Compare.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
Models.test.tsx fix(app): models rows name their provider; picker shows all detected 2026-07-16 09:27:46 -07:00
Models.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
Optimize.test.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
Optimize.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
Overview.test.tsx app: Workflow card on Overview and session titles in the Sessions view (#784) 2026-07-20 13:55:33 -07:00
Overview.tsx app: Workflow card on Overview and session titles in the Sessions view (#784) 2026-07-20 13:55:33 -07:00
Plans.test.tsx fix: audit batch — prefetch one-shot, turn-anchored day bucketing, warm-path collapse 2026-07-16 15:37:03 -07:00
Plans.tsx feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
PullRequests.test.tsx sessions: harden PR attribution and add models + category breakdown 2026-07-21 01:08:52 +02:00
PullRequests.tsx sessions: harden PR attribution and add models + category breakdown 2026-07-21 01:08:52 +02:00
Sessions.test.tsx app: Workflow card on Overview and session titles in the Sessions view (#784) 2026-07-20 13:55:33 -07:00
Sessions.tsx app: Workflow card on Overview and session titles in the Sessions view (#784) 2026-07-20 13:55:33 -07:00
Settings.test.tsx fix(app): provider logos key on internal ids + monogram fallback 2026-07-16 09:27:46 -07:00
Settings.tsx app: Download button direct-downloads the update asset (#777) 2026-07-20 10:02:43 -07:00
Spend.test.tsx feat(app): Sessions provider quick-filter + Spend project inline expand 2026-07-16 02:49:17 -07:00
Spend.tsx app,dash: render pre-history days as no data, not a currency zero (#765) 2026-07-20 08:03:24 -07:00