Skip to content

Show today's voice use in the Account tab - #178

Merged
longzhi merged 2 commits into
mainfrom
claude/account-usage
Oct 25, 2026
Merged

longzhi merged 2 commits into
mainfrom
claude/account-usage

Conversation

@longzhi

@longzhi longzhi commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Closes #170. Part of second-state/vibebuddy-cloud#3.

What changes

Daemon. The account now keeps today's voice use and the day's refusal, and /v1/status account gains today (day, commands, commands_limit) and refused (allowance or global_cap). Changes are pushed on the status stream.

  • It reads the use from the service's GET /v1/account at sign-in, and again on a new POST /v1/account/refresh, which the Apps call when the Account tab opens. That costs a request to the service, so it isn't done on every status.
  • It counts each command the voice service recognizes, since the service counted it too, so the tab stays current without asking again.
  • It remembers a 429 refusal until the UTC day ends. A new UTC day reads as nothing used and nothing refused, and when signed out neither is shown.

Apps (Mac and Linux). When signed in, the tab shows "Voice today: 7 of 100". After a refusal it shows "Today's voice is used up. It comes back at midnight UTC." or "Voice is paused for everyone today. …" instead. Wording goes through the shared zh-Hans table, and docs/app.md is updated.

Checked

  • cargo test --workspace --locked: all pass. They include a new daemon test (read, count up, refusal, a refusal from another day, signed out) and Linux status decoding.
  • cargo clippy: no new warnings.
  • swift build --package-path app succeeds and the SelfTest passes, including the new decoding check.
  • tools/check-localization.py: ok, 329 keys.
  • Not clicked through on either App, and not checked against a lowered allowance on staging. The issue's criteria want both on a box.

🤖 Generated with Claude Code

longzhi and others added 2 commits October 24, 2026 10:10
The daemon keeps today's use from the service (read at sign-in and when
the App opens the tab, POST /v1/account/refresh), counts each command
the voice service recognizes, and remembers an allowance or global-cap
refusal until the UTC day ends; /v1/status carries both. Both Apps show
"Voice today: 7 of 100", or why voice is refused until midnight UTC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 24, 2026 02:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@longzhi
longzhi merged commit 474948d into main Oct 25, 2026
2 checks passed
@longzhi
longzhi deleted the claude/account-usage branch October 25, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accounts: show today's voice use in the Account tab

2 participants