Skip to content

fix(desktop): align usage activity with model calls - #3697

Open
liuxiaocs7 wants to merge 2 commits into
apache:mainfrom
liuxiaocs7:fix/align-usage-request-counts
Open

fix(desktop): align usage activity with model calls#3697
liuxiaocs7 wants to merge 2 commits into
apache:mainfrom
liuxiaocs7:fix/align-usage-request-counts

Conversation

@liuxiaocs7

Copy link
Copy Markdown
Member

Summary

  • source Usage Statistics from the selected Runtime Host's canonical Usage authority, matching Daily Review's model-call accounting
  • label the combined model/tool table as an activity log and preserve aborted or unknown fields
  • load every model and tool activity page and discard stale results when the selected Host or range changes
  • seed canonical Usage records for the Desktop fixture and add regression coverage for the 151 model calls + 171 tool calls case

Fixes #3695
Refs #2128

Verification

  • node --test apps/desktop/dist/main/__tests__/runtime-host-usage-ipc-main.test.js apps/desktop/dist/main/__tests__/desktop-session-projection.test.js apps/desktop/dist/main/__tests__/settings-resource-state.test.js apps/desktop/dist/main/__tests__/runtime-host-settings-generation.test.js — 28 passed
  • npm --workspace @maka/desktop run typecheck — passed
  • npx biome check <16 changed files> — passed
  • npm --workspace @maka/desktop run build:renderer — passed
  • npm --workspace @maka/desktop run build-storybook — passed
  • node scripts/asf-license-headers.mjs check — the changed files pass; the repository-wide command reports only pre-existing untracked docs/contribution/ files, which are not part of this PR

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex diagnosed the divergent Usage data paths, implemented the Runtime Host adapter and UI/type updates, resolved the rebase conflict, and added regression tests and fixture coverage.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Read usage summary and activity from the Runtime Host canonical usage authority so Usage Statistics and Daily Review share the same model-call count. Keep tool calls visible as separately labelled activity and page both sources completely.

Generated-by: OpenAI Codex
@liuxiaocs7
liuxiaocs7 force-pushed the fix/align-usage-request-counts branch from 430058a to 0395ff9 Compare August 24, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant