Skip to content

sessions: spend per pull request via --by-pr#780

Merged
iamtoruk merged 1 commit into
mainfrom
feat/sessions-by-pr
Jul 20, 2026
Merged

sessions: spend per pull request via --by-pr#780
iamtoruk merged 1 commit into
mainfrom
feat/sessions-by-pr

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

First display surface for the #758 PR-link capture: codeburn sessions --by-pr groups spend by the pull requests each session referenced, sorted by cost, with sessions/calls/date-span columns, GitHub-shortened labels, a json format, and a distinct-total footer that keeps by-reference attribution honest (a session naming several PRs counts toward each row). prLinks are threaded from the cache onto SessionSummary in both the Claude and generic provider paths. Driven on real data: 15 PR-linked sessions render with correct query-time pricing. Five aggregation tests.

The rich session capture (#758) stores every PR URL a transcript
references, but nothing displayed it. codeburn sessions --by-pr now
groups spend by pull request: cost, savings, sessions, calls, and the
date span per PR, sorted by cost, with a GitHub-shortened label and
json output. Attribution is by reference, so a session that mentions
several PRs counts fully toward each row; the footer reports the
distinct-session total so overlapping rows are never mistaken for a
grand total. prLinks now ride from the cached file onto SessionSummary
in both the Claude pipeline and the generic provider path.
@iamtoruk
iamtoruk merged commit 8676f0d into main Jul 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant