Repository navigation
feat(usage): show account-specific remaining subscription quota - #472
Open
Adam-Dalloul wants to merge 128 commits into
Open
Adam-Dalloul wants to merge 128 commits into
Adam-Dalloul wants to merge 128 commits into
Conversation
Adam-Dalloul
force-pushed
the
remaining-quota-honest-panel
branch
from
August 16, 2026 17:01
9f86b6a to
3b55c9f
Compare
Settings MCP still targets the built-in family row. Extra custom agents whose spec.env sets CLAUDE_CONFIG_DIR, CODEX_HOME, GROK_HOME, GEMINI_CONFIG_DIR, or OPENCODE_CONFIG_DIR now receive the same server on upsert and lose it on remove. Claude extra homes only get enabledPlugins; server defs stay in the shared ~/.claude.json. Auth files are never copied.
Custom agents whose spec.env sets a family isolator now have a Sign in card on the Agents page. That opens the official CLI login (claude/codex/grok/gemini/opencode) with the isolator env set. No tokens are copied. Account 1 stays on the built-in home. Headless and unit-test paths return the command instead of spawning a terminal.
Settings MCP still targets the built-in family row. Extra custom agents whose spec.env sets CLAUDE_CONFIG_DIR, CODEX_HOME, GROK_HOME, GEMINI_CONFIG_DIR, or OPENCODE_CONFIG_DIR now receive the same server on upsert and lose it on remove. Claude extra homes only get enabledPlugins; server defs stay in the shared ~/.claude.json. Auth files are never copied.
Custom agents whose spec.env sets a family isolator now have a Sign in card on the Agents page. That opens the official CLI login (claude/codex/grok/gemini/opencode) with the isolator env set. No tokens are copied. Account 1 stays on the built-in home. Headless and unit-test paths return the command instead of spawning a terminal.
Adam-Dalloul
force-pushed
the
remaining-quota-honest-panel
branch
from
October 11, 2026 15:17
3b55c9f to
cf69039
Compare
This was referenced Oct 11, 2026
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.
Show remaining subscription quota for the account a conversation actually uses, with reset windows and clear unavailable states. Supported sources are Claude, Codex, Grok, Cursor and OpenCode Go. Context occupancy and public API-list cost estimates remain separate from subscription quota.
This combined branch includes #919's native accounts and guided sign-in/API-key setup, plus #470/#471 compatibility. A named account keeps its native agent features, isolated configuration and authentication. Named-account quota reads use the launch authentication resolver, and authentication changes invalidate cached quota.
Fresh @mentions and delegation preserve an explicit native account; resuming a child retains its saved account. OpenCode code-mode delegation now correlates using the account argument too. Unreadable account expressions stay unkeyed instead of being mistaken for Default.
The UI retains existing desktop/web controls and phone layouts. Native Claude switching retains verified session/task state and refuses active work, unavailable models or live context resets. Writer checks include conversation identity even while a process is stopping. #669 adds the explicit cross-agent/account saved-context dialog.
The filter fix #1029 and recording fix #1048 are now merged upstream and included here with the maintainer's fixes for model labels, relayed-message usage and duplicate imports. The account import paths retain those protections for Default and named accounts. Native usage recovery remains a separate policy discussion in #1047; API-list estimates shipped with #503.
All previously published migration IDs and branch history are retained. New compatibility markers distinguish these schema backups from older builds.
Validation after the usage merges: production server/MCP/CLI compilation and build, all-target Clippy, the production frontend export and 1,144 UI regressions passed. Focused backend tests cover account-scoped imports, Codex environment handling, handoff, token usage, reported counters and ACP transcript projection. Real HTTP/MCP/browser fixtures cover native task restoration, unavailable-model refusal, rollback, paged history and images, account/agent switching, drafts/titles, @ routing, retry, restart, import deduplication and reset refusal, including phone and RTL layouts. A custom-agent recording fixture also verifies concrete model labels, no duplicate import through a named account, reopening, and schema-triggered refresh. The old database and frozen usage fixtures remain intact. These use isolated synthetic data and CLI fixtures, not live sign-in/generation for every provider or OS. The only change after the browser/runtime run was a test helper argument; production code is unchanged. CI runs again on the refreshed commits.
Maintainer edits are enabled. The fixtures do not establish live provider sign-in/generation for every agent or OS.