GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): thread details show a linked environment's fresher usage for the same account by K1erans · Pull Request #41082 · pingdotgg/t3code

Conversation

@K1erans

@K1erans K1erans commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Problem

With two linked environments signed in to the same account, the thread details usage bars can disagree depending on which machine the thread runs on. I'm signed in to the same Google account for Antigravity on my Mac and on a Linux laptop, and both run 0.1.12-nightly.20261121.5051. At the same moment, a Mac thread showed Gemini 5-hour 69% / Weekly 90% remaining, and a Linux thread showed 92% / 97%. About 45 minutes later, the Linux thread still showed 92% / 97% while an Antigravity turn on the Linux laptop failed with "Individual quota reached … Resets in 2h58m39s". Nothing in the UI shows that one of the readings is stale.

/usage-limits already merges same-account readings across environments (collectProviderUsageLimits with accountKeyResolver). ThreadDetailsUsage only reads the provider snapshot from the thread's own environment, so a stale or failed reading on that machine is shown even when a linked environment has a fresher reading of the same account.

Change

  • packages/shared/src/usageLimits.ts: pulls the "readable beats unreadable, then newer checkedAt wins" rule out of collectProviderUsageLimits into fresherLimits, and adds accountUsageLimits(provider, own, peers). It returns the freshest readable limits that any enabled, same-driver, same-account (accountKeyResolver) provider reports across environments. It returns the provider's own reading when the provider is disabled, routed through a custom endpoint (auth.endpoint), or reports unsupported. Endpoint-routed peers are never borrowed.
  • ThreadDetailsUsage.logic.ts: resolveThreadDetailsLimits takes the peer providers and uses accountUsageLimits for the instance's own limits. Hub pooling is unchanged.
  • ThreadDetailsUsage.tsx: reads the providers of the other environments from environmentPresentations.presentationsWithProvidersAtom, the same source /usage-limits uses.

No contract, server or provider changes.

Scope

A bug fix. Linked environments on one account show conflicting usage for the same account in thread details, while /usage-limits merges them correctly. The fix is small and provider-agnostic: it keys on credentialFingerprint / email / workspace through the existing accountKeyResolver. It does not touch the Antigravity server-side refresh issues already covered by #39544, #40474, #39740 and #34389. It is separate from #39752 and #39793: endpoint- and hub-routed instances keep their current behaviour here.

