Repository navigation
Usage: fold linked-machine accounts into the original usage bars (#1553) - #1558
Conversation
ad2accc to
643f206
Compare
|
lens: code · reviewer: GPT-6.2 Sol (high) · read at: 643f206 State check. An empty or unlinked answer leaves the original bars intact. A kept remote-only reading past 30 minutes becomes a notice, and an empty window list cannot create a remote bar. Equal comparable timestamps keep the first reading. A refresh split between direct config and fleet cache exposes the account-switch and reset-credit failures above. The four announced seam lines match the pooled component, and the rest of the seam manifest matches the base. A capacity-gated source check reproduced the login switch, skew, credit selection and missing note using the merge and upstream collector. Extend the existing merge tests with table rows for those cases. Keep the browser coverage for removing the card and the live age transition. The pure no-op test already covers the unlinked merge. |
…, and unknown machines
|
Fix round 1 at
Verification:
|
|
lens: code · reviewer: GPT-6.2 Sol (high) · read at: 69781ab round 1, fixed: The host/driver one-candidate fallback is gone. Different reported logins and explicitly different workspaces stay separate, and the shared base can bridge the single-workspace case. State check. With no linked answer, the merge returns the original bars. Cached rereads age known windows, and a failed refresh keeps aging the last answer until a remote-only row becomes a notice. An empty window list cannot create a remote bar. If direct config refreshes before the fleet cache, identity-less slot matches can still overlay a prior login, and two direct hosts with skewed clocks can disagree about which reading the note and bar represent. Older answers without the optional base still decode. A capacity-gated source check reproduced the three open findings. Extend the existing merge cases with an invalid peer timestamp, two skewed direct hosts and a cached slot without a stable login. Keep the existing browser coverage for removing the separate card and aging a kept reading. |
…tching, and empty-hub notices
|
Fix round 2 at
Verified failing-first tests for all four cases before fixing, then passed |
Closes #1553. Stacked on #1557 (which announces the 4 seam lines added to
apps/web/src/components/usage/UsageLimitsPooled.tsx); merge #1557 first, then update this branch frommain.What the owner sees
Read on <machine>, 3 min ago). Unreachable or stale (>30 min) remote-only accounts never show bars or stale numbers; their reason appears in upstream's limit notices instead. With no linked machines, the tab renders identically to upstream.How it works
apps/web/src/components/fork/fleetUsage/fleetUsage.logic.ts(mergeFleetPresentations) folds the agedfork.fleetUsageanswer into upstream'sLimitPresentations(matching direct native and hub accounts by the server's snapshot key, with a safe 1-to-1 per-host/driver fallback for workspace-less vs workspace-ful reports, and attaching linked machines to shared accounts so the popover's "Signed in" list covers every machine). Respects environment and provider filters and keepsasLimitAccountsintact for the work panel.apps/web/src/components/fork/fleetUsage/ForkFleetUsage.tsxexposesuseFleetUsageandReadingNotes, replacing the separate card.apps/web/src/components/usage/UsageLimitsPooled.tsxdrops the 2 old separate-card seam lines and adds the 4 announced merge/notes seam lines. No other upstream files are modified.General vs project
General: T3 fork UI change for linked-machine usage presentation, keeping the #1153 data plumbing as-is and containing no project-specific facts.
Verification
vp fmtandvp lintclean on all 6 changed TS/TSX files (0 warnings, 0 errors).vp run @t3tools/web#typecheck(effect-tsgo) passes with 0 errors.apps/web/src/components/fork/fleetUsage/fleetUsage.logic.test.ts(5/5)apps/web/src/components/fork/fleetUsage/ForkFleetUsage.browser.test.tsx(3/3)apps/web/src/components/usage/UsageLimitsPooled.browser.test.tsx(2/2)fork-seam-check.cjs --no-upstream --config-ref fix/usage-one-fleet-list-seam,fork-seam-check.test.cjs("every listed seam line is in its file"),fork-schema-check.cjs, andfork-test-names-check.cjsall pass.