diff --git a/ui/src/components/AdapterLoginChrome.test.tsx b/ui/src/components/AdapterLoginChrome.test.tsx index bae179d506d..f4cc938440f 100644 --- a/ui/src/components/AdapterLoginChrome.test.tsx +++ b/ui/src/components/AdapterLoginChrome.test.tsx @@ -420,7 +420,7 @@ describe("session replay", () => { Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")!.set!.call(input, "http://127.0.0.1:41234/?state=bad&code=abc"); input!.dispatchEvent(new Event("input", { bubbles: true })); }); - const submitButton = Array.from(container.querySelectorAll("button")).find(b => b.textContent === "Submit redirect URL") as HTMLButtonElement; + const submitButton = Array.from(container.querySelectorAll("button")).find(b => b.textContent === "Submit") as HTMLButtonElement; await act(async () => { submitButton.click(); }); await vi.waitFor(() => expect(container.querySelector('[role="alert"]')?.textContent).toContain("does not match")); expect(submitCode).toHaveBeenCalledWith("http://127.0.0.1:41234/?state=bad&code=abc"); @@ -432,13 +432,13 @@ describe("session replay", () => { Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")!.set!.call(retryInput, "http://127.0.0.1:41234/?state=good&code=xyz"); retryInput!.dispatchEvent(new Event("input", { bubbles: true })); }); - const retrySubmit = Array.from(container.querySelectorAll("button")).find(b => b.textContent === "Submit redirect URL") as HTMLButtonElement; + const retrySubmit = Array.from(container.querySelectorAll("button")).find(b => b.textContent === "Submit") as HTMLButtonElement; await act(async () => { retrySubmit.click(); }); await vi.waitFor(() => expect(container.textContent).toContain("Finishing sign-in")); expect(submitCode).toHaveBeenCalledWith("http://127.0.0.1:41234/?state=good&code=xyz"); }); - it("prompts for an authorization code with a Submit code button for antigravity.google/oauth-callback", async () => { + it("prompts for an authorization code with a Submit button for antigravity.google/oauth-callback", async () => { const submitCode = vi.fn().mockResolvedValueOnce(undefined); const container = await render( { Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")!.set!.call(input, "4/0code-value"); input!.dispatchEvent(new Event("input", { bubbles: true })); }); - const submitButton = Array.from(container.querySelectorAll("button")).find(b => b.textContent === "Submit code") as HTMLButtonElement | undefined; + const submitButton = Array.from(container.querySelectorAll("button")).find(b => b.textContent === "Submit") as HTMLButtonElement | undefined; expect(submitButton).toBeDefined(); await act(async () => { submitButton!.click(); }); expect(submitCode).toHaveBeenCalledWith("4/0code-value"); diff --git a/ui/src/components/AdapterLoginChrome.tsx b/ui/src/components/AdapterLoginChrome.tsx index 2209893b00f..06e2dbcd8cd 100644 --- a/ui/src/components/AdapterLoginChrome.tsx +++ b/ui/src/components/AdapterLoginChrome.tsx @@ -524,7 +524,7 @@ export function ProviderSubscriptionCard({ {failureMessage ?? (failure === "expired" ? "This sign-in expired. Retry signing in to get a new code." : "Sign-in didn’t finish. Try signing in again.")} Your setup is saved. }> -
+
{retry && } @@ -547,7 +547,7 @@ export function ProviderSubscriptionCard({ }>
-
+
{waiting ? ( } -
{children}
+
{children}
{waiting && authorizationUrl && (
@@ -882,29 +882,31 @@ export function LocalProviderLoginInstructions({ adapterType, login, hostedRedir {submitError &&

{submitError}

} {!onboardingSignIn && }
: hostedGoogleRedirect ?
-

+ {(!onboardingSignIn || optionalHostedGoogleRedirect) &&

{optionalHostedGoogleRedirect ? <>Finish signing in in the Antigravity browser window, then return here. If your browser is on another machine and the 127.0.0.1 redirect page won’t load, copy the full URL from your address bar and paste it below. : isHostedAntigravityCodeCallback(safeAuthorizationUrl) ? <>After signing in to Antigravity, copy the authorization code shown on the page and paste it below. : <>After signing in to Antigravity, copy the authorization code or full callback URL from your browser and paste it below.} -

- { - setSubmitError(null); - setBrowserCode(value); - }} - onPaste={pasteBrowserCode} - onSubmit={() => void submitBrowserCode()} - disabled={submitting} - /> - +

} +
+ { + setSubmitError(null); + setBrowserCode(value); + }} + onPaste={pasteBrowserCode} + onSubmit={() => void submitBrowserCode()} + disabled={submitting} + /> + +
{submitError &&

{submitError}

}
: adapterType === "antigravity_runtime" ?

Finish signing in in the Antigravity browser window, then return here.

: } } diff --git a/ui/src/components/ai-connections/useLocalAiLogin.test.tsx b/ui/src/components/ai-connections/useLocalAiLogin.test.tsx index e0fc012c3c6..f4e87cfd071 100644 --- a/ui/src/components/ai-connections/useLocalAiLogin.test.tsx +++ b/ui/src/components/ai-connections/useLocalAiLogin.test.tsx @@ -194,7 +194,7 @@ it("immediately triggers check after submitting a hosted Google redirect URL", a Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")!.set!.call(input, "http://127.0.0.1:41234/?state=hosted&code=abc123"); input.dispatchEvent(new Event("input", { bubbles: true })); }); - flushSync(() => Array.from(host.querySelectorAll("button")).find(b => b.textContent === "Submit redirect URL")!.click()); + flushSync(() => Array.from(host.querySelectorAll("button")).find(b => b.textContent === "Submit")!.click()); await vi.waitFor(() => expect(api.submitLocalLoginCode).toHaveBeenCalledWith("company", "attempt-1", "http://127.0.0.1:41234/?state=hosted&code=abc123")); await vi.waitFor(() => expect(api.checkLocalLogin).toHaveBeenCalledTimes(2)); diff --git a/ui/src/components/new-agent/AgentProviderConnection.tsx b/ui/src/components/new-agent/AgentProviderConnection.tsx index 304630218f8..042dc34b70a 100644 --- a/ui/src/components/new-agent/AgentProviderConnection.tsx +++ b/ui/src/components/new-agent/AgentProviderConnection.tsx @@ -322,6 +322,13 @@ export function AgentProviderConnection({ const providerMark = (wizardCard || managedAccount?.providerDialog) && (adapterType === "claude_local" || adapterType === "codex_local") ? : ; + const signInMark = adapterType === "claude_local" || adapterType === "codex_local" ? providerMark : ( + + {adapterType === "grok_local" + ? + : } + + ); const switchMode = (next: ModelConnectionMode) => { if (advancedConnection && next === (advanced ? "advanced" : method)) return; onDraftChanged?.(); @@ -399,7 +406,7 @@ export function AgentProviderConnection({ />
)} - + ) : needsLogin ? !awaitingLoginRequest && ( @@ -557,6 +564,7 @@ export function AgentProviderConnection({ if (opened && !advancedConnection) { localLoginPrimary.resetSubmitting(); cancel(); + if (managedAccount?.providerDialog) onBack(); } else onBack(); }} compact={Boolean(wizardCard)} diff --git a/ui/src/features/connections/ConnectionSetupFlow.tsx b/ui/src/features/connections/ConnectionSetupFlow.tsx index 7e25f2c16eb..bca0a9c712d 100644 --- a/ui/src/features/connections/ConnectionSetupFlow.tsx +++ b/ui/src/features/connections/ConnectionSetupFlow.tsx @@ -93,6 +93,8 @@ import { toolsApi } from "@/api/tools"; import { agentsApi } from "@/api/agents"; import { appCopyFor, credentialFieldLabel } from "@/lib/app-gallery-copy"; import { JsonSchemaForm, validateJsonSchemaForm, type JsonSchemaNode } from "@/components/JsonSchemaForm"; +import { credentialAccessBadges } from "./credential-access-badges"; +import { Avatar, AvatarFallback, AvatarGroup, AvatarGroupCount } from "@/components/ui/avatar"; import { AgentMultiSelect, type AgentMultiSelectOption } from "@/components/AgentMultiSelect"; import { describeError, errorStatus } from "@/api/errors"; import { InlineBanner } from "@/components/InlineBanner"; @@ -4684,10 +4686,34 @@ export function ConnectionAccessDefaults({ }) { const [open, setOpen] = useState(false); const expanded = open || forceOpen; + const { installChoice, installAgentIds } = accessProps; + const { visible, remaining } = useMemo( + () => credentialAccessBadges(flat ? agents ?? [] : [], installAgentIds, installChoice === "all"), + [flat, agents, installAgentIds, installChoice], + ); + const ownerLabel = accessProps.grantKind === "organization" ? "Organization" : "You"; + return ( -
-

{sentence}

+
+
+

{sentence}

+ {flat && + + + {accessProps.grantKind === "organization" ? : } + + + {visible.map((agent, index) => ( + + {Array.from(agent.name.trim())[0]?.toLocaleUpperCase()} + + ))} + {remaining > 0 && +{remaining}} + } +