Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(usage): keep subscription limits visible across failed refreshes #22218

Closedmatthias-scale(GitHub profile, opens in a new tab)wants to merge 10 commits intomain fromrefs/pull/22218/headopened View on GitHub

Showing 8 changed files with 66 additions and 2 deletions (loading 6).

x
0 of 8 viewed, 8 left
63 additions and 0 deletionsapps/mobile/src/widgets/subscriptionUsageSnapshot.test.tsModified
View file
@@ -9,6 +9,7 @@
import {
buildSubscriptionUsageSnapshot,
createWidgetRefresher,
+ subscriptionUsageTimeline,
WIDGET_REFRESH_INTERVAL,
} from "./subscriptionUsageSnapshot";
​
@@ -133,6 +134,68 @@
expect(snapshot.providers[0]?.detail).toBe("Subscription remaining");
expect(snapshot.providers[0]?.windows[0]?.remaining).toBe(20);
});
+ it.each(["codex", "claudeAgent"])(
+ "excludes failed hub readings from healthy %s quota, account count, and expiry",
+ (driver) => {
+ const input = new Map([
+ [
+ EnvironmentId.make("env"),
+ {
+ entry: { target: { label: "Remote" } },
+ serverConfig: {
+ providers: [provider({ driver: ProviderDriverKind.make(driver) })],
+ usageLimitSources: [
+ {
+ id: UsageLimitSourceId.make("hub"),
+ kind: "cliproxy" as const,
+ label: "Hub",
+ checkedAt,
+ accounts: [