Known limits, which are intended:

  • If the local provider has no account key (usageLimits missing, or a probeFailed reading with no credentialFingerprint and no auth.email, as Antigravity reports before fix(server): Antigravity shows the signed-in Google account email #38097), there is nothing to match peers on, so thread details keep showing the local reading.
  • The /usage-limits banner stays local-only.

Verification

  • Tests. The new accountUsageLimits cases in usageLimits.test.ts fail on main (accountUsageLimits is not a function) and pass on this branch (usageLimits.test.ts + ThreadDetailsUsage.logic.test.ts: 113 passed; check:changed green). They are the only layer tested: the component and resolveThreadDetailsLimits only pass the linked environments' providers through. The cases cover same-fingerprint peers for codex, claudeAgent and antigravity; email and workspace keys; a readable peer replacing a probeFailed own reading; and disabled, different-account, endpoint-routed and unsupported providers, which never borrow.

  • Real app, before (official nightly on both machines, same account, readings disagree):

    Thread on the Mac Thread on the Linux laptop
    Mac thread details: Gemini 5-hour 69%, Weekly 90% Linux thread details: Gemini 5-hour 92%, Weekly 97%

    About 45 minutes later, an Antigravity turn on the Linux laptop failed with this error while its thread details still showed 92% / 97%:

    Individual quota reached. Please upgrade your subscription to increase your limits. Resets in 2h58m39s.

    Later the same night the two readings disagreed again, this time the other way round. Both screenshots are from the desktop app on the Mac, 18 seconds apart (23:57:15 and 23:57:33). A thread on the Linux laptop showed Gemini 5-hour 0% / Weekly 71%, and a thread on the Mac showed 100% / 100% for the same Google account. As before, nothing in thread details shows which reading is current.

    Thread on the Linux laptop (TsMint), 23:57:15 Thread on the Mac, 23:57:33
    23:57:15, TsMint thread details: Gemini 5-hour 0%, Weekly 71% 23:57:33, MacBook Air thread details: Gemini 5-hour 100%, Weekly 100%

Implementation by Claude Sonnet 5.5 and Gemini 4 Neon in T3 Code; reviewed by Claude Fable 5.2 and Gemini 4 Neon.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
K1erans and others added 3 commits November 22, 2026 21:18
@K1erans @claude
test(usage): add failing tests for cross-environment thread details l…
9dae06f
…imits

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@K1erans @claude
fix(web): show freshest cross-environment usage limits in thread details
28cd17d
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@K1erans
fix(usage): guard hub-routed instances, filter unavailable peers, and…
b4cb3d2
… isolate browser test
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 22, 2026
@K1erans @claude
test(web): drop thread details tests the shared unit tests already cover
8c375ca
The browser test mocked the presentations atom and the logic test passed on
main; accountUsageLimits in usageLimits.test.ts covers both cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds account-level usage-limit selection across provider environments. It compares readable limits for matching native accounts, reuses the freshness comparison for native usage snapshots, and passes peer providers from environment presentations into thread usage resolution. Tests cover selection cases and rendered thread usage.

Changes: Cross-Environment Usage Limits

Layer / File(s) Summary
Account usage selection
packages/shared/src/usageLimits.ts, packages/shared/src/usageLimits.test.ts
Adds accountUsageLimits to select the freshest readable limits for a matching native account. Native usage snapshot selection now uses the same freshness comparison; reset-credit selection is unchanged. Tests cover account matching, freshness, and excluded peers.
Thread usage integration
apps/web/src/components/chat/ThreadDetailsUsage.tsx, apps/web/src/components/chat/ThreadDetailsUsage.logic.ts, apps/web/src/components/chat/ThreadDetailsUsage.logic.test.ts, apps/web/src/components/chat/ThreadDetailsUsage.browser.test.tsx
Thread details passes providers from environment presentations to usage resolution. The resolver applies account-level selection in its no-notice or no-hub path. Tests cover failed local readings and rendered usage from a fresher linked reading.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant environmentPresentations
  participant ThreadDetailsUsage
  participant resolveThreadDetailsLimits
  participant accountUsageLimits
  ThreadDetailsUsage->>environmentPresentations: Read provider presentations
  environmentPresentations-->>ThreadDetailsUsage: Return peer providers
  ThreadDetailsUsage->>resolveThreadDetailsLimits: Pass peer providers
  resolveThreadDetailsLimits->>accountUsageLimits: Select account usage limits
  accountUsageLimits-->>resolveThreadDetailsLimits: Return selected limits
  resolveThreadDetailsLimits-->>ThreadDetailsUsage: Return resolved limits
Loading

Possibly related issues

  • pingdotgg/t3code#36297 — The change updates the thread usage selection path, but the provided summaries do not establish that it handles the reported case where no account matches the thread’s instance ID.

Suggested reviewers: bil0000, maria-rcks

Merge Risk: Minimal · up to b4cb3

Thread details now show the freshest readable usage reading for the same account across linked environments. Behavior is unchanged for disabled, endpoint-routed and unsupported providers. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: thread details now show a linked environment's fresher usage reading for the same account. It follows the conventional commit format and the changeset (ThreadDetailsUs…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the template's main sections (Problem, Change, Scope, Verification) and explains the bug, the fix, the scope boundaries, and the test evidence. It names the affected files and …
Full details: Title check

Explanation

The title names the main change: thread details now show a linked environment's fresher usage reading for the same account. It follows the conventional commit format and the changeset (ThreadDetailsUsage, accountUsageLimits) matches it. It is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description follows the template's main sections (Problem, Change, Scope, Verification) and explains the bug, the fix, the scope boundaries, and the test evidence. It names the affected files and states what stays unchanged. The Verification section reports focused test results and before-state screenshots. It has gaps: the after-state real-app result is not shown, and the PR reports a later mismatch in the other direction without a resolution. The author also reports test counts that differ from the PR objectives (113 passed versus 115 passed, and a browser test file that the description does not mention). The description also does not state which conventional commit title is used. Overall the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: dd19bce
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 260ec4b4-71e1-492f-8dc8-8db4a70f8d63
Commits

Reviewing files that changed from the base of the PR and between dd19bce and b4cb3d2.

Files selected for processing: 6

  • apps/web/src/components/chat/ThreadDetailsUsage.browser.test.tsx
  • apps/web/src/components/chat/ThreadDetailsUsage.logic.test.ts
  • apps/web/src/components/chat/ThreadDetailsUsage.logic.ts
  • apps/web/src/components/chat/ThreadDetailsUsage.tsx
  • packages/shared/src/usageLimits.test.ts
  • packages/shared/src/usageLimits.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@K1erans

K1erans commented Nov 22, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge mentioned this pull request Nov 23, 2026
[Bug]: Thread details usage limits can show a stale per-instance snapshot while Usage → Limits shows the freshest reading for the same Claude login #41589
Closed
2 tasks done
@K1erans

K1erans commented Nov 23, 2026

Copy link
Copy Markdown
Author

If anyone else has this issue an easy way to fix it is to click into your usage limits from the popover.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.

See the conflict window.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 26, 2026
@K1erans K1erans closed this by deleting the head repository Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@K1erans
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.