You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: serve /usage rows should include pace, like usage --json and macOS serve /usage #1057
I searched existing issues and did not find a duplicate.
Problem or use case
codexbar serve answers /usage with rows that carry only provider, source, usage and cost. They never carry the pace object, although:
Win-CodexBar's own codexbar usage --json adds it (rust/src/cli/usage/render.rs, json_result["pace"]), and
macOS CodexBar's codexbar serve/usage includes it (checked against 0.82.0: CLIServeCommand.swift → serveUsageOutput → the same ProviderPayload.pace as usage --json).
So a script or app that polls serve cannot read the reserve/deficit the tray panel shows (stage, delta, expected used percent, "lasts until reset"), even though the data is already computed for usage --json. The only ways around it are to run a separate usage --json per provider and refresh, or to recompute pace from the raw windows and drift from the app's own rules (provider pace capability, weekly work days).
Checked against v0.70.0 and main (1d3c130): rust/src/cli/serve/data.rsfetch_usage_row builds the row from the four keys above, and grep -i pace rust/src/cli/serve finds only the dashboard snapshot, where pace exists only per entry of accounts (--all-accounts), not on the provider row.
Related: #640 (CLI parity with macOS), #953 (serve --all-accounts), #939 (HTTP server in Settings).
Proposed solution
Add the same optional pace key to each successful /usage row, built with the helper usage --json already uses (lane_pace / pace_json, honoring weekly_progress_work_days):
Activity