Repository navigation
feat(statusline): show logged-in account email (show_account) - #201
Merged
Merged
Conversation
Add an opt-in segment that displays the logged-in Claude account email after the model name, so multi-account users can tell which account a session runs under. - _shared.read_account_email(): reads oauthAccount.emailAddress from $CLAUDE_CONFIG_DIR/.claude.json (else ~/.claude.json); local read only, None on missing/invalid file or API-key auth, non-printables stripped - show_account config key (default false) + color_account color key, wired in both the package and the standalone script - conf templates, README, configuration docs, CONTRIBUTING, CLAUDE.md sync table, CHANGELOG - parity tests: reader grid, file resolution, render parity on/off; isolated_home now clears CLAUDE_CONFIG_DIR
5 tasks
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.
Description
Adds an opt-in
show_accountoption that displays the logged-in Claude account email after the model name, so users who switch between accounts can tell which one a session is running under:oauthAccount.emailAddressin Claude Code's.claude.json:$CLAUDE_CONFIG_DIR/.claude.jsonwhenCLAUDE_CONFIG_DIRis set, else~/.claude.json.show_account=true; color viacolor_account(defaults to the dim separator color)._shared.py(vendored byte-identically toscripts/_statusline_shared.py); config key, color slot, and segment wired in both the package and the standalone script. New row added to the CLAUDE.md sync table.Related Issue
None. (The CI
Dependency Vulnerability Scanfailure seen on this PR predates it; tracked in #202, fixed by #203.)Type of Change
Checklist
Testing
ruff check .andmypy src scriptscleanpytest tests/python/— 1553 passed, coverage 96.9% (floor 94%).claude.jsonpath resolution (CLAUDE_CONFIG_DIRvs~), byte-identical package/script render with the option on and offisolated_homefixture now clearsCLAUDE_CONFIG_DIRso a developer's real account email can't leak into test rendersCLAUDE_CONFIG_DIRprofile via a pipx install from this branchDecision Record
CLAUDE_CONFIG_DIRprofiles) cannot tell them apart.oauthAccount.emailAddressfrom Claude Code's local.claude.json; (2) query the account over the network; (3) show it by default vs. opt-in.show_account(default off) reading$CLAUDE_CONFIG_DIR/.claude.json, else~/.claude.json; non-printable characters stripped; reader single-sourced in_shared.pyand vendored byte-identically to the standalone script;color_accountcolor slot..claude.jsonis re-parsed on every render when enabled (measured ~0.4–3.8 ms on a 611 KB file); relies on Claude Code's undocumentedoauthAccountfield, which hides gracefully if the shape changes.