Repository navigation
Group agent spend by Git branch - #146
Merged
Merged
Conversation
Read the branch each session ran on from agent traces (Claude gitBranch, Codex session_meta) and add: - Sessions > By branch: spend per branch with search, app, project, time, status, and show-main filters, sorting, and expandable session lists. - A shared branch chip on session cards, All sessions rows, and the session header that opens the branch in By branch. - Git > Branches: cost to ship, unshipped spend, rework after first push, and hard-to-finish branches, scored lower-is-better, plus a searchable, sortable table showing five rows at a time. Branch names stay on the local dashboard. MCP, the menu bar, /state, and notifications never carry them. The Git ledger (schema 2, additive) stores salted branch keys and each branch's own non-merge commits, never ref names. No GitHub or GitLab access. Co-Authored-By: Claude Code <noreply@anthropic.com>
- Store a push as incomplete when no trunk reflog entry predates it, and wait for a later scan when a trunk ref exists but was not read, so commit counts are never a measured zero by accident. - Keep /git-delivery working if the branch rollup fails. - Ask Git for all history when By branch shows all history. - Visible keyboard focus on branch sessions; aria-controls only while expanded; the count label includes listed main rows; Branch sort follows the displayed name. - Describe branch keys as salted pseudonymous keys; note the one default branch per repository limit. Co-Authored-By: Claude Code <noreply@anthropic.com>
A trunk ref outside the selected refs (over the remote-ref cap or in another rotation batch) is now read on demand for branch evidence only. If it cannot be read, the push waits at most three passes and is then stored incomplete, never reported as not pushed. packed-refs is parsed once per repository scan. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Token Meter now groups spend by the Git branch each session ran on, using only local data: agent session files and this Mac's Git reflogs. Nothing calls GitHub, GitLab, or an issue tracker.
#sessions-branches): spend per branch with search (branch or issue key such asENG-142), app, project, time range, push status, and a show-main toggle. Rows sort and expand to their sessions. All five Sessions tabs sit on one row.:where(.branchChip)component on session cards, All sessions rows, the session header, and both branch tables. It opens the branch in By branch.Privacy and data
gitBranchand Codexsession_meta.git.branch. They are stored internally as_branch. Only/logsexposesbranchand a path-freerepolabel./state,/menubar, notifications, and every MCP tool, includinggit_stats, carry no branch. Tests check for both the key and a sample branch name.Rule changes
specs/ARCHITECTURE.md: branch names may appear on the local dashboard only, never in MCP, the menu bar, notifications, or logs.specs/DESIGN.md: the four branch metrics are scored lower-is-better; pushed-code volume and ratios stay neutral.specs/AGENTS.md: Sessions gainsBy branch. RootAGENTS.mdwas regenerated through the tested transform, becausescripts/setup-agent-toolsis absent onmain.Validation
scripts/check-page, and py_compile pass./healthOK and/menubarhas no branch. Source and runtime match. Branch spend agrees for all 37 live branches between both pages.180b0df. The owner waived the second reviewer.Known limits
🤖 Generated with Claude Code