codeburn/app/renderer
reviewer 4b787194d7 sessions: fold subagent runs into PR attribution
Sidechain (subagent) session cost never reached the by-PR view, so a
session orchestrated on one model with subagent lanes on another showed
only the parent model on every PR row. Fold each sidechain's cost, calls,
models, and categories into the parent turn that spawned it, so it
inherits that turn's PR set under the existing turn-level state machine.

Linkage, in priority order: the spawn result's toolUseResult.agentId
pairs the child's agent id with the Agent/Task tool_use id that launched
it (recorded per turn), which is the true launch point and wins even when
the child's first activity landed during a later turn; else the child's
first-activity timestamp is bucketed into the containing turn span; else
the child folds into the parent's unattributed spend. Children of parents
that referenced no PR, and orphans whose parent is absent from the scan,
contribute nothing, unchanged.

Cache v6 to v7 (neither shipped, so one combined bump from v5): per-turn
spawnToolUseIds, per-file parentSessionId and agentSpawnLinks; the
validator and the append/compact paths thread them like prRefs. By-PR
footers now count parents plus folded subagent runs and the payload gains
an additive subagentSessions field. distinctCost now includes folded
subagent spend, documented in the payload comment.
2026-07-21 05:46:36 +02:00
..
assets brand: restore binary 0101 flame across all surfaces 2026-07-17 14:14:40 -07:00
components payload: spend by pull request and by branch; desktop Pull requests tab (#788) 2026-07-20 14:36:53 -07:00
hooks app: Download button direct-downloads the update asset (#777) 2026-07-20 10:02:43 -07:00
lib sessions: fold subagent runs into PR attribution 2026-07-21 05:46:36 +02:00
sections sessions: fold subagent runs into PR attribution 2026-07-21 05:46:36 +02:00
styles sessions: attribute PR spend per turn instead of per session (#790) 2026-07-20 20:44:29 -07:00
test feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
App.test.tsx payload: spend by pull request and by branch; desktop Pull requests tab (#788) 2026-07-20 14:36:53 -07:00
App.tsx payload: spend by pull request and by branch; desktop Pull requests tab (#788) 2026-07-20 14:36:53 -07:00
index.html harden(app): Electron security + spawn efficiency batch 2026-07-16 01:57:44 -07:00
main.tsx fix(app): zero background work when hidden; currency applies instantly 2026-07-16 18:41:28 -07:00
vite-env.d.ts feat(app): scaffold Electron+Vite package and codeburn CLI spawn 2026-07-10 15:16:55 -07:00