Skip to content

feat(desktop): show paired machines' usage on this computer - #4055

Merged
LHagfoss merged 1 commit into
mainfrom
feat/desktop-remote-usage-sync
Nov 19, 2026
Merged

LHagfoss merged 1 commit into
mainfrom
feat/desktop-remote-usage-sync

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

Usage from threads run on a VPS or another paired machine never showed on the Mac that drives them:

  • Plan %: the Mac reads only its own sign-ins and never refreshes a token, so a login nobody runs locally goes stale ("as of …").
  • Tokens and cost: Statistics read only the Mac's own data.sqlite.

Changes:

  • Engine: new _rustcode/usage/shared, the plans a paired computer may read (Codex login, plus Claude Code logins where no Keychain is involved). It never forces a read and never reads Antigravity.
  • Gateway: allows _rustcode/usage/shared and _rustcode/data/usage. _rustcode/data/query and the full _rustcode/usage/plans stay denied.
  • Settings › Usage: an "On " section per connected machine, refreshed on the 3-minute poll.
  • Statistics: a Machines choice (All machines / This computer / each machine), with "All machines" as the default. Reports are added per model, day or project. Threads keep their machine key, so remote threads link correctly.
  • An older paired engine, or one that refuses the call, is skipped silently.

Changelog

Settings › Usage and Statistics now include usage from paired machines, so work run on a server shows up on your Mac.

Testing

  • bun run check (new state/fleetUsage.test.ts)
  • cargo check --workspace --tests, cargo fmt --all -- --check
  • Gateway allowlist contract test and a shared_request unit test run in CI

Settings › Usage lists each connected machine's subscriptions (_rustcode/usage/shared, numbers only) and Statistics adds every connected machine's store under All machines. The gateway allows both reads; raw SQL and the full plans read stay denied.
@github-actions github-actions Bot added the feature New feature or request label Nov 19, 2026
@LHagfoss
LHagfoss merged commit f7ec3c7 into main Nov 19, 2026
10 checks passed
@LHagfoss
LHagfoss deleted the feat/desktop-remote-usage-sync branch November 19, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants