@devries-cameron20 / t3code-1 / commits / 87c33c8990
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): Limits ChatGPT usage card names the connected accounts (#24940)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Victor Vogel committed Oct 30, 2026 at 16:09 UTC 87c33c89908fd9aa660bbb1f3d2c98a0bbff635a
2 files changed +68
apps/web/src/components/usage/UsageLimitsPooled.browser.test.tsx new
+65
@@ -0,0 +1,65 @@
1 +import {
2 + EnvironmentId,
3 + ProviderDriverKind,
4 + ProviderInstanceId,
5 + type ServerProvider,
6 +} from "@t3tools/contracts";
7 +import { CHATGPT_USAGE_URL } from "@t3tools/shared/usageLimits";
8 +import { describe, expect, it } from "vite-plus/test";
9 +
10 +import { render } from "../../../test/render";
11 +import { UsageLimitsPooled } from "./UsageLimitsPooled";
12 +
13 +const checkedAt = "2026-10-25T16:00:00.000Z";
14 +
15 +function managedChatGpt(instanceId: string, displayName: string): ServerProvider {
16 + return {
17 + instanceId: ProviderInstanceId.make(instanceId),
18 + driver: ProviderDriverKind.make("codex"),
19 + displayName,
20 + enabled: true,
21 + installed: true,
22 + version: "0.164.0",
23 + status: "ready",
24 + auth: { status: "authenticated" },
25 + checkedAt,
26 + models: [],
27 + slashCommands: [],
28 + skills: [],
29 + usageLimits: {
30 + checkedAt,
31 + windows: [],
32 + unavailable: { reason: "unsupported", message: "Track usage in ChatGPT." },
33 + externalUsage: { label: "ChatGPT usage", url: CHATGPT_USAGE_URL },
34 + },
35 + };
36 +}
37 +
38 +describe("UsageLimitsPooled ChatGPT usage card", () => {
39 + it("names the managed connections it covers", async () => {
40 + const presentations = new Map([
41 + [
42 + EnvironmentId.make("desk"),
43 + {
44 + entry: { target: { label: "Desk" } },
45 + serverConfig: {
46 + providers: [
47 + managedChatGpt("chatgpt_work", "ChatGPT Work"),
48 + managedChatGpt("chatgpt_personal", "ChatGPT Personal"),
49 + ],
50 + },
51 + },
52 + ],
53 + ]);
54 + await using screen = await render(
55 + <UsageLimitsPooled presentations={presentations} now={Date.parse(checkedAt)} />,
56 + );
57 +
58 + await expect
59 + .element(screen.getByText("ChatGPT Work on Desk, ChatGPT Personal on Desk"))
60 + .toBeVisible();
61 + await expect
62 + .element(screen.getByText("View usage in ChatGPT with your connected account."))
63 + .toBeVisible();
64 + });
65 +});
apps/web/src/components/usage/UsageLimitsPooled.tsx
+3
@@ -660,6 +660,9 @@ export function UsageLimitsPooled({
660 ) : null}
661 <div className="min-w-0 space-y-1">
662 <h2 className="text-sm font-medium">{link.label}</h2>
663 + <p className="text-xs break-words text-muted-foreground">
664 + {link.accounts.join(", ")}
665 + </p>
666 {link.url === CHATGPT_USAGE_URL ? (
667 <p className="text-xs text-muted-foreground">
668 View usage in ChatGPT with your connected account.