TypeScript
fix(web): align provider settings with shared settings rows (#10571)
maria4d16e6bc6f0b
diff --git a/apps/web/src/components/settings/ProviderInstanceCard.tsx b/apps/web/src/components/settings/ProviderInstanceCard.tsxindex f1f1fe1a518..b1e4c646f87 100644--- a/apps/web/src/components/settings/ProviderInstanceCard.tsx+++ b/apps/web/src/components/settings/ProviderInstanceCard.tsx@@ -252,93 +252,98 @@ function ProviderEnvironmentSection(props: {]);return (- <div className="mt-3 min-w-0 space-y-2">- {rows.map((variable, index) => (- <div key={variable.id} className="flex min-w-0 items-center gap-1.5">- <DraftInput- size="sm"- className="w-44 shrink-0 font-mono"- value={variable.name}- onCommit={(name) => updateVariable(variable.id, { name: name.trim() })}- placeholder="VARIABLE_NAME"- spellCheck={false}- aria-label={`Environment variable name ${index + 1}`}- />- <span className="text-xs text-muted-foreground" aria-hidden>- =- </span>- <DraftInput- size="sm"- className="min-w-0 flex-1 font-mono"- value={variable.valueRedacted ? "" : variable.value}- onCommit={(value) => updateVariable(variable.id, { value })}- type={variable.sensitive ? "password" : undefined}- autoComplete="off"- placeholder={- variable.valueRedacted ? "Stored secret, enter a new value to replace" : "value"- }- spellCheck={false}- aria-label={`Environment variable value ${index + 1}`}- />- <Tooltip>- <TooltipTrigger- render={- <Button- type="button"- size="icon-micro"- variant="ghost-muted"- className={cn(- "[--control-icon-color:currentColor]",- variable.sensitive && "text-foreground",- )}- onClick={() => {- const sensitive = !variable.sensitive;- updateVariable(variable.id, {- sensitive,- ...(sensitive && variable.valueRedacted === undefined- ? {}- : { valueRedacted: sensitive ? variable.valueRedacted : false }),- });- }}- aria-pressed={variable.sensitive}- aria-label={`Mark environment variable ${variable.name || index + 1} as sensitive`}- >- {variable.sensitive ? (- <LockIcon className="size-3" />- ) : (- <LockOpenIcon className="size-3" />- )}- </Button>- }- />- <TooltipPopup side="top">- {variable.sensitive ? "Sensitive, stored separately" : "Plain text"}- </TooltipPopup>- </Tooltip>- <Button- type="button"- size="icon-micro"- variant="ghost-muted"- className="[--control-icon-color:currentColor] hover:text-destructive"- onClick={() => removeVariable(variable.id)}- aria-label={`Remove environment variable ${variable.name || index + 1}`}- >- <XIcon className="size-3" />- </Button>- </div>- ))}- <div className="flex min-h-[1.875rem] flex-wrap items-center justify-end gap-x-3 gap-y-1">- {rows.length > 0 ? (- <span className="mr-auto text-xs text-muted-foreground">- Sensitive values are stored separately and never returned to the app.- </span>- ) : null}- <Button type="button" size="xs" variant="ghost-muted" onClick={addVariable}>+ <SettingsRow+ title="Variables"+ description="API keys, base URLs, and other per-instance CLI settings."+ control={+ <Button type="button" size="sm" variant="outline" onClick={addVariable}><PlusIcon className="size-3" />Add variable</Button>- </div>- </div>+ }+ >+ {rows.length > 0 ? (+ <div className="mt-3 min-w-0 space-y-2 pb-2">+ {rows.map((variable, index) => (+ <div key={variable.id} className="flex min-w-0 flex-wrap items-center gap-1.5">+ <DraftInput+ size="sm"+ className="w-full min-w-0 font-mono sm:w-44 sm:shrink-0"+ value={variable.name}+ onCommit={(name) => updateVariable(variable.id, { name: name.trim() })}+ placeholder="VARIABLE_NAME"+ spellCheck={false}+ aria-label={`Environment variable name ${index + 1}`}+ />+ <span className="hidden text-xs text-muted-foreground sm:inline" aria-hidden>+ =+ </span>+ <DraftInput+ size="sm"+ className="min-w-0 flex-1 font-mono"+ value={variable.valueRedacted ? "" : variable.value}+ onCommit={(value) => updateVariable(variable.id, { value })}+ type={variable.sensitive ? "password" : undefined}+ autoComplete="off"+ placeholder={+ variable.valueRedacted ? "Stored secret, enter a new value to replace" : "value"+ }+ spellCheck={false}+ aria-label={`Environment variable value ${index + 1}`}+ />+ <Tooltip>+ <TooltipTrigger+ render={+ <Button+ type="button"+ size="icon-micro"+ variant="ghost-muted"+ className={cn(+ "[--control-icon-color:currentColor]",+ variable.sensitive && "text-foreground",+ )}+ onClick={() => {+ const sensitive = !variable.sensitive;+ updateVariable(variable.id, {+ sensitive,+ ...(sensitive && variable.valueRedacted === undefined+ ? {}+ : { valueRedacted: sensitive ? variable.valueRedacted : false }),+ });+ }}+ aria-pressed={variable.sensitive}+ aria-label={`Mark environment variable ${variable.name || index + 1} as sensitive`}+ >+ {variable.sensitive ? (+ <LockIcon className="size-3" />+ ) : (+ <LockOpenIcon className="size-3" />+ )}+ </Button>+ }+ />+ <TooltipPopup side="top">+ {variable.sensitive ? "Sensitive, stored separately" : "Plain text"}+ </TooltipPopup>+ </Tooltip>+ <Button+ type="button"+ size="icon-micro"+ variant="ghost-muted"+ className="[--control-icon-color:currentColor] hover:text-destructive"+ onClick={() => removeVariable(variable.id)}+ aria-label={`Remove environment variable ${variable.name || index + 1}`}+ >+ <XIcon className="size-3" />+ </Button>+ </div>+ ))}+ <p className="text-xs text-muted-foreground">+ Sensitive values are stored separately and never returned to the app.+ </p>+ </div>+ ) : null}+ </SettingsRow>);}@@ -837,11 +842,7 @@ export function ProviderInstanceCard({/></SettingsSection>- {setup ? (- <SettingsSection title="Setup">- <div className="px-3 py-3 sm:px-4">{setup}</div>- </SettingsSection>- ) : null}+ {setup ? <SettingsSection title="Setup">{setup}</SettingsSection> : null}<SettingsSectiontitle="Runtime"@@ -877,15 +878,10 @@ export function ProviderInstanceCard({aria-disabled={readOnly || undefined}className={readOnly ? "opacity-50 select-none" : undefined}>- <SettingsRow- title="Variables"- description="API keys, base URLs, and other per-instance CLI settings."- >- <ProviderEnvironmentSection- environment={instance.environment ?? []}- onChange={updateEnvironment}- />- </SettingsRow>+ <ProviderEnvironmentSection+ environment={instance.environment ?? []}+ onChange={updateEnvironment}+ /></SettingsSection>{driverOption !== undefined ? (diff --git a/apps/web/src/components/settings/ProviderModelsSection.tsx b/apps/web/src/components/settings/ProviderModelsSection.tsxindex 505a86ff0ea..0cc88eb0638 100644--- a/apps/web/src/components/settings/ProviderModelsSection.tsx+++ b/apps/web/src/components/settings/ProviderModelsSection.tsx@@ -514,7 +514,7 @@ export function ProviderModelsSection({onChange={(event) => setFilter(event.target.value)}placeholder="Filter models"size="sm"- className="w-56"+ className="w-56 max-w-full"spellCheck={false}aria-label="Filter models"/>@@ -540,6 +540,18 @@ export function ProviderModelsSection({{hiddenCount > 0 ? ` · ${hiddenCount} hidden` : ""}</span></div>+ {driverKind !== "antigravity" && !isAdding ? (+ <Button+ type="button"+ size="xs"+ variant="ghost-muted"+ className="ml-auto"+ onClick={() => setIsAdding(true)}+ >+ <PlusIcon className="size-3" />+ Add custom model+ </Button>+ ) : null}</div><divref={listRef}@@ -619,18 +631,7 @@ export function ProviderModelsSection({</Button></div></div>- ) : (- <Button- type="button"- size="xs"- variant="ghost-muted"- className="mt-2 -ml-2"- onClick={() => setIsAdding(true)}- >- <PlusIcon className="size-3" />- Add custom model- </Button>- )}+ ) : null}{driverKind !== "antigravity" && error ? (<p className="mt-2 text-xs text-destructive">{error}</p>diff --git a/apps/web/src/components/settings/ProviderSetupSection.test.tsx b/apps/web/src/components/settings/ProviderSetupSection.test.tsxindex 7e4c2695821..501b6c8dc49 100644--- a/apps/web/src/components/settings/ProviderSetupSection.test.tsx+++ b/apps/web/src/components/settings/ProviderSetupSection.test.tsx@@ -138,7 +138,9 @@ function renderSetup(function button(view: unknown, label: string) {return visitElements(view,- (element) => element.props.children === label && typeof element.props.onClick === "function",+ (element) =>+ (element.props.children === label || element.props["aria-label"] === label) &&+ typeof element.props.onClick === "function",);}diff --git a/apps/web/src/components/settings/ProviderSetupSection.tsx b/apps/web/src/components/settings/ProviderSetupSection.tsxindex 49ad14cddd9..0bbd160b459 100644--- a/apps/web/src/components/settings/ProviderSetupSection.tsx+++ b/apps/web/src/components/settings/ProviderSetupSection.tsx@@ -12,6 +12,7 @@ import {type ServerProvider,} from "@t3tools/contracts";import { useRef, useState } from "react";+import { Trash2Icon } from "lucide-react";import { writeTextToClipboard } from "../../hooks/useCopyToClipboard";import { ensureLocalApi } from "../../localApi";@@ -20,6 +21,8 @@ import { serverEnvironment } from "../../state/server";import { useAtomCommand } from "../../state/use-atom-command";import { Button } from "../ui/button";import { Input } from "../ui/input";+import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";+import { SettingsRow } from "./settingsLayout";interface ProviderSetupSectionProps {readonly environmentId: EnvironmentId;@@ -68,24 +71,34 @@ export function readAntigravityAuthMethod(config: unknown): AntigravityAuthMetho/** Setup state belongs to the selected environment and is never saved in client settings. */export function ProviderSetupSection(props: ProviderSetupSectionProps) {return (- <section aria-label="Antigravity setup" className="grid gap-3 text-xs">- <p>Antigravity runs on {props.environmentLabel}.</p>- {!props.enabled ? (- <div className="flex flex-wrap items-center gap-2">- <span className="text-muted-foreground">Enable it to use it in threads.</span>- {!props.readOnly ? (- <Button size="xs" variant="outline" onClick={props.onEnable}>- Enable Antigravity- </Button>- ) : null}- </div>- ) : null}+ <section+ aria-label="Antigravity setup"+ className="@container/setup divide-y divide-border/50 text-xs"+ >+ <SettingsRow+ className="@max-lg/setup:[&>div:first-child]:flex @max-lg/setup:[&>div:first-child]:items-stretch @max-lg/setup:[&>div:first-child]:gap-3"+ title="Environment"+ description="Device that runs this provider."+ control={+ <div className="flex min-w-0 flex-col gap-2 sm:items-end">+ <span className="text-muted-foreground [overflow-wrap:anywhere]">+ {props.environmentLabel}+ </span>+ {!props.enabled && !props.readOnly ? (+ <Button size="sm" variant="outline" onClick={props.onEnable}>+ Enable Antigravity+ </Button>+ ) : null}+ </div>+ }+ />{props.readOnly ? (- <p className="text-muted-foreground">This connection cannot change provider setup.</p>+ <SettingsRow title="Setup unavailable" description="Provider setup is read-only." />) : props.provider?.setup === undefined ? (- <p className="text-muted-foreground">- Update this environment to install Antigravity and sign in with Google here.- </p>+ <SettingsRow+ title="Update required"+ description="Update this environment to manage Antigravity."+ />) : (<ProviderSetupActionskey={`${props.environmentId}:${props.instanceId}`}@@ -177,12 +190,14 @@ function ProviderSetupActions({: installation?.phase === "verifying"? "Checking the downloaded runtime.": installed- ? "Antigravity is installed."+ ? "Installed.": usesCustomBinary? enabled? "The configured Antigravity runtime is unavailable.": "The configured Antigravity runtime has not been checked."- : "Install the official Antigravity runtime before signing in.";+ : installation?.totalBytes+ ? `${Math.ceil(installation.totalBytes / 1_000_000)} MB download.`+ : "Not installed.";async function runCommand<A, E>(label: string,@@ -262,210 +277,257 @@ function ProviderSetupActions({}return (- <div className="grid gap-3">- <div className="grid gap-2">- <p className="font-medium">Runtime</p>- <p role="status" className="text-muted-foreground">- {installationStatusMessage}- </p>- {installation?.phase === "downloading" &&- installation.totalBytes !== null &&- installation.totalBytes > 0 ? (- <progress- aria-label="Antigravity download"- className="h-1 w-full accent-foreground"- value={installation.downloadedBytes}- max={installation.totalBytes}- />- ) : null}- {installation?.message && installation.message !== installationStatusMessage ? (- <p className="text-muted-foreground [overflow-wrap:anywhere]">{installation.message}</p>- ) : null}- {usesCustomBinary ? (- <p className="text-muted-foreground">- This instance uses the binary path below. Installing a managed runtime does not change- that path.- </p>- ) : null}- {!installed && !usesCustomBinary && !installActive && installation?.totalBytes ? (- <p className="text-muted-foreground">- Downloads {Math.ceil(installation.totalBytes / 1_000_000)} MB from Google.- </p>- ) : null}- {!installed && !provider.setup?.canInstall ? (- <p className="text-muted-foreground">- Automatic installation is unavailable here. Set an existing binary path below or use a- supported remote environment.- </p>- ) : null}- <div className="flex flex-wrap gap-2">- {installActive && installation.operationId ? (- <Button- size="xs"- variant="outline"- disabled={actionsDisabled}- onClick={() => {- const operationId = installation.operationId;- if (!operationId) return;- void runCommand("Cancelling installation", () =>- cancelInstall({ environmentId, input: { instanceId, operationId } }),- );- }}- >- Cancel installation- </Button>- ) : !installActive && provider.setup?.canInstall ? (- <Button- size="xs"- variant="outline"- disabled={actionsDisabled || installation === null || authActive}- onClick={() => void runCommand("Starting installation", () => startInstall(target))}- >- {installation?.installedVersion- ? installation.version && installation.version !== installation.installedVersion- ? "Update Antigravity"- : "Reinstall Antigravity"- : installation?.phase === "failed" || installation?.phase === "cancelled"- ? "Retry installation"- : installed- ? "Install managed runtime"- : "Install Antigravity"}- </Button>- ) : null}- {installation?.canRemove && !installActive ? (- <Button- size="xs"- variant="ghost"- disabled={actionsDisabled || authActive}- onClick={() => void removeRuntime()}- >- Remove downloaded runtime- </Button>- ) : null}- </div>- </div>+ <div className="divide-y divide-border/50">+ <SettingsRow+ title="Runtime"+ className="@max-lg/setup:[&>div:first-child]:flex @max-lg/setup:[&>div:first-child]:items-stretch @max-lg/setup:[&>div:first-child]:gap-3"+ description="Install and manage Antigravity."+ status={+ <div className="space-y-2">+ {usesCustomBinary ? (+ <p className="text-muted-foreground">+ Uses the custom binary path below. Installation keeps that path.+ </p>+ ) : null}+ {!installed && !provider.setup?.canInstall ? (+ <p className="text-muted-foreground">+ Automatic installation unavailable. Set a binary path or use another environment.+ </p>+ ) : null}+ </div>+ }+ control={+ <div className="flex w-full min-w-0 flex-col gap-2 sm:w-56 sm:text-right">+ <p role="status" className="min-h-4 text-muted-foreground tabular-nums">+ {installationStatusMessage}+ </p>+ <div className="h-1">+ {installation?.phase === "downloading" &&+ installation.totalBytes !== null &&+ installation.totalBytes > 0 ? (+ <progress+ aria-label="Antigravity download"+ className="block h-1 w-full accent-foreground"+ value={installation.downloadedBytes}+ max={installation.totalBytes}+ />+ ) : null}+ </div>+ {!installActive &&+ installation?.message &&+ installation.message !== installationStatusMessage ? (+ <p className="text-muted-foreground [overflow-wrap:anywhere]">+ {installation.message}+ </p>+ ) : null}+ <div className="grid min-h-7 grid-cols-[1.75rem_minmax(0,1fr)] gap-2">+ <div className="col-start-2 row-start-1 grid">+ {installActive && installation.operationId ? (+ <Button+ size="sm"+ variant="outline"+ disabled={actionsDisabled}+ onClick={() => {+ const operationId = installation.operationId;+ if (!operationId) return;+ void runCommand("Cancelling installation", () =>+ cancelInstall({ environmentId, input: { instanceId, operationId } }),+ );+ }}+ >+ Cancel installation+ </Button>+ ) : !installActive && provider.setup?.canInstall ? (+ <Button+ size="sm"+ variant="outline"+ disabled={actionsDisabled || installation === null || authActive}+ onClick={() =>+ void runCommand("Starting installation", () => startInstall(target))+ }+ >+ {installation?.installedVersion+ ? installation.version &&+ installation.version !== installation.installedVersion+ ? "Update Antigravity"+ : "Reinstall Antigravity"+ : installation?.phase === "failed" || installation?.phase === "cancelled"+ ? "Retry installation"+ : installed+ ? "Install managed runtime"+ : "Install Antigravity"}+ </Button>+ ) : null}+ </div>+ {installation?.canRemove && !installActive ? (+ <Tooltip>+ <TooltipTrigger+ render={+ <Button+ size="icon-sm"+ variant="ghost"+ className="col-start-1 row-start-1"+ aria-label="Remove downloaded runtime"+ disabled={actionsDisabled || authActive}+ onClick={() => void removeRuntime()}+ />+ }+ >+ <Trash2Icon className="size-3.5" />+ </TooltipTrigger>+ <TooltipPopup>Remove downloaded runtime</TooltipPopup>+ </Tooltip>+ ) : null}+ </div>+ </div>+ }+ />- <div className="grid gap-2 border-t border-border/60 pt-3">- <p className="font-medium">{methodLabel}</p>- <p role="status" className="text-muted-foreground [overflow-wrap:anywhere]">- {authStatusMessage}- </p>- {authorizationUrl ? (- <>- <div className="flex flex-wrap gap-2">- <Button size="xs" variant="outline" onClick={() => void openSignInPage()}>- Open sign-in page- </Button>- <Button size="xs" variant="ghost" onClick={() => void copySignInLink()}>- {copiedFlowId === auth?.flowId ? "Link copied" : "Copy sign-in link"}- </Button>+ <SettingsRow+ title={methodLabel}+ className="@max-lg/setup:[&>div:first-child]:flex @max-lg/setup:[&>div:first-child]:items-stretch @max-lg/setup:[&>div:first-child]:gap-3"+ description={+ usesBrowser ? "Connect your Google account." : "Connect with the credentials below."+ }+ control={+ <div className="flex min-w-0 flex-col gap-2 sm:max-w-56 sm:items-end sm:text-right xl:max-w-72">+ <p+ role="status"+ className={+ authStatusMessage === phaseLabels.idle+ ? "sr-only"+ : "text-muted-foreground [overflow-wrap:anywhere]"+ }+ >+ {authStatusMessage}+ </p>+ {authorizationUrl ? (+ <div className="flex flex-wrap gap-2 sm:justify-end">+ <Button size="sm" variant="outline" onClick={() => void openSignInPage()}>+ Open sign-in page+ </Button>+ <Button size="sm" variant="ghost" onClick={() => void copySignInLink()}>+ {copiedFlowId === auth?.flowId ? "Link copied" : "Copy sign-in link"}+ </Button>+ </div>+ ) : null}+ <div className="flex flex-wrap gap-2 sm:justify-end">+ {authActive && auth?.flowId ? (+ <Button+ size="sm"+ variant="ghost"+ disabled={actionsDisabled}+ onClick={() => {+ const flowId = auth.flowId;+ if (!flowId) return;+ void runCommand("Cancelling sign-in", () =>+ cancelAuth({ environmentId, input: { instanceId, flowId } }),+ );+ }}+ >+ Cancel sign-in+ </Button>+ ) : !authActive && !authenticated && provider.setup?.canAuthenticate ? (+ <Button+ size="sm"+ variant="outline"+ disabled={actionsDisabled || !installed || auth === null || installActive}+ onClick={() => void runCommand("Starting sign-in", () => startAuth(target))}+ >+ {usesBrowser+ ? auth?.phase === "failed" || auth?.phase === "cancelled"+ ? "Retry Google sign-in"+ : "Sign in with Google"+ : auth?.phase === "failed" || auth?.phase === "cancelled"+ ? "Retry connection"+ : "Connect"}+ </Button>+ ) : null}+ {!authActive && provider.setup?.canAuthenticate ? (+ <Button+ size="sm"+ variant={authenticated ? "outline" : "ghost"}+ disabled={actionsDisabled || auth === null}+ onClick={() => void signOut()}+ >+ {usesBrowser ? "Sign out of Google" : "Disconnect"}+ </Button>+ ) : null}</div>- {auth?.expiresAt ? (+ </div>+ }+ >+ {authorizationUrl || auth?.phase === "waiting" ? (+ <div className="space-y-2 pb-2">+ {authorizationUrl ? (+ <>+ {auth?.expiresAt ? (+ <p className="text-muted-foreground">+ Link expires at{" "}+ <time dateTime={auth.expiresAt}>+ {new Date(auth.expiresAt).toLocaleTimeString([], {+ hour: "numeric",+ minute: "2-digit",+ })}+ </time>+ .+ </p>+ ) : null}+ <form+ className="grid gap-2"+ onSubmit={(event) => {+ event.preventDefault();+ void submitCallback();+ }}+ >+ <label htmlFor={`provider-callback-${instanceId}`}>+ If the final localhost page does not load, paste its full URL here.+ </label>+ <Input+ id={`provider-callback-${instanceId}`}+ size="sm"+ type="url"+ autoComplete="off"+ spellCheck={false}+ placeholder="http://127.0.0.1:..."+ value={callbackUrl}+ maxLength={16_384}+ disabled={actionsDisabled}+ onChange={(event) =>+ setCallbackDraft({ flowId: auth?.flowId ?? null, value: event.target.value })+ }+ />+ <Button+ size="sm"+ variant="outline"+ type="submit"+ className="w-fit"+ disabled={actionsDisabled || !callbackUrl.trim()}+ >+ Continue+ </Button>+ </form>+ </>+ ) : auth?.phase === "waiting" ? (<p className="text-muted-foreground">- Link expires at{" "}- <time dateTime={auth.expiresAt}>- {new Date(auth.expiresAt).toLocaleTimeString([], {- hour: "numeric",- minute: "2-digit",- })}- </time>- .+ Sign-in is open in another client. Complete or cancel it there.</p>) : null}- <form- className="grid gap-2"- onSubmit={(event) => {- event.preventDefault();- void submitCallback();- }}- >- <label htmlFor={`provider-callback-${instanceId}`}>- If the final localhost page does not load, paste its full URL here.- </label>- <Input- id={`provider-callback-${instanceId}`}- size="sm"- type="url"- autoComplete="off"- spellCheck={false}- placeholder="http://127.0.0.1:..."- value={callbackUrl}- maxLength={16_384}- disabled={actionsDisabled}- onChange={(event) =>- setCallbackDraft({ flowId: auth?.flowId ?? null, value: event.target.value })- }- />- <Button- size="xs"- variant="outline"- type="submit"- className="w-fit"- disabled={actionsDisabled || !callbackUrl.trim()}- >- Continue- </Button>- </form>- </>- ) : auth?.phase === "waiting" ? (- <p className="text-muted-foreground">- Sign-in is open in another client. Complete or cancel it there.- </p>+ </div>) : null}- <div className="flex flex-wrap gap-2">- {authActive && auth?.flowId ? (- <Button- size="xs"- variant="ghost"- disabled={actionsDisabled}- onClick={() => {- const flowId = auth.flowId;- if (!flowId) return;- void runCommand("Cancelling sign-in", () =>- cancelAuth({ environmentId, input: { instanceId, flowId } }),- );- }}- >- Cancel sign-in- </Button>- ) : !authActive && !authenticated && provider.setup?.canAuthenticate ? (- <Button- size="xs"- variant="outline"- disabled={actionsDisabled || !installed || auth === null || installActive}- onClick={() => void runCommand("Starting sign-in", () => startAuth(target))}- >- {usesBrowser- ? auth?.phase === "failed" || auth?.phase === "cancelled"- ? "Retry Google sign-in"- : "Sign in with Google"- : auth?.phase === "failed" || auth?.phase === "cancelled"- ? "Retry connection"- : "Connect"}- </Button>- ) : null}- {!authActive && provider.setup?.canAuthenticate ? (- <Button- size="xs"- variant={authenticated ? "outline" : "ghost"}- disabled={actionsDisabled || auth === null}- onClick={() => void signOut()}- >- {usesBrowser ? "Sign out of Google" : "Disconnect"}- </Button>- ) : null}- </div>- </div>+ </SettingsRow>- {pendingLabel ? <p role="status">{pendingLabel}.</p> : null}+ <p className="sr-only" role="status">+ {pendingLabel ? `${pendingLabel}.` : null}+ </p>{error || queryError ? (- <div className="grid gap-2">+ <div className="grid gap-2 px-3 py-3 sm:px-4"><p role="alert" className="text-destructive [overflow-wrap:anywhere]">{error ?? queryError}</p>{queryError ? (<Button- size="xs"+ size="sm"variant="outline"className="w-fit"onClick={() => {diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.tsindex 90b176c3095..54aa20db738 100644--- a/packages/contracts/src/settings.ts+++ b/packages/contracts/src/settings.ts@@ -739,7 +739,7 @@ export const AntigravitySettings = makeProviderSettingsSchema(Schema.annotateKey({title: "Sign-in method",description:- "Google account uses your Antigravity subscription. Gemini Enterprise needs a GCP project and location. API key and Agent Platform bill the credential you enter.",+ "Google accounts use your subscription; API keys and Agent Platform bill usage.",providerSettingsForm: {control: "select",options: ANTIGRAVITY_AUTH_METHODS,@@ -751,8 +751,7 @@ export const AntigravitySettings = makeProviderSettingsSchema(Schema.withDecodingDefault(Effect.succeed("")),Schema.annotateKey({title: "API key",- description:- "Gemini API key, or a Vertex AI express key for Agent Platform. Stored in plain text on this environment.",+ description: "Gemini or Vertex AI express key. Stored in plain text.",providerSettingsForm: {control: "password",placeholder: "Optional",@@ -773,7 +772,7 @@ export const AntigravitySettings = makeProviderSettingsSchema(Schema.withDecodingDefault(Effect.succeed("")),Schema.annotateKey({title: "GCP location",- description: "Region for Gemini Enterprise or Agent Platform, such as us-central1.",+ description: "Region for Gemini Enterprise or Agent Platform.",providerSettingsForm: { placeholder: "us-central1", clearWhenEmpty: "omit" },}),),@@ -781,8 +780,7 @@ export const AntigravitySettings = makeProviderSettingsSchema(Schema.withDecodingDefault(Effect.succeed("")),Schema.annotateKey({title: "Binary path",- description:- "Optional path to the official Antigravity ACP executable. Leave empty for automatic selection.",+ description: "Custom ACP executable. Leave empty to select automatically.",providerSettingsForm: { placeholder: "Automatic", clearWhenEmpty: "persist" },}),),