The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 24, 11:30 UTC
fix(web): resume Antigravity threads without repeated sign-in (#9647)
Allow Antigravity threads to resume while saved Google sign-in is unchecked after a server restart. Keep confirmed authentication failures and installation errors visible. Validated with 136 focused tests, web typecheck, targeted lint, and CI. Browser verification was omitted at the maintainer's request. Created with GPT-6 Astra (preview) in Codex.
Theo Browne committed
Sep 4, 2026 at 04:25 UTC
d487dfbf46be344e818725be70ee04be2436bfb4
5 files changed
+76
-15
apps/web/src/components/ChatView.logic.test.ts
+11
-4
@@ -1,4 +1,5 @@
1
import {
2
+ ANTIGRAVITY_DEFAULT_MODEL,
3
CheckpointRef,
4
EnvironmentId,
5
MessageId,
@@ -793,14 +794,20 @@ describe("resolveComposerProviderSelection", () => {
794
);
795
});
796
796
- it("blocks sends until Antigravity confirms authentication", () => {
797
+ it("lets Antigravity check saved credentials when resuming after a restart", () => {
798
const provider = entry("antigravity", "google_work", {
799
+ status: "warning",
800
auth: { status: "unknown" },
799
- models: catalogModels,
801
+ models: [],
802
}).snapshot;
803
802
- expect(getAntigravitySendBlockReason(provider, "gemini-pro")).toBe(
803
- "Sign in to Antigravity in provider settings before sending.",
804
+ expect(getAntigravitySendBlockReason(provider, "gemini-pro")).toBeNull();
805
+ expect(getAntigravitySendBlockReason(provider, ANTIGRAVITY_DEFAULT_MODEL)).toBeNull();
806
+ expect(
807
+ getAntigravitySendBlockReason({ ...provider, models: catalogModels }, "gemini-pro"),
808
+ ).toBeNull();
809
+ expect(getAntigravitySendBlockReason(provider, "")).toBe(
810
+ "Choose an Antigravity model before sending.",
811
);
812
});
813
apps/web/src/components/ChatView.logic.ts
+6
-3
@@ -421,14 +421,17 @@ export function getAntigravitySendBlockReason(
421
if (!provider.installed) {
422
return "Install Antigravity in provider settings before sending.";
423
}
424
- if (provider.auth.status !== "authenticated") {
424
+ if (provider.auth.status === "unauthenticated") {
425
return "Sign in to Antigravity in provider settings before sending.";
426
}
427
+ const slug = model.trim();
428
+ if (slug.length === 0) return "Choose an Antigravity model before sending.";
429
+ // A restart clears the account status and catalog. Session startup checks
430
+ // saved credentials and validates the model before sending the prompt.
431
+ if (provider.auth.status === "unknown") return null;
432
if (provider.models.length === 0) {
433
return "Refresh Antigravity models in provider settings before sending.";
434
}
430
- const slug = model.trim();
431
- if (slug.length === 0) return "Choose an Antigravity model before sending.";
435
// A saved model that left the catalog is kept in the picker as unavailable
436
// so the user sees what the thread used. The server rejects it at turn
437
// start, so block here unless the provider is in an error state, where a
apps/web/src/components/chat/ProviderStatusBanner.test.tsx
+36
@@ -28,6 +28,42 @@ function warningProvider(): ServerProvider {
28
}
29
30
describe("ProviderStatusBanner", () => {
31
+ it("waits for an Antigravity auth result before showing a sign-in warning", () => {
32
+ const status: ServerProvider = {
33
+ ...warningProvider(),
34
+ instanceId: ProviderInstanceId.make("google_work"),
35
+ driver: ProviderDriverKind.make("antigravity"),
36
+ auth: { status: "unknown" },
37
+ message: "Antigravity is installed. Google account access is not checked yet.",
38
+ };
39
+
40
+ expect(shouldShowProviderStatusBanner(status, null)).toBe(false);
41
+ expect(
42
+ shouldShowProviderStatusBanner(
43
+ {
44
+ ...status,
45
+ auth: { status: "unauthenticated" },
46
+ message: "Sign in with Google to use Antigravity.",
47
+ },
48
+ null,
49
+ ),
50
+ ).toBe(true);
51
+ });
52
+
53
+ it("shows Antigravity installation and startup failures before auth is checked", () => {
54
+ const status: ServerProvider = {
55
+ ...warningProvider(),
56
+ driver: ProviderDriverKind.make("antigravity"),
57
+ auth: { status: "unknown" },
58
+ };
59
+
60
+ expect(shouldShowProviderStatusBanner({ ...status, installed: false }, null)).toBe(true);
61
+ expect(shouldShowProviderStatusBanner({ ...status, status: "error" }, null)).toBe(true);
62
+ expect(
63
+ shouldShowProviderStatusBanner({ ...status, driver: ProviderDriverKind.make("codex") }, null),
64
+ ).toBe(true);
65
+ });
66
+
67
it("stays hidden after its current warning is dismissed", () => {
68
const status = warningProvider();
69
apps/web/src/components/chat/ProviderStatusBanner.tsx
+15
-4
@@ -7,9 +7,20 @@ import { formatProviderDriverKindLabel } from "../../providerModels";
7
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
8
9
export function getProviderStatusBannerKey(status: ServerProvider | null): string | null {
10
- return !status || status.status === "ready" || status.status === "disabled"
11
- ? null
12
- : [status.instanceId, status.status, status.auth.status, status.message ?? ""].join("\u0000");
10
+ if (!status || status.status === "ready" || status.status === "disabled") return null;
11
+ // Antigravity checks saved credentials when a session starts. Its local
12
+ // health check leaves auth unknown after a restart, which is not a failure.
13
+ if (
14
+ status.driver === "antigravity" &&
15
+ status.installed &&
16
+ status.status === "warning" &&
17
+ status.auth.status === "unknown"
18
+ ) {
19
+ return null;
20
+ }
21
+ return [status.instanceId, status.status, status.auth.status, status.message ?? ""].join(
22
+ "\u0000",
23
+ );
24
}
25
26
export function shouldShowProviderStatusBanner(
@@ -59,7 +70,7 @@ export const ProviderStatusBanner = memo(function ProviderStatusBanner({
70
onOpenProviderSetup?: (instanceId: ProviderInstanceId) => void;
71
status: ServerProvider | null;
72
}) {
62
- if (!status || status.status === "ready" || status.status === "disabled") {
73
+ if (!status || getProviderStatusBannerKey(status) === null) {
74
return null;
75
}
76
docs/user/providers-antigravity.md
+8
-4
@@ -179,10 +179,14 @@ paid-plan tier or remaining subscription quota. See Google's [Antigravity plans]
179
[personal Google sign-in guide][google-setup].
180
181
After an environment restarts, Google sign-in can show as not checked until an authenticated
182
-session succeeds. To check account access and reload models, use **Refresh provider status**
183
-in web or desktop provider settings, or **Refresh models** in the mobile model picker. Refresh
184
-uses saved Google sign-in and does not open a login page. If sign-in is required, use the
185
-provider's setup controls. Automatic status checks verify the installation only.
182
+session succeeds. You can continue an existing thread. Antigravity checks saved Google sign-in
183
+when the session starts. An unchecked status does not require signing in again.
184
+
185
+To check account access and reload models on web or desktop, open **Settings** > **Providers**
186
+and select the circular arrow beside **Checked** at the top of the page. Its tooltip says
187
+**Refresh provider status**. On mobile, use **Refresh models** in the model picker.
188
+Refresh uses saved Google sign-in and does not open a login page. If sign-in is required,
189
+use the provider's setup controls. Automatic status checks verify the installation only.
190
191
The packaged runtime can be slow to start, especially on Windows. Health checks, model refresh,
192
and sign-out each allow up to 90 seconds before reporting a timeout.