Repository navigation
Add built-in provider usage disclosure - #3100
Merged
Merged
Conversation
ymichael
added a commit
that referenced
this pull request
Sep 5, 2026
## Human comments ## What was wrong Provider Usage displayed quota for a machine's direct provider login without identifying which account supplied those limits. Users with multiple provider accounts therefore could not tell which account the card described. This is the narrow account-identity prototype requested after #3100; Account Pool-aware effective-source reporting remains out of scope. ## What changed - Preserve the existing `accountEmail` field through the Provider Usage plugin's normalization and RPC schema. - Show the provider name with a subtle, truncated account email beneath it and the plan pill at the right. - Keep the full email available through the element title and omit the row when no account email exists. - Update backend, schema, and frontend fixtures for the explicit account contract. ## How you verified - `pnpm exec turbo run test typecheck --filter=bb-plugin-provider-usage --force` (4/4 tests and typecheck passed) - `bb plugin build plugins/provider-usage` - Targeted `oxfmt --check` - `git diff --check origin/main...HEAD` - The fixer rebuilt/reloaded the plugin and captured matching before/after UI evidence before handoff. > AGENT GENERATED
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.
Human comments
What was wrong
bb exposes provider rate-limit data through the CLI and Plugin SDK, but people could not see it at a glance in the app. The new sidebar-footer disclosure surface had no built-in consumer, so checking provider capacity still required leaving the sidebar workflow.
What changed
Added a built-in Provider Usage plugin that uses
app.experimental_sidebarFooter.register(...)to show provider limits in a compact sidebar disclosure. It preserves provider ordering and real icons, supports multiple enrolled machines, remembers provider selection per machine, and shows plan, reset, unavailable, warning, and critical states.The plugin loads fresh data when opened, reconciles after meaningful focus or visibility changes, performs a low-frequency safety refresh only while the app is visible, and invalidates the affected machine's cached data after thread completion. It consumes the existing
bb.sdk.system.usageLimits()contract; there are no server/daemon wire changes orHOST_DAEMON_PROTOCOL_VERSIONchange. The plugin is bundled and auto-installed, but disabled by default on fresh databases. Existing users can enable it from Plugins settings. The existingbb settings usage --jsonand Plugin SDK surfaces remain the agent-accessible equivalents.How you verified
pnpm exec turbo run typecheck test --filter=bb-plugin-provider-usage --force— 3 test files and 4 tests passed.pnpm exec turbo run test --filter=@bb/server --force -- --run test/services/plugins/builtin-plugins.test.ts— 31 tests passed, including a fresh-database assertion that Provider Usage starts disabled.pnpm exec turbo run typecheck --filter=@bb/server --filter=@bb/plugin-api-map --filter=bb-app --force— all tasks passed.pnpm exec turbo run test --filter=@bb/plugin-api-map --force— 10 files and 72 tests passed.pnpm exec turbo run test --filter=@bb/app --force -- --run src/components/plugin/management/UpdatePluginDialog.test.tsx— 7 tests passed.env -u BB_CLI pnpm bb:dev plugin build plugins/provider-usage— app and server artifacts built against Plugin SDK 0.4.47.oxfmt --checkandgit diff --checkpassed.Fixes: no linked issue.