Repository navigation
fix(dashboard): show account email/name in Utilization Account Split cards - #10939
Merged
diegosouzapw merged 1 commit intoAug 21, 2026
Conversation
…cards In Account Split mode, cards showed raw `provider:connection_uuid` strings instead of the account's email or display name. This made it impossible to identify which account was exhausted without cross-referencing UUIDs manually. Changes: - Add `connectionMeta` field to `ProviderUtilizationResponse` type - Enrich API response with email/name/displayName per connection when aggregateBy=connection, fetched from the connections DB via getConnection() - Update card rendering to display email (or name/displayName as fallback) as the card title, with `provider . account <short-uuid>` as subtitle - ProviderIcon now receives the provider name portion only (not the full key)
5 tasks done
backryun
added a commit
to backryun/OmniRoute
that referenced
this pull request
Aug 21, 2026
…n route PR diegosouzapw#10939 imported getConnection from '@/lib/db/connections' — a module that does not exist in the repo. Turbopack failed every production build with 'Module not found: Can't resolve @/lib/db/connections', turning Build App, Publish to Docker Hub, and Release-Green red on release/v3.8.50 (base-red issue diegosouzapw#9985). Resolve connection metadata through the real DB domain module instead: getProviderConnectionById() from src/lib/db/providers.ts (async, so the call site now awaits it). The response shape is unchanged. Regression test: tests/unit/usage-utilization-connection-meta.test.ts covers the aggregateBy=connection metadata path end-to-end against a seeded provider_connections row.
jonlwheat2-gif
added a commit
to jonlwheat2-gif/OmniRoute
that referenced
this pull request
Aug 21, 2026
…oute fix(api): replace non-existent @/lib/db/connections import with getProviderConnectionById from @/lib/db/providers in the usage utilization route — the module was never created while diegosouzapw#10939 added its import, breaking any production build. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
backryun
added a commit
to backryun/OmniRoute
that referenced
this pull request
Aug 21, 2026
…n route PR diegosouzapw#10939 imported getConnection from '@/lib/db/connections' — a module that does not exist in the repo. Turbopack failed every production build with 'Module not found: Can't resolve @/lib/db/connections', turning Build App, Publish to Docker Hub, and Release-Green red on release/v3.8.50 (base-red issue diegosouzapw#9985). Resolve connection metadata through the real DB domain module instead: getProviderConnectionById() from src/lib/db/providers.ts (async, so the call site now awaits it). The response shape is unchanged. Regression test: tests/unit/usage-utilization-connection-meta.test.ts covers the aggregateBy=connection metadata path end-to-end against a seeded provider_connections row.
This was referenced Aug 21, 2026
jonlwheat2-gif
added a commit
to jonlwheat2-gif/OmniRoute
that referenced
this pull request
Aug 21, 2026
…oute fix(api): replace non-existent @/lib/db/connections import with getProviderConnectionById from @/lib/db/providers in the usage utilization route — the module was never created while diegosouzapw#10939 added its import, breaking any production build. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
diegosouzapw
added a commit
that referenced
this pull request
Aug 21, 2026
…provider docs, orphaned suppressions (#11038) ⭐5 — Drain de base-reds v3.8.50 (#9985): corrige build-break do #10939 (import fantasma @/lib/db/connections → reroteado por getProviderConnectionById real), headers Anthropic no fallback GLM, fallthrough do reject de listing CC-compatible, no-auth leak no auto-combo, retry de mesmo-account nos combo live tests, pin onnxruntime-node ~1.24.3; + alignments de teste + gates (env-doc, docs-counts 347→348, openapi floor, i18n vi/pt-BR). Reconciliado com o tip: 5 conflitos de contagem gerada (SVGs + PROVIDER_REFERENCE — HEAD já em 348, branch em 347 stale) resolvidos ficando com o HEAD. typecheck limpo, gates verdes, 5/5 testes focados (#10939 regressão + utilização), lint limpo nos tocados. Também rebaselined neste turno via push direto ao tip: config/quality/file-size-baseline.json modelCapabilities.ts 1016→1072 (drift de PRs ja mergeadas, ex: #11034), com changelog fragment — tip estava vermelho nesse gate e travava esta PR.
linhdmn
pushed a commit
to linhdmn/omniroute-INITIAL_PASSWORD-fix
that referenced
this pull request
Aug 22, 2026
…uild diegosouzapw#10939 added `import { getConnection } from "@/lib/db/connections"` to the utilization route, but no such module exists in the repo — the Next build fails with "Module not found: Can't resolve '@/lib/db/connections'". Add the module following the existing db-helper pattern (getDbInstance + prepared SELECT on provider_connections), returning the email/name metadata the route maps into ConnectionMetaEntry. The route's `conn?.displayName` read is replaced with a literal null: the provider_connections table has no display-name column, and the Account Split card already falls back through getAccountDisplayName (displayName -> name -> email).
linhdmn
pushed a commit
to linhdmn/omniroute-INITIAL_PASSWORD-fix
that referenced
this pull request
Aug 22, 2026
…uild diegosouzapw#10939 added `import { getConnection } from "@/lib/db/connections"` to the utilization route, but no such module exists in the repo — the Next build fails with "Module not found: Can't resolve '@/lib/db/connections'". Add the module following the existing db-helper pattern (getDbInstance + prepared SELECT on provider_connections), returning the email/name metadata the route maps into ConnectionMetaEntry. The route's `conn?.displayName` read is replaced with a literal null: the provider_connections table has no display-name column, and the Account Split card already falls back through getAccountDisplayName (displayName -> name -> email).
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…cards (diegosouzapw#10939) Validado no worktree combinado: typecheck:core, changelog-integrity, complexity, cognitive-complexity, file-size, lint todos verdes. Fix de UX real e bem documentado (cards de Account Split mostravam UUID cru em vez de email/nome da conta). CI vermelho é o base-red já rastreado em diegosouzapw#9985. Obrigado!
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…provider docs, orphaned suppressions (diegosouzapw#11038) ⭐5 — Drain de base-reds v3.8.50 (diegosouzapw#9985): corrige build-break do diegosouzapw#10939 (import fantasma @/lib/db/connections → reroteado por getProviderConnectionById real), headers Anthropic no fallback GLM, fallthrough do reject de listing CC-compatible, no-auth leak no auto-combo, retry de mesmo-account nos combo live tests, pin onnxruntime-node ~1.24.3; + alignments de teste + gates (env-doc, docs-counts 347→348, openapi floor, i18n vi/pt-BR). Reconciliado com o tip: 5 conflitos de contagem gerada (SVGs + PROVIDER_REFERENCE — HEAD já em 348, branch em 347 stale) resolvidos ficando com o HEAD. typecheck limpo, gates verdes, 5/5 testes focados (diegosouzapw#10939 regressão + utilização), lint limpo nos tocados. Também rebaselined neste turno via push direto ao tip: config/quality/file-size-baseline.json modelCapabilities.ts 1016→1072 (drift de PRs ja mergeadas, ex: diegosouzapw#11034), com changelog fragment — tip estava vermelho nesse gate e travava esta PR.
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.
Problem
In the Analytics > Utilization > Account Split view, each card displayed a raw internal key like
antigravity:cd11b4b9-4718-43c7-b348-f126d83f8e6aas the card title. This made it impossible to identify which account was running low or exhausted without manually cross-referencing UUIDs against the Providers or Combos pages.The root cause:
getAggregatedSnapshots()returnsprovider:connection_idas the key whenaggregateBy=connection. The frontend passed this directly toresolveProviderName(), which only knows about provider nodes — not connection-level email or display names.Solution
Enrich the API response with connection metadata when in Account Split mode, then use it in the frontend to display a human-readable label.
API (
/api/usage/utilization): whenaggregateBy=connection, extract uniqueconnection_ids from the result, fetch each viagetConnection()fromsrc/lib/db/connections, and include aconnectionMetamap in the response.Frontend (
ProviderUtilizationTab): parse theprovider:connectionIdkey, look upconnectionMeta, and display:getAccountDisplayName())antigravity · account cd11b4b9…ProviderIconnow receives only the provider portion of the key, not the full compound string.Files changed
src/shared/types/utilization.ts— addConnectionMetaEntryinterface andconnectionMetafield toProviderUtilizationResponsesrc/app/api/usage/utilization/route.ts— build and includeconnectionMetawhenaggregateBy=connectionsrc/app/(dashboard)/dashboard/analytics/ProviderUtilizationTab.tsx— parse compound key, resolve display name, update card title/subtitleTest plan
<provider> · account <8-char UUID>…connectionMetais undefined, code path skipped)