Skip to content

Commit e2b58e2

Browse files
t3dotggclaude
andcommitted
fix(web): usage readout matches the thread's instance only
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 8b76934 commit e2b58e2

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎apps/web/src/components/chat/ThreadDetailsUsage.tsx‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,8 @@ export function ThreadDetailsUsage({
5151
providerInstanceId !== null
5252
? collectProviderUsageLimits(providerInstanceId, providers, sources, now)
5353
: null;
54-
// The report spans every account of the driver and keeps one instance per login, so match the
55-
// thread's instance or, when deduplicated, its sign-in. Never show another login's quota.
56-
const email = providers.find((provider) => provider.instanceId === providerInstanceId)?.auth
57-
.email;
58-
const account =
59-
report?.accounts.find((entry) => entry.instanceId === providerInstanceId) ??
60-
(email ? report?.accounts.find((entry) => entry.email === email) : undefined);
54+
// Match the thread's own instance only; any other entry may be a different login or workspace.
55+
const account = report?.accounts.find((entry) => entry.instanceId === providerInstanceId);
6156
const notice = account ? limitsNotice(account.limits) : null;
6257
if (!account && !contextWindow) return null;
6358

0 commit comments

Comments
 (0)