Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web,mobile): Limits shows why a provider's limits are unavailable #40481

Mergedseankd3(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/40481/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 33 additions and 2 deletions.

x
0 of 2 viewed, 2 left
24 additions and 0 deletionspackages/shared/src/usageLimits.test.tsModified
View file
@@ -1889,6 +1889,30 @@
expect(collectLimitNotices(presentations)).toEqual(["Host · codex: Could not read limits."]);
+ it("shows the reason an account's limits are unsupported, but not a bare unsupported", () => {
+ const unsupported = (message?: string) =>
+ provider({
+ usageLimits: {
+ checkedAt: "2026-09-03T11:00:00.000Z",
+ windows: [],
+ unavailable: { reason: "unsupported", ...(message ? { message } : {}) },
+ },
+ });
+ const notices = (limited: ServerProvider) =>
+ collectLimitNotices(
+ new Map([
+ [
+ EnvironmentId.make("a"),
+ { entry: { target: { label: "Host" } }, serverConfig: { providers: [limited] } },
+ ],
+ ]),
+ );
+ expect(notices(unsupported("Sign in with Google to see Antigravity limits."))).toEqual([
+ "codex: Sign in with Google to see Antigravity limits.",
+ ]);
+ expect(notices(unsupported())).toEqual([]);
+ });
+​
it("names a hub account whose read failed unless another environment read it", () => {
const checkedAt = "2026-09-03T11:00:00.000Z";