Groups usage and cost by (project, branch): range-wide branchTotals and
per-day branch breakdowns across SQLite, Postgres, and DuckDB, the
service layer, and HTTP; a Branch group-by toggle on the cost-over-time
chart and the Attribution panel with human project/branch labels; and
the per-dimension accumulate boilerplate collapsed into one generic
accumulator, matching the pattern DuckDB's usage code already used.
Branches are also excludable like every other dimension: clicking a
branch tile or row hides it from all usage panels, a "Branch: N hidden"
toolbar dropdown reviews and un-hides, exclusions persist in the URL
and localStorage, and the prior-period comparison respects them. Under
the hood, exclude_git_branch travels through HTTP, service, and all
three backends via a NOT-wrapped composite-pair predicate (empty or
malformed token lists exclude nothing) with the same cursor-usage
bypass handling as the include filter. The usage store fetches its own
branch list from the /branches endpoint, so the page works standalone.
Adds branch grouping to the usage view, building on the branch filter foundation. Usage summaries now return range-wide
branchTotalsand per-daybranchBreakdownsfor each(project, branch)pair across SQLite, PostgreSQL, and DuckDB. The cost-over-time chart and Attribution panel get a Branch group-by option with humanproject/branchlabels.Branch can now be excluded like Project, Agent, and Model. Clicking a branch tile or row hides that branch across usage panels; the toolbar shows
Branch: N hiddenwith unhide controls, andexclude_git_branchis stored in the URL and localStorage so reloads and prior-period comparisons keep the filter.For reviewers, the branch grouping is intentionally implemented at the usage-view layer rather than as a shared grouping primitive. The exclude filter flows through HTTP, service, and backend usage filters as a NOT-wrapped composite-pair predicate; empty or malformed token lists exclude nothing, and cursor-usage rows are bypassed when branch filters are active. The usage store fetches branch options from
/branches, so the usage page does not depend on session-page state.