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 22, 12:00 UTC
fix(web): allow Antigravity installation while status loads (#23746)
Co-authored-by: GPT-6.1 Sol <noreply@openai.com>
Victor Vogel committed
Oct 30, 2026 at 15:58 UTC
6c703e1c94943fb4f495bac83162292bd3f9c5c4
2 files changed
+53
-16
apps/web/src/components/settings/ProviderSetupSection.browser.test.tsx
+35
@@ -181,6 +181,41 @@ function resetSetup() {
181
}
182
183
describe("Antigravity setup", () => {
184
+ it("can start installation before the first install snapshot arrives", async () => {
185
+ resetSetup();
186
+ setup.auth = authState({ phase: "idle", flowId: null, authorizationUrl: null });
187
+ const idleInstallation = setup.installation!;
188
+ setup.installation = null;
189
+ let resolveStart!: () => void;
190
+ const command = new Promise<{ _tag: "Success"; value: undefined }>((resolve) => {
191
+ resolveStart = () => resolve({ _tag: "Success", value: undefined });
192
+ });
193
+ setup.startInstall.mockReturnValueOnce(command);
194
+ await using screen = await renderSetup({ provider: { ...provider, installed: false } });
195
+
196
+ await screen.click("Install Antigravity");
197
+ await expect
198
+ .element(screen.getByRole("status").filter({ hasText: "Starting installation." }))
199
+ .toBeVisible();
200
+
201
+ setup.installation = {
202
+ ...idleInstallation,
203
+ operationId: "install-1",
204
+ phase: "downloading",
205
+ downloadedBytes: 1_000_000,
206
+ totalBytes: 2_000_000,
207
+ };
208
+ await publish();
209
+ await expect
210
+ .element(screen.getByRole("button", { name: "Cancel installation" }))
211
+ .toBeDisabled();
212
+ await act(async () => resolveStart());
213
+ await expect.element(screen.getByRole("button", { name: "Cancel installation" })).toBeEnabled();
214
+ await expect
215
+ .element(screen.getByRole("status").filter({ hasText: "Downloading 1.0 MB of 2.0 MB." }))
216
+ .toBeVisible();
217
+ });
218
+
219
it("waits for verified auth after submitting a callback to the selected environment", async () => {
220
resetSetup();
221
const callbackUrl = "http://127.0.0.1:5555/?state=test-only&code=test-only";
apps/web/src/components/settings/ProviderSetupSection.tsx
+18
-16
@@ -132,21 +132,23 @@ function ProviderSetupActions({
132
const queryError = authQuery.error ?? installQuery.error;
133
const actionsDisabled = pendingLabel !== null || queryError !== null;
134
const installationStatusMessage =
135
- installation?.phase === "downloading"
136
- ? `Downloading ${(installation.downloadedBytes / 1_000_000).toFixed(1)} MB${installation.totalBytes === null ? "" : ` of ${(installation.totalBytes / 1_000_000).toFixed(1)} MB`}.`
137
- : installation?.phase === "extracting"
138
- ? "Extracting Antigravity."
139
- : installation?.phase === "verifying"
140
- ? "Checking the downloaded runtime."
141
- : installed
142
- ? "Installed."
143
- : usesCustomBinary
144
- ? enabled
145
- ? "The configured Antigravity runtime is unavailable."
146
- : "The configured Antigravity runtime has not been checked."
147
- : installation?.totalBytes
148
- ? `${Math.ceil(installation.totalBytes / 1_000_000)} MB download.`
149
- : "Not installed.";
135
+ installation === null
136
+ ? "Checking the Antigravity runtime."
137
+ : installation?.phase === "downloading"
138
+ ? `Downloading ${(installation.downloadedBytes / 1_000_000).toFixed(1)} MB${installation.totalBytes === null ? "" : ` of ${(installation.totalBytes / 1_000_000).toFixed(1)} MB`}.`
139
+ : installation?.phase === "extracting"
140
+ ? "Extracting Antigravity."
141
+ : installation?.phase === "verifying"
142
+ ? "Checking the downloaded runtime."
143
+ : installed
144
+ ? "Installed."
145
+ : usesCustomBinary
146
+ ? enabled
147
+ ? "The configured Antigravity runtime is unavailable."
148
+ : "The configured Antigravity runtime has not been checked."
149
+ : installation?.totalBytes
150
+ ? `${Math.ceil(installation.totalBytes / 1_000_000)} MB download.`
151
+ : "Not installed.";
152
153
async function runCommand<A, E>(
154
label: string,
@@ -257,7 +259,7 @@ function ProviderSetupActions({
259
<Button
260
size="sm"
261
variant="outline"
260
- disabled={actionsDisabled || installation === null || authActive}
262
+ disabled={actionsDisabled || authActive}
263
onClick={() =>
264
void runCommand("Starting installation", () => startInstall(target))
265
}