Skip to content

feat(usage): show account-specific remaining subscription quota - #472

Open
Adam-Dalloul wants to merge 128 commits into
spacering-net:mainfrom
Adam-Dalloul:remaining-quota-honest-panel
Open

Adam-Dalloul wants to merge 128 commits into
spacering-net:mainfrom
Adam-Dalloul:remaining-quota-honest-panel

Conversation

@Adam-Dalloul

@Adam-Dalloul Adam-Dalloul commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

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.

@Adam-Dalloul Adam-Dalloul changed the title Show remaining subscription only from official payloads Show remaining subscription from live official CLI payloads Aug 15, 2026
@Adam-Dalloul
Adam-Dalloul force-pushed the remaining-quota-honest-panel branch from 9f86b6a to 3b55c9f Compare August 16, 2026 17:01
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
Adam-Dalloul force-pushed the remaining-quota-honest-panel branch from 3b55c9f to cf69039 Compare October 11, 2026 15:17
@Adam-Dalloul Adam-Dalloul changed the title Show remaining subscription from live official CLI payloads feat(usage): show remaining quota for the current agent account Oct 11, 2026
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.

2 participants