Repository navigation
Paid plan: show the plan and the monthly allowance in the App - #188
Merged
Merged
Conversation
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>
The daemon reads the account's plan from GET /v1/account wherever it reads today's usage (sign-in, POST /v1/account/refresh), and on the Paid plan counts each reply spoken through the service against the month, in UTF-16 code units as the service does, until the limit is crossed. /v1/status `account` gains `plan`. Both Apps show "Free" or "Paid plan", and on Paid "This month: 12,300 of 100,000 characters · renews 24 Nov"; the daily line stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
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.
This was referenced Oct 24, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #180. Part of second-state/vibebuddy-cloud#16 (ADR-0020, #179).
Based on
claude/account-usage(#178), which isn't merged yet; retarget tomainonce it is.What changes
Daemon.
/v1/statusaccountgainsplan, as the service'sGET /v1/accountgives it:{"name":"free"}, or{"name":"paid","period_end":…,"characters":…,"characters_limit":…}. It's read wherever today's usage is read (sign-in,POST /v1/account/refresh) and pushed on the status stream. On the Paid plan, each reply spoken through the service (/v1/voice/speakanswering 200) adds its text's length in UTF-16 code units, as the service counts it (JSlength), while the month is below its limit; the reply that crosses it counts, later ones go to the daily replies as on the service. Free counts nothing here.Apps (Mac and Linux). The Account tab shows "Free" or "Paid plan" under the account name, and on Paid "This month: 12,300 of 100,000 characters · renews 24 Nov" (grouped numbers, the renewal date in local time; 11月24日 in Chinese). The daily line stays. No Upgrade button. Strings in the shared zh-Hans table; docs/app.md updated.
Checked
cargo test --workspace: all pass, including a new daemon test (Free parsed and serialized as{"name":"free"}with nothing counted; Paid parsed; "café 😀" counted as 7; the crossing reply counted and the next not; signed out shows no plan) and a Linux status test (decoding, Free has no month line, the line's wording and grouping).cargo clippy --all-targets --workspace: no warnings in the touched files.swift build --package-path appandswift run --package-path app SelfTest: pass, with Free and Paid plan decoding checks.python3 tools/check-localization.py: ok, 332 keys.🤖 Generated with Claude Code