CommandCodeAI / CommandCodeAI/command-code
Dashboard usage records not updating — /internal/usage endpoint returns stale data
Nessuno ha ancora preso questa issue.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 4k
- Fork
- 350
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Describe the bug
The usage/billing history on the web dashboard (commandcode.ai) hasn't been updating. The /internal/usage API endpoint is returning stale data — the latest record is from July 2nd, even though new API calls have been made in the last 24+ hours.
Balance refresh still works fine, it's specifically the usage records endpoint that's stuck.
To Reproduce
- Make a new API call with
command-code - Go to commandcode.ai dashboard → usage history
- Latest API call not listed
- Or directly:
curl 'https://api.commandcode.ai/internal/usage?limit=5'with valid session cookie — observe latestcreatedAtis stuck at July 2nd, no newer records appear
Expected behavior
Usage records should appear within minutes of each API call.
Additional context
- Balance/credits refresh works normally
- The API returns HTTP 200 with data, but the data itself is stale
- This affects both the web dashboard and any third-party apps relying on this endpoint
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia individuando il gestore dell’endpoint /internal/usage e tracciando il modo in cui legge i record di utilizzo; confronta questo percorso con il percorso di aggiornamento del saldo, che funziona ancora. Riproduci la risposta obsoleta con la richiesta curl e verifica il completamento quando le nuove chiamate API compaiono nell’endpoint e nella dashboard entro pochi minuti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- api, backend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100