feat: track usage per provider profile #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/provider-profiles"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Makes the polled unit a provider profile instead of a hardcoded harness, so several accounts of the same harness can be tracked at once.
Neither harness takes an account argument — both select an account by the config directory they read. A profile is therefore a name plus the two paths that identify one account:
~/.claude<configPath>/.credentials.json~/.codexCODEX_HOME=<configPath>to theapp-serverchildAn empty path means the harness default, so the built-in profiles carry no absolute paths that could go stale.
What changed
src/harness/profiles.ts(pure, unit-tested) plussrc/lib/profiles-store.tsas the only GSettings gateway. Oneprovider-profileskey holding a JSON array, andprofiles-seededso that deleting every profile is a decision that survives a restart.enabled-harnessesandcodex-cli-path. Both keys stay in the schema, marked deprecated, read once. An existing install comes up looking exactly as it did.CLAUDE_CONFIG_DIR=/home/you/.claude-work claude auth login. The bare command would sign the default account in again and leave the account the user was told about untouched.Soup.Message.get_status()throws in GJS for codes outside theSoup.Statusenum, so the existing 429 branch was unreachable: a rate limit surfaced as429 is not a valid value for enumeration Status. Read from thestatus-codeproperty instead. Found while probing; more accounts on one interval makes 429s likelier.Verification
just checkclean;just packincludes the new modules.not-signed-in, an alternateCODEX_HOME→not-signed-in(the child confirmedcodexHome), unknown-harness profile skipped, disabled profile absent.Not covered by automated checks: panel chips and dropdown tab rendering, which need the extension loaded in a Shell.
Breaking change
enabled-harnessesandcodex-cli-pathno longer control polling; they are read once to seed the initial profiles.