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>
This commit is contained in:
2026-11-30 16:33:46 +00:00
parent e80f18969c
commit 0dc805ae0e
22 changed files with 386 additions and 62 deletions
+12
View File
@@ -11,3 +11,15 @@ 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).