From 6fab9e8659d3df74d694017970307b1a48a979c0 Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Thu, 26 Nov 2026 02:25:12 +0000 Subject: [PATCH] fix(apps): key Antigravity connector to antigravity with Antigravity branding and logo (#23012) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - The Connectors catalog and `/apps/connect` setup page let people connect AI model providers for their agents > - The Antigravity model-provider connector still used the `google` slug, the generic Google "G" icon, and "Google" headings and sign-in copy on `/apps/connect?source=google` > - Showing "Google" with the generic Google icon on the Antigravity connection flow makes it easy to confuse with Google Workspace connectors and hides the Antigravity product identity > - This pull request moves the catalog slug to `antigravity`, adds the official Antigravity vector logo, redirects legacy `source=google` and `source=google-ai` links to `source=antigravity`, and updates the Connect page copy and icons to Antigravity while preserving the underlying `google` AI provider storage contract > - The benefit is that people see clear Antigravity branding, logo, and URL routing throughout the Antigravity connection flow without breaking saved accounts or existing links ## Linked Issues or Issue Description **What existing behavior does this improve?** Connector routing, branding, and logo presentation for Antigravity on the Connectors catalog and `/apps/connect` setup page. **Subsystem affected** Shared app definitions (`packages/shared`), app brand assets (`ui/public/brands/apps`), and UI connection setup pages and components (`ui/src/pages/apps`, `ui/src/components`). **Current behavior** The Antigravity model-provider connector uses `?source=google`, displays the generic Google logo, and shows "Connect Google", "Google", and "Sign in to Google" on the Connect page. **Proposed behavior** The Antigravity connector keys to `?source=antigravity`, displays the Antigravity logo, and shows "Connect Antigravity", "Antigravity", and "Sign in to Antigravity" on the Connect page. Legacy links using `?source=google` or `?source=google-ai` redirect to `?source=antigravity` while preserving other query parameters. **Reason and benefit** This matches the existing `github` -> `github-copilot` catalog separation pattern: stored `google` AI connections and Gemini API key compatibility remain unchanged, while the user-facing catalog entry, URL key, logo, and Connect page copy consistently reflect Antigravity. **Breaking changes** None. The underlying `google` AI provider identifier, credential storage, and grants do not change, and legacy `source=google` / `source=google-ai` deep links redirect automatically to `source=antigravity`. ## What Changed - Added the official transparent Antigravity vector mark at `ui/public/brands/apps/antigravity.svg` and registered `antigravity` in `ui/public/brands/apps/manifest.json` (keeping `google` with `catalogVisible: false` for Google Workspace branding). - Mapped `aiConnectionCatalogSlug("google")` to `"antigravity"` and updated `aiProviderSetupPreset` so `antigravity`, `google`, and `google-ai` all resolve to `{ provider: "google", label: "Antigravity" }`. - Replaced `packages/shared/src/app-definitions/google.json` with `packages/shared/src/app-definitions/antigravity.json`, added `scripts/app-definition-overrides/antigravity.json`, updated `scripts/ingest-app-definitions.mjs`, `packages/shared/src/app-definitions.ts`, and `packages/shared/src/app-definitions.generated.ts`, and resynced `tests/runner-e2e/source-sdk-public-inputs.json`. - Updated `ui/src/pages/apps/app-connect-policy.ts` and `ui/src/pages/apps/AppsConnect.tsx` to admit and redirect legacy `source=google` and `source=google-ai` links to `source=antigravity` while preserving query parameters. - Updated `AdapterMark`, `AiProviderSetup`, `AgentProviderConnection`, `AdapterLoginChrome`, `AiConnectionCredentialStep`, `AiConnectionField`, `ai-connections/model.ts`, and `ui/storybook/prototypes/AiConnectorPages.tsx` to show Antigravity branding and `/brands/apps/antigravity.svg`. - Updated existing unit tests and added `ui/src/pages/apps/AppsConnect.test.tsx` covering legacy URL redirects and Antigravity Connect page rendering. ## Verification - `pnpm --filter @paperclipai/shared build` — passed. - `node scripts/check-app-brand-assets.mjs` — passed (`Validated 114 brand identities`). - `pnpm exec vitest run packages/shared/src/` — 120 test files passed. - `pnpm exec vitest run ui/src/` — 575 test files (7,178 tests) passed; `pnpm exec vitest run ui/src/pages/apps/AppsConnect.test.tsx` — 3/3 passed. - `pnpm --filter @paperclipai/server exec vitest run src/__tests__/ai-connections.test.ts src/__tests__/connection-intents-service.test.ts` — 208/208 passed. - `pnpm --filter @paperclipai/shared typecheck && pnpm --filter @paperclipai/ui typecheck && pnpm --filter @paperclipai/server typecheck` — passed. - `node --test scripts/app-definition-overrides.test.mjs scripts/app-brand-validation.test.mjs scripts/check-test-budget.test.mjs scripts/storybook-catalog.test.mjs` — passed. - `node tests/runner-e2e/source-sdk-public-inputs.mjs $(git rev-parse HEAD) --check` — passed (`changed: false`). ## Risks - Low risk. The stored AI provider enum (`google`) and database/API contracts stay unchanged; `aiConnectionSourceSlug` maps previously stored `google` connections to the `antigravity` catalog entry automatically. - Legacy bookmarks or deep links to `/apps/connect?source=google` or `?source=google-ai` redirect immediately to `?source=antigravity` with existing query parameters preserved. ## Model Used - Google Gemini (Antigravity agent with tool use and code execution). ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge Co-authored-by: Paperclip --- packages/shared/src/ai-provider-routing.ts | 8 +- .../shared/src/app-definitions.generated.ts | 2 +- packages/shared/src/app-definitions.test.ts | 28 +++- packages/shared/src/app-definitions.ts | 2 +- .../{google.json => antigravity.json} | 16 +- .../app-definition-overrides/antigravity.json | 73 +++++++++ scripts/ingest-app-definitions.mjs | 1 - .../runner-e2e/source-sdk-public-inputs.json | 10 +- ui/public/brands/apps/antigravity.svg | 31 ++++ ui/public/brands/apps/manifest.json | 12 +- ui/src/components/AdapterLoginChrome.test.tsx | 11 +- ui/src/components/AdapterLoginChrome.tsx | 12 +- ui/src/components/AdapterMark.tsx | 2 +- .../AiConnectionCredentialStep.tsx | 2 +- .../ai-connections/AiConnectionField.tsx | 2 +- .../ai-connections/AiProviderSetup.tsx | 5 +- ui/src/components/ai-connections/model.ts | 2 +- .../ai-connections/useLocalAiLogin.test.tsx | 4 +- .../AgentProviderConnection.test.tsx | 9 +- .../new-agent/AgentProviderConnection.tsx | 2 +- ui/src/pages/apps/AppsConnect.test.tsx | 144 ++++++++++++++++++ ui/src/pages/apps/AppsConnect.tsx | 9 +- ui/src/pages/apps/app-connect-policy.test.ts | 2 +- ui/src/pages/apps/app-connect-policy.ts | 2 +- ui/storybook/prototypes/AiConnectorPages.tsx | 4 +- 25 files changed, 343 insertions(+), 52 deletions(-) rename packages/shared/src/app-definitions/{google.json => antigravity.json} (73%) create mode 100644 scripts/app-definition-overrides/antigravity.json create mode 100644 ui/public/brands/apps/antigravity.svg create mode 100644 ui/src/pages/apps/AppsConnect.test.tsx diff --git a/packages/shared/src/ai-provider-routing.ts b/packages/shared/src/ai-provider-routing.ts index 8149629b707..e1f1fdefc23 100644 --- a/packages/shared/src/ai-provider-routing.ts +++ b/packages/shared/src/ai-provider-routing.ts @@ -142,6 +142,7 @@ export function aiConnectionCatalogSlug(provider: string, routing?: Pick @@ -258,7 +258,7 @@ describe("AppDefinition catalog", () => { it("validates all Wave 1 definitions", () => expect(() => appDefinitionsSchema.parse(APP_DEFINITIONS)).not.toThrow()); it("lists model providers as regular tagged catalog entries", () => { - const slugs = ["openai", "anthropic", "openrouter", "xai", "google", "github-copilot", "bedrock", "responses-api", "messages-api", "chat-completions-api", "local"]; + const slugs = ["openai", "anthropic", "openrouter", "xai", "antigravity", "github-copilot", "bedrock", "responses-api", "messages-api", "chat-completions-api", "local"]; expect(APP_STORE_DEFINITIONS.filter(app => app.tags?.includes("model-provider")).map(app => app.slug).sort()).toEqual(slugs.sort()); for (const slug of slugs) { const app = APP_STORE_DEFINITIONS.find(app => app.slug === slug)!; @@ -349,6 +349,30 @@ describe("AppDefinition catalog", () => { expect(github.description).not.toContain("Copilot"); expect(aiConnectionCatalogSlug("github")).toBe("github-copilot"); }); + it("keys the Antigravity model-provider connector under antigravity with its own logo while preserving google provider storage", () => { + const antigravity = getAppStoreDefinition("antigravity")!; + expect(antigravity).toBeTruthy(); + expect(getAppStoreDefinition("google")).toBeNull(); + expect(antigravity.name).toBe("Antigravity"); + expect(antigravity.categories).toEqual(["ai"]); + expect(antigravity.branding.logoUrl).toBe("/brands/apps/antigravity.svg"); + expect(antigravity.methods.map((method) => method.key)).toEqual(["ai-subscription", "ai-api_key"]); + expect(antigravity.methods[0]).toMatchObject({ + purpose: "ai", + transport: "runtime_auth", + ai: { provider: "google", method: "subscription" }, + }); + expect(antigravity.methods[1]).toMatchObject({ + purpose: "ai", + transport: "runtime_auth", + ai: { provider: "google", method: "api_key" }, + keyPlacement: { location: "env", name: "GEMINI_API_KEY" }, + }); + expect(aiConnectionCatalogSlug("google")).toBe("antigravity"); + for (const source of ["antigravity", "google", "google-ai"]) { + expect(aiProviderSetupPreset(source)).toEqual({ provider: "google", label: "Antigravity" }); + } + }); it("registers the five native chat providers with only required setup credentials", () => { const expected = { slack: { diff --git a/packages/shared/src/app-definitions.ts b/packages/shared/src/app-definitions.ts index f8c9c3aa66e..8f54fb0e497 100644 --- a/packages/shared/src/app-definitions.ts +++ b/packages/shared/src/app-definitions.ts @@ -4,7 +4,7 @@ import type { AppDefinition, ConnectionMethodDef, FieldDef } from "./types/app-d import type { ToolConnectionOwnership } from "./types/tool-access.js"; export const CONNECTABLE_APP_SLUGS = new Set([ - "anthropic", "openai", "openrouter", "xai", "google", "bedrock", + "anthropic", "openai", "openrouter", "xai", "antigravity", "bedrock", "responses-api", "messages-api", "chat-completions-api", "local", "agentmail", "browser-use-cloud", diff --git a/packages/shared/src/app-definitions/google.json b/packages/shared/src/app-definitions/antigravity.json similarity index 73% rename from packages/shared/src/app-definitions/google.json rename to packages/shared/src/app-definitions/antigravity.json index f0bab046761..1e9949df7a8 100644 --- a/packages/shared/src/app-definitions/google.json +++ b/packages/shared/src/app-definitions/antigravity.json @@ -1,13 +1,13 @@ { "schemaVersion": 1, - "slug": "google", - "name": "Google Antigravity and Gemini", - "description": "Connect Google Antigravity accounts or Gemini API keys for your agents.", + "slug": "antigravity", + "name": "Antigravity", + "description": "Connect Antigravity accounts or Gemini API keys for your agents.", "categories": [ "ai" ], "branding": { - "logoUrl": "/brands/apps/google.svg" + "logoUrl": "/brands/apps/antigravity.svg" }, "urlPatterns": [ "https://generativelanguage.googleapis.com/*" @@ -15,7 +15,7 @@ "methods": [ { "key": "ai-subscription", - "label": "Google Antigravity sign-in", + "label": "Antigravity sign-in", "purpose": "ai", "transport": "runtime_auth", "auth": "oauth", @@ -30,13 +30,13 @@ "ownershipModes": [ "customer" ], - "whenToUse": "Sign in to Google Antigravity on this local execution host.", - "guidanceMd": "Uses a separate Google runtime sign-in for this connection. Google Drive and other tool permissions are separate.", + "whenToUse": "Sign in to Antigravity for your agents.", + "guidanceMd": "Uses a separate Antigravity runtime sign-in for this connection. Google Drive and other tool permissions are separate.", "riskTier": "S3" }, { "key": "ai-api_key", - "label": "Google Gemini API key", + "label": "Gemini API key", "purpose": "ai", "transport": "runtime_auth", "auth": "api_key", diff --git a/scripts/app-definition-overrides/antigravity.json b/scripts/app-definition-overrides/antigravity.json new file mode 100644 index 00000000000..25c1f610a5e --- /dev/null +++ b/scripts/app-definition-overrides/antigravity.json @@ -0,0 +1,73 @@ +{ + "schemaVersion": 1, + "slug": "antigravity", + "name": "Antigravity", + "description": "Connect Antigravity accounts or Gemini API keys for your agents.", + "categories": [ + "ai" + ], + "urlPatterns": [ + "https://generativelanguage.googleapis.com/*" + ], + "methods": [ + { + "key": "ai-subscription", + "label": "Antigravity sign-in", + "purpose": "ai", + "transport": "runtime_auth", + "auth": "oauth", + "ai": { + "provider": "google", + "method": "subscription" + }, + "grantKinds": [ + "user", + "organization" + ], + "ownershipModes": [ + "customer" + ], + "whenToUse": "Sign in to Antigravity for your agents.", + "guidanceMd": "Uses a separate Antigravity runtime sign-in for this connection. Google Drive and other tool permissions are separate.", + "riskTier": "S3" + }, + { + "key": "ai-api_key", + "label": "Gemini API key", + "purpose": "ai", + "transport": "runtime_auth", + "auth": "api_key", + "ai": { + "provider": "google", + "method": "api_key" + }, + "grantKinds": [ + "user", + "organization" + ], + "ownershipModes": [ + "customer" + ], + "whenToUse": "Authenticate an agent with this account.", + "guidanceMd": "Use your personal account or an explicitly shared company account.", + "riskTier": "S3", + "credentialFields": [ + { + "key": "apiKey", + "label": "API key", + "type": "password", + "required": true, + "placeholder": "Enter API key", + "secret": true + } + ], + "keyPlacement": { + "location": "env", + "name": "GEMINI_API_KEY" + } + } + ], + "tags": [ + "model-provider" + ] +} diff --git a/scripts/ingest-app-definitions.mjs b/scripts/ingest-app-definitions.mjs index dca72a7ed0e..b5d0bbb8a91 100644 --- a/scripts/ingest-app-definitions.mjs +++ b/scripts/ingest-app-definitions.mjs @@ -2025,7 +2025,6 @@ const aiCatalogEntries = [ { slug: "openai", name: "OpenAI", provider: "openai", subscription: true, envKey: "OPENAI_API_KEY", url: "https://api.openai.com/*" }, { slug: "openrouter", name: "OpenRouter", provider: "openrouter", envKey: "OPENROUTER_API_KEY", url: "https://openrouter.ai/api/*" }, { slug: "xai", name: "Grok", provider: "xai", subscription: true, envKey: "XAI_API_KEY", url: "https://api.x.ai/*" }, - { slug: "google", name: "Google Gemini", provider: "google", envKey: "GEMINI_API_KEY", url: "https://generativelanguage.googleapis.com/*" }, { slug: "bedrock", name: "Amazon Bedrock", provider: "anthropic", envKey: "AWS_BEARER_TOKEN_BEDROCK", description: "Use Claude through Amazon Bedrock with a Bedrock API key and AWS region." }, { slug: "responses-api", name: "Responses API", provider: "openai", envKey: "OPENAI_API_KEY", description: "Connect any compatible harness to an OpenAI Responses-compatible provider or gateway, including Emissary." }, { slug: "messages-api", name: "Messages API", provider: "anthropic", envKey: "ANTHROPIC_API_KEY", description: "Connect any compatible harness to an Anthropic Messages-compatible provider or gateway." }, diff --git a/tests/runner-e2e/source-sdk-public-inputs.json b/tests/runner-e2e/source-sdk-public-inputs.json index 709f3a9739c..29c5c2d308a 100644 --- a/tests/runner-e2e/source-sdk-public-inputs.json +++ b/tests/runner-e2e/source-sdk-public-inputs.json @@ -65,7 +65,7 @@ "packages/shared/src/ai-connection-router.ts": "9fbd89c385a4d5827bc68e1c7f6a66e00453d413", "packages/shared/src/ai-connection-usage.ts": "4b51573ee92f8a2ae0f80dd15288a0e59b4dddc7", "packages/shared/src/ai-connections.ts": "f4107ef6a07c070b7ad04d64bf16d50135a3950a", - "packages/shared/src/ai-provider-routing.ts": "8149629b707981f0c90118c019eb9c9a88aa435f", + "packages/shared/src/ai-provider-routing.ts": "e1f1fdefc23c76efe425e937852e61fe028cccc1", "packages/shared/src/analytics-consent.test.ts": "0c69d867d4f108cb57c07b4e71633e058cb7506b", "packages/shared/src/analytics-consent.ts": "00c4bfbd24ac3a288a68caae52468dfcd26df3e7", "packages/shared/src/announcements.test.ts": "121ed97b560e0dd271fe6602c97e2415ee4e4bf7", @@ -76,14 +76,15 @@ "packages/shared/src/antigravity-runtime.test.ts": "f9ebcc9430be51c342b42644b735f1434b405ec7", "packages/shared/src/api.ts": "1d61cdff51433c4136368d52ee7cf2f16aa820ed", "packages/shared/src/app-definitions-url.test.ts": "56792d6745a5bc7eafc36e7403f4c9bbd671ae99", - "packages/shared/src/app-definitions.generated.ts": "b162e9621fab029951d77a6b4605ab7893904a3a", + "packages/shared/src/app-definitions.generated.ts": "e15939b08ef267165456fb01bfd8df05d0d245e7", "packages/shared/src/app-definitions.ingestion-report.json": "a7b60c7c16a484a411989315e9f08d48258fa647", - "packages/shared/src/app-definitions.test.ts": "591727cee240c7b1f9a2e2c726d8656d539129e2", - "packages/shared/src/app-definitions.ts": "f8c9c3aa66ea3bbe38c3a2eff7abca9a25911c83", + "packages/shared/src/app-definitions.test.ts": "7a4dfd29b443fed3f9677b2e853d1c04be332f76", + "packages/shared/src/app-definitions.ts": "8f54fb0e497bff04885d43fcb54e97def98ec4f3", "packages/shared/src/app-definitions/1password.json": "c11a4777de2c78805b2d391da5eb075a9511e0f8", "packages/shared/src/app-definitions/agentmail.json": "edd0799b1980d0f5f43b89c8f7a1173dc623f7fa", "packages/shared/src/app-definitions/airtable.json": "c9b216a2bbe693bc6167413255d41c33512d418d", "packages/shared/src/app-definitions/anthropic.json": "6c7cd96eefb4db6dca244fcddeb1c4a585a2af14", + "packages/shared/src/app-definitions/antigravity.json": "1e9949df7a878a7b124cb5e2831fb04ee3f4ca52", "packages/shared/src/app-definitions/api-key-generic.json": "09e6d4295513ac9f1002eaf37c34e7c2d00a3c05", "packages/shared/src/app-definitions/arcade.json": "c8379450055d4ea226d229b1cbf99c7ed2e52beb", "packages/shared/src/app-definitions/asana.json": "42d051d84a576509d75a73fe49b23443d34759f8", @@ -131,7 +132,6 @@ "packages/shared/src/app-definitions/google-slides.json": "289366009d46be6b770eee6cd0bc650eb59a240c", "packages/shared/src/app-definitions/google-workspace-search.json": "f3ec9d00ed0116b7cb8b9b1b71353cb8d6dc8cf4", "packages/shared/src/app-definitions/google-workspace.json": "7a4acb34fb2ab5106860e910de50573070cbed2b", - "packages/shared/src/app-definitions/google.json": "f0bab0467612f915c88137eddbac0b320ac1aa2a", "packages/shared/src/app-definitions/gsc-wizard.json": "a4ba6f183d5f35a25d0a420ade18f00d3fb64534", "packages/shared/src/app-definitions/honcho.json": "17185eaf5189fc8c443388997c90ebf833bc9327", "packages/shared/src/app-definitions/hugging-face.json": "6567ad1e62c007da1702fc314736c2d3aa1d4499", diff --git a/ui/public/brands/apps/antigravity.svg b/ui/public/brands/apps/antigravity.svg new file mode 100644 index 00000000000..2ebede6829a --- /dev/null +++ b/ui/public/brands/apps/antigravity.svg @@ -0,0 +1,31 @@ + + Antigravity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui/public/brands/apps/manifest.json b/ui/public/brands/apps/manifest.json index 4d3e6451cd7..04c90a3c927 100644 --- a/ui/public/brands/apps/manifest.json +++ b/ui/public/brands/apps/manifest.json @@ -27,6 +27,16 @@ "localAsset": "/brands/apps/anthropic.svg", "darkAsset": "/brands/apps/anthropic-dark.svg" }, + { + "slug": "antigravity", + "provider": "Antigravity", + "catalogVisible": true, + "localAsset": "/brands/apps/antigravity.svg", + "aliases": [ + "google antigravity", + "google antigravity and gemini" + ] + }, { "slug": "arcade", "provider": "Arcade", @@ -215,7 +225,7 @@ { "slug": "google", "provider": "Google", - "catalogVisible": true, + "catalogVisible": false, "localAsset": "/brands/apps/google.svg" }, { diff --git a/ui/src/components/AdapterLoginChrome.test.tsx b/ui/src/components/AdapterLoginChrome.test.tsx index 56e99f348f2..2f70c6aba4d 100644 --- a/ui/src/components/AdapterLoginChrome.test.tsx +++ b/ui/src/components/AdapterLoginChrome.test.tsx @@ -310,9 +310,10 @@ describe("session replay", () => { expect(link).not.toBeNull(); expect(link!.getAttribute("target")).toBe("_blank"); expect(link!.getAttribute("rel")).toBe("noreferrer noopener"); + expect(container.textContent).toContain("Sign in to Antigravity"); expect(container.textContent).toContain("127.0.0.1"); - const input = container.querySelector('input[aria-label="Google redirect URL"]') as HTMLInputElement | null; + const input = container.querySelector('input[aria-label="Antigravity redirect URL"]') as HTMLInputElement | null; expect(input).not.toBeNull(); expect(input!.getAttribute("autocomplete")).toBe("off"); expect(input!.getAttribute("spellcheck")).toBe("false"); @@ -328,7 +329,7 @@ describe("session replay", () => { 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"); // Input stays open after a retryable bad paste. - const retryInput = container.querySelector('input[aria-label="Google redirect URL"]') as HTMLInputElement | null; + const retryInput = container.querySelector('input[aria-label="Antigravity redirect URL"]') as HTMLInputElement | null; expect(retryInput).not.toBeNull(); await act(async () => { @@ -341,7 +342,7 @@ describe("session replay", () => { expect(submitCode).toHaveBeenCalledWith("http://127.0.0.1:41234/?state=good&code=xyz"); }); - it("keeps the direct local Google prompt without a paste field when hostedRedirect is false", async () => { + it("keeps the direct local Antigravity prompt without a paste field when hostedRedirect is false", async () => { const container = await render( { }} />, ); - expect(container.querySelector('input[aria-label="Google redirect URL"]')).toBeNull(); - expect(container.textContent).toContain("Finish signing in in the Google browser window"); + expect(container.querySelector('input[aria-label="Antigravity redirect URL"]')).toBeNull(); + expect(container.textContent).toContain("Finish signing in in the Antigravity browser window"); }); }); diff --git a/ui/src/components/AdapterLoginChrome.tsx b/ui/src/components/AdapterLoginChrome.tsx index 2e7cd7a821f..47a81874fdd 100644 --- a/ui/src/components/AdapterLoginChrome.tsx +++ b/ui/src/components/AdapterLoginChrome.tsx @@ -53,7 +53,7 @@ export const CONNECT_SOURCE_NAMES: Record = { claude_local: "Claude", codex_local: "OpenAI", grok_local: "Grok", - antigravity_runtime: "Google", + antigravity_runtime: "Antigravity", }; /** The provider name for a source, falling back to the type when unlisted. */ @@ -524,7 +524,7 @@ export function LocalProviderLoginInstructions({ adapterType, login, hostedRedir setCodeSubmitted(false); setSubmitError(null); }, [login?.authorizationUrl, login?.preparing]); - const provider = adapterType === "antigravity_runtime" ? "Google Antigravity" : adapterType === "claude_local" ? "Claude Code" : adapterType === "grok_local" ? "Grok CLI" : "Codex CLI"; + const provider = adapterType === "antigravity_runtime" ? "Antigravity" : adapterType === "claude_local" ? "Claude Code" : adapterType === "grok_local" ? "Grok CLI" : "Codex CLI"; const isolated = login?.isolated ?? (adapterType === "codex_local" || adapterType === "grok_local"); const command = login?.command; const browserLogin = adapterType === "claude_local" || adapterType === "codex_local" || adapterType === "antigravity_runtime"; @@ -591,11 +591,11 @@ export function LocalProviderLoginInstructions({ adapterType, login, hostedRedir : hostedGoogleRedirect ?

{optionalHostedGoogleRedirect - ? <>Finish signing in in the Google 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. - : <>After signing in with Google, your browser will redirect to a 127.0.0.1 page that won’t load. Copy the full URL from your browser’s address bar and paste it below.} + ? <>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. + : <>After signing in to Antigravity, your browser will redirect to a 127.0.0.1 page that won’t load. Copy the full URL from your browser’s address bar and paste it below.}

{submitError &&

{submitError}

} -
: adapterType === "antigravity_runtime" ?

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

: } + : adapterType === "antigravity_runtime" ?

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

: } } {!browserLogin && (!ready || showCommand) && !login?.error && <>

Run this in a terminal on that machine and finish signing in in your browser. We’ll check automatically when you return.

diff --git a/ui/src/components/AdapterMark.tsx b/ui/src/components/AdapterMark.tsx index c119c1fc1b0..8865b6e977d 100644 --- a/ui/src/components/AdapterMark.tsx +++ b/ui/src/components/AdapterMark.tsx @@ -6,7 +6,7 @@ const brandMarks: Record = { claude_local: { src: "/brands/claude-color.svg" }, codex_local: { src: "/brands/codex-color.svg" }, gemini_local: { src: "/brands/adapters/gemini-color.svg" }, - antigravity_runtime: { src: "/brands/apps/google.svg" }, + antigravity_runtime: { src: "/brands/apps/antigravity.svg" }, kimi_local: { src: "/brands/adapters/kimi-color-light.svg", dark: "/brands/adapters/kimi-color.svg", diff --git a/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx b/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx index 5146b042181..b37c4cfe649 100644 --- a/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx +++ b/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx @@ -142,7 +142,7 @@ function ApiKeyConnectionStep({ companyId, provider, connectionId, name: initial } {environmentError &&

{environmentError}

} {defaults} - { if (!preparing && !environmentError && name.trim() && apiKey.trim()) save.mutate(); }} disabled={disabled || save.isPending || preparing || Boolean(environmentError)} placeholder={copilot ? "github_pat_..." : "Enter API key here"} autoFocus /> + { if (!preparing && !environmentError && name.trim() && apiKey.trim()) save.mutate(); }} disabled={disabled || save.isPending || preparing || Boolean(environmentError)} placeholder={copilot ? "github_pat_..." : "Enter API key here"} autoFocus />
; } diff --git a/ui/src/components/ai-connections/AiConnectionField.tsx b/ui/src/components/ai-connections/AiConnectionField.tsx index 6bade76f14e..9fdbdbe9371 100644 --- a/ui/src/components/ai-connections/AiConnectionField.tsx +++ b/ui/src/components/ai-connections/AiConnectionField.tsx @@ -255,7 +255,7 @@ export function AiConnectionField({ initialMethod={reconnecting?.method ?? method} fixedMethod={Boolean(reconnecting)} connectionId={reconnecting?.id} - name={reconnecting?.name ?? `My ${provider === "anthropic" ? "Claude" : provider === "openai" ? "OpenAI" : provider === "xai" ? "Grok" : provider === "google" ? "Gemini" : provider === "github" ? "GitHub Copilot" : "OpenRouter"} ${method === "subscription" ? "subscription" : "API"}`} + name={reconnecting?.name ?? `My ${provider === "anthropic" ? "Claude" : provider === "openai" ? "OpenAI" : provider === "xai" ? "Grok" : provider === "google" ? "Antigravity" : provider === "github" ? "GitHub Copilot" : "OpenRouter"} ${method === "subscription" ? "subscription" : "API"}`} ownership="personal" agentIds={agentId ? [agentId] : []} allAgents={allAgents} diff --git a/ui/src/components/ai-connections/AiProviderSetup.tsx b/ui/src/components/ai-connections/AiProviderSetup.tsx index f39cb424ce9..f86f46763da 100644 --- a/ui/src/components/ai-connections/AiProviderSetup.tsx +++ b/ui/src/components/ai-connections/AiProviderSetup.tsx @@ -2,6 +2,7 @@ import { useState } from "react"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { Network, Monitor } from "lucide-react"; import { + aiConnectionCatalogSlug, aiProviderRoutingSchema, createAiConnectionSchema, type AiProvider, @@ -40,7 +41,7 @@ const providers = [ name: "Anthropic", description: "Claude subscription or API key", }, - { id: "google", name: "Google", description: "Antigravity sign-in or Gemini API key" }, + { id: "google", name: "Antigravity", description: "Antigravity sign-in or Gemini API key" }, { id: "xai", name: "xAI", description: "Grok subscription or API key" }, { id: "openrouter", @@ -235,7 +236,7 @@ export function AiProviderSetup({ )} ) : ( - + ), }))} onSelect={(id) => { diff --git a/ui/src/components/ai-connections/model.ts b/ui/src/components/ai-connections/model.ts index 733fcedb60a..866aa2f2015 100644 --- a/ui/src/components/ai-connections/model.ts +++ b/ui/src/components/ai-connections/model.ts @@ -8,7 +8,7 @@ export const AI_PROVIDERS: Record< { name: string; subscriptionName?: string; logo?: string } > = { github: { name: "GitHub Copilot", logo: "/brands/apps/github-copilot.svg" }, - google: { name: "Google", subscriptionName: "Google Antigravity account", logo: "/brands/apps/google.svg" }, + google: { name: "Antigravity", subscriptionName: "Antigravity account", logo: "/brands/apps/antigravity.svg" }, anthropic: { name: "Claude", subscriptionName: "Claude subscription", diff --git a/ui/src/components/ai-connections/useLocalAiLogin.test.tsx b/ui/src/components/ai-connections/useLocalAiLogin.test.tsx index a4066499332..794711f0d2f 100644 --- a/ui/src/components/ai-connections/useLocalAiLogin.test.tsx +++ b/ui/src/components/ai-connections/useLocalAiLogin.test.tsx @@ -186,10 +186,10 @@ it("immediately triggers check after submitting a hosted Google redirect URL", a .mockResolvedValueOnce({ status: "sign_in_required", authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth?state=hosted" }) .mockResolvedValueOnce({ status: "ready", accountLabel: "hosted.user@example.test" }); flushSync(() => root.render()); - await vi.waitFor(() => expect(host.querySelector('input[aria-label="Google redirect URL"]')).not.toBeNull()); + await vi.waitFor(() => expect(host.querySelector('input[aria-label="Antigravity redirect URL"]')).not.toBeNull()); expect(api.checkLocalLogin).toHaveBeenCalledTimes(1); - const input = host.querySelector('input[aria-label="Google redirect URL"]') as HTMLInputElement; + const input = host.querySelector('input[aria-label="Antigravity redirect URL"]') as HTMLInputElement; flushSync(() => { 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 })); diff --git a/ui/src/components/new-agent/AgentProviderConnection.test.tsx b/ui/src/components/new-agent/AgentProviderConnection.test.tsx index c037668448c..275c80607ad 100644 --- a/ui/src/components/new-agent/AgentProviderConnection.test.tsx +++ b/ui/src/components/new-agent/AgentProviderConnection.test.tsx @@ -110,12 +110,15 @@ describe("AgentProviderConnection hosted Google sign-in gating", () => { renderConnection("antigravity_runtime", false); await vi.waitFor(() => expect(mocks.startLocalLogin).toHaveBeenCalledTimes(1)); - await vi.waitFor(() => expect(host.querySelector('input[aria-label="Google redirect URL"]')).not.toBeNull()); + await vi.waitFor(() => expect(host.querySelector('input[aria-label="Antigravity redirect URL"]')).not.toBeNull()); expect(host.querySelector('a[href="https://accounts.google.com/o/oauth2/v2/auth?state=hosted-ui-state"]')).not.toBeNull(); + expect(host.querySelector('img[src="/brands/apps/antigravity.svg"]')).not.toBeNull(); + expect(host.textContent).toContain("Antigravity"); + expect(host.textContent).toContain("Sign in to Antigravity"); expect(host.textContent).toContain("127.0.0.1"); }); - it("still exposes the Google redirect paste field when local login is also supported (remote private/trusted host)", async () => { + it("still exposes the Antigravity redirect paste field when local login is also supported (remote private/trusted host)", async () => { mocks.healthGet.mockResolvedValue({ status: "ok", deploymentMode: "authenticated", @@ -126,7 +129,7 @@ describe("AgentProviderConnection hosted Google sign-in gating", () => { renderConnection("antigravity_runtime", true); await vi.waitFor(() => expect(mocks.startLocalLogin).toHaveBeenCalledTimes(1)); - await vi.waitFor(() => expect(host.querySelector('input[aria-label="Google redirect URL"]')).not.toBeNull()); + await vi.waitFor(() => expect(host.querySelector('input[aria-label="Antigravity redirect URL"]')).not.toBeNull()); expect(host.textContent).toContain("another machine"); expect(host.textContent).toContain("127.0.0.1"); }); diff --git a/ui/src/components/new-agent/AgentProviderConnection.tsx b/ui/src/components/new-agent/AgentProviderConnection.tsx index fb7959c8baf..57fa836e175 100644 --- a/ui/src/components/new-agent/AgentProviderConnection.tsx +++ b/ui/src/components/new-agent/AgentProviderConnection.tsx @@ -121,7 +121,7 @@ export function AgentProviderConnection({ const [error, setError] = useState(null); const [storedConnection, setStoredConnection] = useState(null); - const provider = adapterType === "antigravity_runtime" ? "Google" : adapterType === "claude_local" ? "Claude" : adapterType === "grok_local" ? "Grok" : "OpenAI"; + const provider = adapterType === "antigravity_runtime" ? "Antigravity" : adapterType === "claude_local" ? "Claude" : adapterType === "grok_local" ? "Grok" : "OpenAI"; const envKey = adapterType === "antigravity_runtime" ? "GEMINI_API_KEY" : adapterType === "claude_local" ? "ANTHROPIC_API_KEY" : adapterType === "grok_local" ? "XAI_API_KEY" : "OPENAI_API_KEY"; const aiProvider = adapterType === "antigravity_runtime" ? "google" : adapterType === "claude_local" ? "anthropic" : adapterType === "grok_local" ? "xai" : "openai"; diff --git a/ui/src/pages/apps/AppsConnect.test.tsx b/ui/src/pages/apps/AppsConnect.test.tsx new file mode 100644 index 00000000000..77c237d5ca0 --- /dev/null +++ b/ui/src/pages/apps/AppsConnect.test.tsx @@ -0,0 +1,144 @@ +// @vitest-environment jsdom +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import { flushSync } from "react-dom"; +import { createRoot, type Root } from "react-dom/client"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { AppsConnect } from "./AppsConnect"; + +const mocks = vi.hoisted(() => ({ + navigate: vi.fn(), + searchParams: new URLSearchParams(), + params: {} as { appKey?: string }, +})); + +vi.mock("@/lib/router", () => ({ + useNavigate: () => mocks.navigate, + useParams: () => mocks.params, + useSearchParams: () => [mocks.searchParams, vi.fn()] as const, +})); + +vi.mock("@/context/CompanyContext", () => ({ + useCompany: () => ({ selectedCompanyId: "company-1" }), +})); + +vi.mock("@/api/ai-connections", () => ({ + aiConnectionsApi: { + list: vi.fn().mockResolvedValue({ connections: [], canManageConnections: true }), + loginSetup: vi.fn(), + startLocalLogin: vi.fn().mockResolvedValue({ + attemptId: "attempt-1", + authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth?state=antigravity-state", + }), + checkLocalLogin: vi.fn().mockResolvedValue({ + status: "sign_in_required", + authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth?state=antigravity-state", + }), + cancelLocalLogin: vi.fn().mockResolvedValue({ ok: true }), + }, +})); + +vi.mock("@/api/agents", () => ({ + agentsApi: { + list: vi.fn().mockResolvedValue([]), + getAdapterAuthSignal: vi.fn().mockResolvedValue({ status: "missing" }), + }, +})); + +vi.mock("@/api/environments", () => ({ + environmentsApi: { + list: vi.fn().mockResolvedValue([]), + capabilities: vi.fn().mockResolvedValue({ environments: {} }), + }, +})); + +vi.mock("@/api/instanceSettings", () => ({ + instanceSettingsApi: { + get: vi.fn().mockResolvedValue({}), + getExperimental: vi.fn().mockResolvedValue({}), + getGeneral: vi.fn().mockResolvedValue({ executionMode: "standard" }), + }, +})); + +vi.mock("@/api/health", () => ({ + healthApi: { + get: vi.fn().mockResolvedValue({ + status: "ok", + deploymentMode: "authenticated", + deploymentExposure: "public", + localAiLoginSupported: false, + hostedGoogleAiLoginSupported: true, + }), + }, +})); + +vi.mock("@/api/tools", () => ({ + toolsApi: { + listGallery: vi.fn().mockResolvedValue({ apps: [] }), + listConnections: vi.fn().mockResolvedValue({ connections: [] }), + }, +})); + +vi.mock("@/components/new-agent/useSavedProviderKeys", () => ({ + useSavedProviderKeys: () => ({ + options: [], + subscriptions: [], + loading: false, + storedLogin: { data: undefined, isPending: false, isError: false }, + }), +})); + +let host: HTMLDivElement; +let root: Root; + +beforeEach(() => { + vi.clearAllMocks(); + mocks.params = {}; + mocks.searchParams = new URLSearchParams(); + host = document.createElement("div"); + document.body.appendChild(host); + root = createRoot(host); +}); + +afterEach(() => { + flushSync(() => root.unmount()); + host.remove(); +}); + +function renderAppsConnect() { + const client = new QueryClient({ defaultOptions: { queries: { retry: false } } }); + flushSync(() => { + root.render( + + + , + ); + }); +} + +describe("AppsConnect Antigravity routing and branding", () => { + it.each(["google", "google-ai"])("redirects legacy source=%s links to source=antigravity while preserving query params", async (legacySource) => { + mocks.searchParams = new URLSearchParams({ source: legacySource, reconnect: "conn-123" }); + renderAppsConnect(); + await vi.waitFor(() => { + expect(mocks.navigate).toHaveBeenCalledWith( + "/apps/connect?source=antigravity&reconnect=conn-123", + { replace: true }, + ); + }); + }); + + it("renders Connect Antigravity with the Antigravity logo and hosted sign-in prompt for source=antigravity", async () => { + mocks.searchParams = new URLSearchParams({ source: "antigravity" }); + renderAppsConnect(); + + await vi.waitFor(() => { + expect(host.querySelector("h2")?.textContent).toBe("Connect Antigravity"); + }); + await vi.waitFor(() => { + expect(host.querySelector('input[aria-label="Antigravity redirect URL"]')).not.toBeNull(); + }); + expect(host.querySelector('img[src="/brands/apps/antigravity.svg"]')).not.toBeNull(); + expect(host.textContent).toContain("Sign in to Antigravity"); + expect(host.textContent).not.toContain("Connect Google"); + }); +}); diff --git a/ui/src/pages/apps/AppsConnect.tsx b/ui/src/pages/apps/AppsConnect.tsx index 4e447159d66..ccaf398eaa6 100644 --- a/ui/src/pages/apps/AppsConnect.tsx +++ b/ui/src/pages/apps/AppsConnect.tsx @@ -57,14 +57,15 @@ export function AppsConnect({ byoOnly = false, credentialSource = "paperclip_vau if (hasSavedComposio) navigate(`/apps?source=composio&targetToolkit=${encodeURIComponent(toolkit!)}`, { replace: true }); }, [hasSavedComposio, toolkit, navigate]); const legacyCopilotLink = source === "github" && searchParams.get("method") === "copilot-token"; + const legacyAntigravityLink = source === "google" || source === "google-ai"; useEffect(() => { - if (!legacyCopilotLink) return; + if (!legacyCopilotLink && !legacyAntigravityLink) return; const params = new URLSearchParams(searchParams); params.delete("appKey"); - params.set("source", "github-copilot"); + params.set("source", legacyCopilotLink ? "github-copilot" : "antigravity"); navigate(`/apps/connect?${params.toString()}`, { replace: true }); - }, [legacyCopilotLink, searchParams, navigate]); - if (legacyCopilotLink) return null; + }, [legacyCopilotLink, legacyAntigravityLink, searchParams, navigate]); + if (legacyCopilotLink || legacyAntigravityLink) return null; if (reuseComposio && selectedCompanyId && (saved.isPending || savedView.kind === "reconnecting" || hasSavedComposio)) return

Checking saved Composio accounts…

; if (reuseComposio && savedView.kind === "error") return
diff --git a/ui/src/pages/apps/app-connect-policy.test.ts b/ui/src/pages/apps/app-connect-policy.test.ts index e98816e6eb8..f284dbf4256 100644 --- a/ui/src/pages/apps/app-connect-policy.test.ts +++ b/ui/src/pages/apps/app-connect-policy.test.ts @@ -39,7 +39,7 @@ describe("app connect policy", () => { expect(canEnterAppsConnect(new URLSearchParams("source=zapier"))).toBe(true); expect(canEnterAppsConnect(new URLSearchParams("source=unknown"))).toBe(false); expect(canEnterAppsConnect(new URLSearchParams("source=model-provider"))).toBe(false); - for (const source of ["responses-api", "messages-api", "chat-completions-api", "bedrock", "local", "google", "openrouter"]) { + for (const source of ["responses-api", "messages-api", "chat-completions-api", "bedrock", "local", "antigravity", "google", "google-ai", "openrouter"]) { expect(canEnterAppsConnect(new URLSearchParams({ source })), source).toBe(true); } expect(canEnterAppsConnect(new URLSearchParams("byo=1"))).toBe(false); diff --git a/ui/src/pages/apps/app-connect-policy.ts b/ui/src/pages/apps/app-connect-policy.ts index b8bd37bff3f..a29700a5979 100644 --- a/ui/src/pages/apps/app-connect-policy.ts +++ b/ui/src/pages/apps/app-connect-policy.ts @@ -69,7 +69,7 @@ export function canEnterAppsConnect( ); } const source = searchParams.get("source") ?? ""; - if (["google-ai", "gateway"].includes(source)) return true; + if (["google", "google-ai", "gateway"].includes(source)) return true; // Router connectors are registered by installed plugins, not the static // catalog. AppsConnect resolves this reserved slug against the host gallery // before rendering the pool wizard; unknown/uninstalled routers show its diff --git a/ui/storybook/prototypes/AiConnectorPages.tsx b/ui/storybook/prototypes/AiConnectorPages.tsx index b77ba853848..d3e6934ad2e 100644 --- a/ui/storybook/prototypes/AiConnectorPages.tsx +++ b/ui/storybook/prototypes/AiConnectorPages.tsx @@ -4,7 +4,7 @@ import { AiConnectionAccountControls } from "@/components/ai-connections/AiConne import { useEffect, useState } from "react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { Route, Routes, useNavigate, useSearchParams } from "@/lib/router"; -import { APP_DEFINITIONS, getAppStoreDefinition, type AppDefinition, type ToolApplication, type ToolConnection, type ConnectionGrantsResponse } from "@paperclipai/shared"; +import { APP_DEFINITIONS, aiConnectionCatalogSlug, getAppStoreDefinition, type AppDefinition, type ToolApplication, type ToolConnection, type ConnectionGrantsResponse } from "@paperclipai/shared"; import { Browse } from "@/pages/apps/Browse"; import { AppDetail } from "@/pages/apps/AppDetail"; import { ConnectionSetupFlow } from "@/features/connections/ConnectionSetupFlow"; @@ -23,7 +23,7 @@ const capabilities = { canConfigure: true, canCreateOrganizationGrant: true, can const members = [{ userId: "dotta", name: "Dotta", email: "dotta@example.test" }, { userId: "sam", name: "Sam", email: "sam@example.test" }]; /** Use the production provider catalog; only accounts and actions are simulated. */ -const gallery: AppDefinition[] = (Object.keys(AI_PROVIDERS) as AiProvider[]).map((provider) => getAppStoreDefinition(provider)!); +const gallery: AppDefinition[] = (Object.keys(AI_PROVIDERS) as AiProvider[]).map((provider) => getAppStoreDefinition(aiConnectionCatalogSlug(provider))!); for (const slug of ["github", "gmail"]) { const app = getAppStoreDefinition(slug); if (app) gallery.push(app);