Skip to content

fix(usage): offline machines go quiet; not-applicable rows fold into one closed line - #103

Merged
nullStack65 merged 3 commits into
release/native-0.1.10from
fix/native-0.1.10-usage-offline-collapse
Nov 19, 2026
Merged

nullStack65 merged 3 commits into
release/native-0.1.10from
fix/native-0.1.10-usage-offline-collapse

Conversation

@nullStack65

@nullStack65 nullStack65 commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Kameron's Usage → Limits panel (All environments) still showed errors from a stopped machine and a long, repeated "Not applicable" list after #90.

Cause

presentationsWithProvidersAtom includes 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

  1. splitLimitPresentations (shared): only connected environments feed bars, notices and links. Any other phase becomes one quiet line, <name>: offline since <time>, where the time is the newest checkedAt in its last config. An environment still on its first connect shows nothing. Web and mobile both use it.
  2. Not-applicable usage is one <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.
  3. A Magpie "Payment Required" is a billing state that needs a person, not "no quota here". It is shown once (not per machine) as a notice and no longer sits in the not-applicable list.

No server or contract change.

Verification

  • packages/shared usageLimits.test.ts: 98 passed, including the new split, grouping and billing cases.
  • apps/web UsageLimitsPooled.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.
  • Bot review fixes (fb396ee9): mobile drops a refresh failure once its machine is no longer connected.
  • Typecheck clean for shared, web and mobile; vp lint and vp fmt clean on the changed files.

Deploy: fleet

🤖 Generated with Claude Code

nullStack65 and others added 2 commits November 19, 2026 17:30
…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>
@nullStack65

Copy link
Copy Markdown
Owner Author

Bot review (Claude Fable 5.2, the single review round for this PR) of head 91c65e32. Verdict: approve with nits.

Fixed in fb396ee9:

  1. Mobile kept a dropped machine's last refresh failure ("… could not refresh limits") next to its offline line. Failures now count only for connected machines.
  2. Web dropped machine names when only one of several machines in view had a not-applicable instance. Names now show whenever more than one machine is in view, with a browser test for it.

Checked, no change needed:
3. The billing check relies on the server's shortened message. Magpie's real error is Payment Required, and magpieQuotas.test.ts already covers that exact string.

Kept as stated tradeoffs:
4. Every phase other than connected and connecting reads as offline, and "since" is the last check time.
5. A brief connecting retry hides a machine until the attempt fails.
6. The summary counts one instance per machine, so "3 instances" can open to one grouped row.
7. The ChatGPT usage link and the widgets still read unsplit presentations. They show no errors, so they are out of scope here.

Tests: shared 98/98, web browser 4/4, typecheck and lint clean on web and mobile.

🤖 Generated with Claude Code

@nullStack65
nullStack65 merged commit 1a634c5 into release/native-0.1.10 Nov 19, 2026
3 checks passed
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.

1 participant