Skip to content

fix(desktop): align Usage Statistics counts with Daily Review #3695

Description

@liuxiaocs7

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.
Image Image

How to reproduce

  1. Use Maka across the legacy-to-canonical usage accounting cutover so the selected time range contains both legacy and canonical model calls.
  2. Produce multiple tool calls.
  3. Open Settings → Usage Statistics and enable detailed records.
  4. Compare the summary count and activity row count with Daily Review for the same time range.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions