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

Abierto Apto para principiantes
#40,678 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend

Línea de trabajo

Empieza en apps/server/src/usage/cliproxyApi.ts alrededor de las líneas 387-399, donde el lector de hub antigravity en la rama onSome descarta listedIdentity(account) y por tanto pierde email. Lee cómo collectLimitAccounts en packages/shared/src/usageLimits.ts recurre a hubAccountName(account) cuando email está ausente, y comprueba si ha aterrizado el puente accountKeyResolver del PR #38097, ya que la corrección depende de él. Luego devuelve ...listedIdentity(account) en la rama onSome y actualiza la expectativa en apps/server/src/usage/cliproxyApi.test.ts:548; hecho significa que esa prueba pasa y que las cuentas de hub de Antigravity muestran insignias de iniciales mientras siguen deduplicando contra inicios de sesión locales.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
24.8k
Forks
6.4k
Merge medio
2 h 18 min
PR fusionados (30 d)
448

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pingdotgg/t3code

Todos los issues de pingdotgg/t3code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.