fix: T-128 show account and provider on each subscription limit bar - #106
Merged
jaesbit merged 1 commit intoJul 15, 2026
Merged
Conversation
Each progress bar now carries a subtitle line with provider and account (e.g. "anthropic · acc_abc") so it is immediately clear which account each window belongs to. Changes: - SubscriptionUsageLimit gains optional provider and account fields; server always populates account via scope.accountId ?? orgId ?? projectId ?? tier ?? "(shared)". - Display dedup key changed from limit.id to provider:account:limitId so same-window limits from different accounts render as separate bars instead of collapsing to the highest fraction. - SubscriptionLimitsContent shows provider · account below each label; falls back to "–" for pre-revision payloads. React key is now a composite of provider, account and label to handle per-account bars with the same window label. - Four new regression tests: separate bars for distinct accountIds, field propagation, and the full fallback chain (orgId → projectId → tier → "(shared)").
jaesbit
deleted the
auto-work/t128-subscription-consumption-account-provide
branch
July 15, 2026 23:20
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.
T-128 — Revisión: contexto de cuenta en las barras de consumo
El PR anterior (#104) añadió cuenta y proveedor a la tabla de sesiones pero las barras de progreso de subscription limits seguían sin indicar de qué cuenta era cada ventana.
Cambios
Protocol (
packages/protocol/src/index.ts):SubscriptionUsageLimitgana campos opcionalesprovideryaccount.Server (
apps/server/src/usage-subscription.ts):limit.idaprovider:account:limitId— ventanas iguales de cuentas distintas ahora generan barras separadas en vez de colapsar a la fracción más alta.accountse deriva comoscope.accountId ?? orgId ?? projectId ?? tier ?? "(shared)"y siempre está presente.UI (
apps/web/src/views/SubscriptionLimitsView.tsx):provider · accountcomo subtítulo debajo del label de ventana.provider:account:label) para soportar barras por cuenta con mismo label de ventana.Tests (
apps/server/src/usage-subscription.test.ts):orgId → projectId → tier → "(shared)").