Repository navigation
Closed
Labels
Description
What happened
Settings → Usage Statistics showed three numbers that looked contradictory for the same period:
- the activity log contained 181 rows;
- the summary showed 10 requests;
- Daily Review showed 151 requests.
The labels made these values look comparable even though they came from different data sources and represented different things.
The legacy Settings projection counted only persisted token_usage messages for its summary, while the log mixed those model rows with tool calls. Daily Review queried the Runtime Host canonical usage authority, including both legacy and canonical model-call records.
In the reported data:
- 151 was the canonical model-call total;
- 171 rows were tool calls;
- the activity stream should therefore contain 322 rows after both sources are loaded completely.
How to reproduce
- Use Maka across the legacy-to-canonical usage accounting cutover so the selected time range contains both legacy and canonical model calls.
- Produce multiple tool calls.
- Open Settings → Usage Statistics and enable detailed records.
- Compare the summary count and activity row count with Daily Review for the same time range.
- Observe that the Usage summary, mixed log, and Daily Review appear to disagree.
Expected behavior
- Usage Statistics and Daily Review use the same Runtime Host authority and time range for the model-call total.
- Model calls and tool calls are labelled separately.
- The mixed table is described as an activity log rather than a request count.
- All activity pages are loaded, including records beyond the first page.
- Switching Runtime Hosts cannot display stale usage from the previously selected Host.
- Aborted activity and unknown session or cost fields remain explicit.
Environment
- Maka commit:
aed0a65d3 - OS: macOS
- Surface: Desktop
- Node.js: repository-supported toolchain
Additional context
Related to #2128, which tracks missing canonical attempts and incorrect interrupted-tool status in the legacy Usage projection. This issue captures the concrete cross-surface count mismatch and ambiguous activity-log labeling.
Activity
testikun commentedon Aug 25, 2026
I would like to work on this issue.
Proposed approach
token_usageprojection.中文摘要
我计划让 Desktop 的“使用统计”直接读取当前选中 Runtime Host 的统一用量权威,复用已有的 legacy + canonical 合并逻辑,确保它与 Daily Review 使用同一时间范围和数据口径;同时保留现有界面,补齐分页加载、Host 切换防旧数据回写,以及中止/未知字段的回归测试。不会改动 Runtime Host 的权限或定价语义。
testikun commentedon Aug 25, 2026
Implemented in PR #3761.
Result
Verification
中文摘要
修复已提交到 PR #3761:使用统计现在复用 Daily Review 的 Runtime Host 统一用量口径,补齐分页、Host 切换、未知会话/费用和中止工具调用处理;没有改动 Runtime Host 权威或定价语义。
liuxiaocs7 commentedon Aug 25, 2026
Hi, @testikun, there is already a PR(#3697) to fix this issue, thanks!