CommandCodeAI / CommandCodeAI/command-code

Dashboard usage records not updating — /internal/usage endpoint returns stale data

未關閉
#546 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
沒有語言資料
星號
4k
分支
350
PR 合併指標
30 天內沒有已合併 PR

描述

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

  1. Make a new API call with command-code
  2. Go to commandcode.ai dashboard → usage history
  3. Latest API call not listed
  4. Or directly: curl 'https://api.commandcode.ai/internal/usage?limit=5' with valid session cookie — observe latest createdAt is 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

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先定位 /internal/usage 端點處理程式,並追蹤它讀取使用量記錄的方式;將該路徑與仍正常運作的餘額重新整理路徑進行比較。使用 curl 請求重現過時的回應,並在新的 API 呼叫於幾分鐘內出現在端點和儀表板中時確認完成。

由索引模型根據 Issue 內容生成。

評估

領域
api, backend
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。