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 摘要。