feat(accounts): add account control center#251
Open
ozymandiashh wants to merge 3 commits into
Open
Conversation
Contributor
Author
|
Validation run on macOS arm64 with private details omitted. This is structural account-output proof, not just build proof. What was checked:
Commands:
No local account names, account paths, project names, prompts, session IDs, raw costs, usage totals, or private product details are included here. |
d99e9e6 to
696bd5c
Compare
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
Rebases and updates the Account Control Center on current
mainwhile preserving the current CLI split:src/cli.tsremains the Node-version-safe launcher, and the account workflow lives insrc/main.ts.This PR builds on the multiple Claude config directory work and turns it into a user-facing attribution workflow for people who run work, personal, desktop, or client Claude accounts side by side.
It answers questions that aggregate cost views cannot answer:
What changed
CLAUDE_CONFIG_DIRSthrough project/session parsing.account,accountPath, andsourcePath, so the same project path under two Claude accounts does not merge into one summary.codeburn accountscommand with text and JSON output.planmonthlyUsdbudgetUsdresetDay--accountfiltering added to:reporttodaymonthstatusexportaccountsoptimizecompareExamples
A project present under both
workandpersonalaccount roots is now reported separately instead of being silently merged. Unlabelled provider usage remains grouped asunlabelled, but it does not create duplicate-project noise against labelled Claude accounts.Account Signals
The account report surfaces:
Risk signals include:
Review Fixes
Pre-push review found and fixed these issues before the branch was updated:
Workandworkdo not become separate configured rows.homeworkdo not trip theworkmarker.0.001render asUSD 0.001, notUSD 0.AccountandAccount Pathcolumns even when the first sorted row is unlabelled.Validation
npx vitest run tests/accounts.test.ts tests/cli-accounts.test.ts tests/parser-filter.test.ts tests/export.test.ts tests/cli-json.test.ts tests/providers/claude.test.ts tests/cli-export-date-range.test.ts— 37/37 passed.npx tsc --noEmit --pretty false— passed.npm run build— passed.git diff --check— passed.check,semgrep, andassess— passed.Security / Privacy
This is local aggregation and local config only. It does not add shell execution, network calls, remote writes, or secret handling. CSV export continues to use the existing spreadsheet-injection escaping path.
No local account names, project names, prompts, session IDs, real paths, costs, usage values, or private product details are included in this PR description.