Skip to content

gut(infra): remove provider-usage dashboard (#2306)#2327

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/2306-provider-usage-dashboard
Apr 12, 2026
Merged

gut(infra): remove provider-usage dashboard (#2306)#2327
alexey-pelykh merged 1 commit intomainfrom
gut/2306-provider-usage-dashboard

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Closes #2306

Summary

Delete the upstream consumer-focused provider quota dashboard (~3,450 LOC across 26 files). It fetches LLM provider rate-limit endpoints from Anthropic, Google, OpenAI, Codex, Copilot, MiniMax, and Zai — classic "how much of my API quota have I used?" consumer dashboard UX that's orthogonal to RemoteClaw's middleware mission.

Found during the MBP deep-dive audit of src/infra/.

Changes

Deleted (26 files, ~3,450 LOC)

  • src/infra/provider-usage.ts + 13 related source files (auth, fetch barrel + 6 provider fetchers, shared, types, format, load)
  • 11 corresponding *.test.ts files
  • src/test-utils/provider-usage-fetch.ts (test helper only used by deleted tests)

Gateway cleanup

CLI cleanup

  • remoteclaw status: removed --usage flag + fetch/render blocks (also from src/cli/program/routes.ts fast-path)
  • remoteclaw channels list: removed --no-usage flag + fetch/render blocks

Status pipelines

  • src/agents/tools/session-status-tool.ts: removed provider-usage lookup block + usageLine param
  • src/auto-reply/reply/commands-status.ts: removed provider-usage lookup block + usageLine param (kept provider in params signature as _providergut: remove session cost analytics (MBP audit) #2307 may still need it)
  • Test harness + fixture coverage removed from trigger-handling tests

Other

  • Updated src/agents/auth-profiles/oauth.ts JSDoc to drop stale reference
  • Regenerated .secrets.baseline entries for deleted test file

Acceptance Criteria

  • grep -r \"provider-usage\" src/ returns nothing
  • usage.status gateway method removed; --usage status flag gone
  • Build passes (pnpm build)
  • Tests pass (pnpm test: 6434 passed, 2 skipped)
  • Full check passes (pnpm check: format + typecheck + lint clean)

Known Out-of-Scope Follow-ups

  • apps/macos/Sources/RemoteClaw/UsageData.swift still calls the usage.status gateway method and will receive "unknown method" at runtime until the macOS menu UI is gutted in a follow-up. Node build/tests are unaffected.
  • apps/macos/Sources/RemoteClaw/UsageMenuLabelView.swift, MenuSessionsInjector.swift, and related Swift UI code reference provider-usage — separate macOS gut task.
  • Docs mentioning --usage / --no-usage / provider-usage snapshots — separate doc PR.

Shared-File Coordination Note

Three files (status.command.ts, session-status-tool.ts, commands-status.ts) will also be touched by #2307 (session cost removal). Edits here were deliberately minimal — removed only the provider-usage imports, fetch blocks, and optional usageLine parameter propagation.

Test plan

  • pnpm check (format + typecheck + lint)
  • pnpm test (full suite)
  • pnpm build

Delete the upstream consumer-focused provider quota dashboard
(~3,450 LOC across 26 files) — it fetches LLM provider rate-limit
endpoints from Anthropic, Google, OpenAI, Codex, Copilot, MiniMax,
and Zai, which is orthogonal to RemoteClaw's middleware mission.

Removed:
- src/infra/provider-usage.* (14 source + 11 test files)
- src/test-utils/provider-usage-fetch.ts
- usage.status gateway RPC method + scope/list entries
- --usage flag on `remoteclaw status`
- --no-usage flag on `remoteclaw channels list`
- provider-usage lookup blocks in status/session-status pipelines
- test harness and fixture coverage for provider-usage

Note: apps/macos/UsageData.swift still calls `usage.status`; it will
receive "unknown method" at runtime until the macOS menu UI is gutted
in a follow-up. Node build/tests unaffected.
@alexey-pelykh alexey-pelykh merged commit 2fa22c8 into main Apr 12, 2026
10 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/2306-provider-usage-dashboard branch April 12, 2026 23:17
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.

gut: remove provider-usage dashboard (MBP audit)

1 participant