Repository navigation
fix(usage): offline machines go quiet; not-applicable rows fold into one closed line - #103
Conversation
…one closed line
The Limits view read every enabled environment's cached server config whatever
its connection phase, so a stopped machine (the old Crown Mac) kept showing the
errors it last reported. Only connected environments now contribute bars and
notices; a disconnected one is one line, "<name>: offline since <time>", from the
newest check in its last config. One still on its first connect says nothing.
Not-applicable usage is one closed summary ("15 instances have no quota to
read"); open, each instance and reason is one row naming its machines rather
than a row per machine.
A vendor "Payment Required" is a billing state that needs a person, not "no
quota here": it now shows once as a notice instead of in the not-applicable list.
Mobile's Limits section takes the same live/offline split.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e machine whenever several are in view From the bot review of this PR: mobile kept a dropped machine's last refresh failure in the warning box, and web hid machine names when only one machine had a not-applicable instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Bot review (Claude Fable 5.2, the single review round for this PR) of head Fixed in
Checked, no change needed: Kept as stated tradeoffs: Tests: shared 98/98, web browser 4/4, typecheck and lint clean on web and mobile. 🤖 Generated with Claude Code |
Kameron's Usage → Limits panel (All environments) still showed errors from a stopped machine and a long, repeated "Not applicable" list after #90.
Cause
presentationsWithProvidersAtomincludes every enabled environment with its last cached server config, whatever the connection phase. The Limits view pooled and warned from that cache, so the old Crown Mac — enabled in the laptop's connection catalog, T3 stopped for its wipe — kept repeating the errors it last reported ("Codex could not read usage (JSON-RPC -32600)", "OpenCode Go could not read usage").Change
splitLimitPresentations(shared): onlyconnectedenvironments feed bars, notices and links. Any other phase becomes one quiet line,<name>: offline since <time>, where the time is the newestcheckedAtin its last config. An environment still on its first connect shows nothing. Web and mobile both use it.<details>summary, closed by default: "15 instances have no quota to read". Open, each instance and reason is one row naming its machines (groupNotApplicable), not one row per machine.No server or contract change.
Verification
packages/sharedusageLimits.test.ts: 98 passed, including the new split, grouping and billing cases.apps/webUsageLimitsPooled.browser.test.tsx(chromium): 4 passed, covering the offline line with the stale error hidden, the summary being closed with one grouped row across three machines, and a lone not-applicable machine still being named when several are in view.fb396ee9): mobile drops a refresh failure once its machine is no longer connected.vp lintandvp fmtclean on the changed files.Deploy: fleet
🤖 Generated with Claude Code