[Bug]: Antigravity hub accounts show raw auth filenames instead of email initials badges in Usage → Limits

Ouverte Adaptée aux débutants
#40,678 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
70/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
typescript
Domaine
backend

Piste de recherche

Commence dans apps/server/src/usage/cliproxyApi.ts vers les lignes 387-399, où le lecteur de hub antigravity dans la branche onSome abandonne listedIdentity(account) et perd donc email. Lis comment collectLimitAccounts dans packages/shared/src/usageLimits.ts se rabat sur hubAccountName(account) lorsque email est absent, et vérifie si le pont accountKeyResolver de la PR #38097 a atterri, car le correctif en dépend. Ensuite, renvoie ...listedIdentity(account) dans la branche onSome et mets à jour l'attente à apps/server/src/usage/cliproxyApi.test.ts:548 ; terminé signifie que ce test passe et que les comptes hub Antigravity affichent des badges d'initiales tout en se dédupliquant par rapport aux connexions locales.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server, packages/contracts or packages/shared

Steps to reproduce
  1. Configure a CLIProxyAPI-compatible usage hub (Settings → Providers → Usage providers → Add hub) that holds two or more Antigravity accounts alongside Claude or Codex accounts, where GET /v0/management/auth-files returns "email" and "project_id" for every account (e.g. id: "[email protected]", email: "[email protected]", project_id: "...").
  2. Ensure Google's https://www.googleapis.com/oauth2/v2/userinfo call succeeds through POST /v0/management/api-call (the normal authenticated case).
  3. Open Usage → Limits.
Expected behavior

Antigravity hub accounts should render the same compact circular email-initials avatar badge (and show the toggleable account email in the hover popover) as Claude, Codex, and Grok hub accounts.

Actual behavior

Every Antigravity hub account bar renders the raw auth-file id (with .json stripped, e.g. [email protected]) as plain text with no circular initials avatar, and the hover popover has no avatar or account email row — even though GET /v0/management/auth-files provides email for those accounts.

Root cause

In apps/server/src/usage/cliproxyApi.ts (lines 387–399 on main @ f9b19a7f85), the antigravity hub reader drops ...listedIdentity(account) whenever userinfo succeeds (onSome):

// Local Antigravity reports no e-mail, so the Google account fingerprint is what pools the two.
const fingerprint = yield* call("https://www.googleapis.com/oauth2/v2/userinfo").pipe(
  Effect.flatMap(decodeJson),
  Effect.flatMap(antigravityAccountFingerprint),
  Effect.option,
);
const usageLimits = makeUsageLimits({ checkedAt, windows });
return Option.match(fingerprint, {
  onNone: () => ({ ...listedIdentity(account), usageLimits }),
  onSome: (credentialFingerprint) => ({
    usageLimits: { ...usageLimits, credentialFingerprint },
  }),
});

Because email is omitted on onSome:

  1. collectLimitAccounts (packages/shared/src/usageLimits.ts:430-431) falls back to displayName: account.email ? null : hubAccountName(account) (account.id.replace(/\.json$/i, "")) with email: undefined.
  2. The UsageLimits bar label renderer prefers displayName over email, so it prints the raw filename string instead of the circular initials badge.

Note on #38097: Open PR #38097 bridges driver:credential:<fingerprint> to driver:<email> in accountKeyResolver (packages/shared/src/usageLimits.ts) so local Antigravity instances with auth.email pool with hub accounts, but explicitly leaves cliproxyApi.ts unchanged (onSome still drops email). As a result, hub-only Antigravity accounts will still display raw auth filenames instead of email initials badges even after #38097 merges.

Suggested fix

Once accountKeyResolver bridges driver:credential:<fingerprint> ↔ driver:<email> when a report carries both (as in #38097), HUB_PROVIDERS.get("antigravity") in apps/server/src/usage/cliproxyApi.ts can return ...listedIdentity(account) in the onSome branch as well (and update apps/server/src/usage/cliproxyApi.test.ts:548). Hub Antigravity accounts will then keep email for initials badges and hover popovers while still deduplicating cleanly against local Antigravity logins that only report credentialFingerprint.

Impact

Minor bug or occasional failure

Version or commit

T3 Code 0.1.11 (main @ f9b19a7f85)

Environment

Windows / macOS desktop (T3 Code 0.1.11), CLIProxyAPI-compatible usage limit hub (t3code-proxy)

Workaround

None clean. Renaming auth files on the hub only shortens the raw plain-text filename shown in the bar; it does not restore the circular initials badge or popover email.

Langage dominant
TypeScript
Étoiles
24.8k
Forks
6.4k
Merge moyen
2 h 18 min
PR mergées (30 j)
448

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de pingdotgg/t3code

Toutes les issues de pingdotgg/t3code

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.