Files
pipelines/app/notes/chat-account-usage.md
T
alan 0dc805ae0e Chat: show the active Claude account in the send tooltip, menu and limit banner
usage.account now carries the email and organization of the account
Claude Code is signed in to (from its initialize account, or the saved
account just switched to), sent at process start and after a switch.
The app shows it as the send tooltip's usage prefix, the Claude account
menu subtitle, the usage-limit banner's status line and the info sheet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 16:33:46 +00:00

26 lines
1.5 KiB
Markdown

# Chat info: account usage
The chat information sheet shows an "Account usage" section from
`usage.account` (wire shape in docs/cli.md): one LinearProgressIndicator per
reported window ("42% used · resets in 2h 14m"), the plan and "as of <age>".
Cupertino draws the same indicator in system fill/tint colors, since Cupertino
has no linear progress control. An unknown quota hides the section; OpenCode
(no quota API) shows "Not reported by OpenCode". Countdowns tick every 30 s.
Evidence: `test/features/chat/conversation/chat_account_usage_test.dart`
(both hosts), and captures from the probe fixture with `?chats=1&quota=claude`
or `quota=opencode` (`tool/perf/perf_fixture.dart`), opened at
`/chat/perf-chat-0` and clicking the title, 560x1000, Material and Cupertino.
## Active Claude account
`usage.account.email` (and `organization`) names the account Claude Code is
signed in to now; the server sends it at process start and after a switch. A
Claude chat shows it as the send tooltip's usage line prefix ("Send\nsam@… ·
5-hour 42% · …"), the ⋮ menu "Claude account" subtitle, the usage-limit
banner's status line ("sam@… · Resets at 18:43") and the info sheet's plan
line. Without an email (API key, other harnesses) nothing is shown. Tests:
`test/features/chat/conversation/chat_claude_active_account_test.dart`.
Captures: `?chats=1&msgs=4&harness=claude&claudeAccounts=2&quota=claude`
(hover Send; open ⋮) and `...&claudeAccounts=2&claudeUsage=limit` (banner).