From b60b0a09f6734a0a0c9455981c42da564adbd603 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Mon, 20 Oct 2025 15:03:16 -0700 Subject: [PATCH] Tweak setup banner (#1567) > [!NOTE] > Refines the setup banner UI (copy, layout, and badges), updates SetupProviderCard to support a chip and typed subtitle, and adjusts e2e to new OpenRouter button label. > > - **UI/Setup Banner (`src/components/SetupBanner.tsx`)**: > - Rename step title to `2. Setup AI Access` and update helper copy. > - Layout: show `google` and `openrouter` cards side-by-side; increase title font sizes. > - Add badges: `chip={Free}` on Google/OpenRouter; `chip={Recommended}` on Dyad Pro. > - Simplify Dyad Pro `subtitle` to a string; remove `GlobeIcon` usage. > - "Other providers" card: tweak heading size and copy (remove `OpenRouter`). > - `OpenRouterSetupBanner`: use `chip` for "Free models available" instead of `subtitle`. > - **Component API (`src/components/SetupProviderCard.tsx`)**: > - Add optional `chip` prop and render top-right badge. > - Change `subtitle` type to `string`; adjust styles (relative container, font sizes). > - **E2E (`e2e-tests/setup.spec.ts`)**: > - Update button selector to `Setup OpenRouter API Key` (remove `Free`). > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 991807b2edd4baa7a8ec7f4d47f867ba058ebf36. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- e2e-tests/setup.spec.ts | 2 +- src/components/SetupBanner.tsx | 76 ++++++++++++---------------- src/components/SetupProviderCard.tsx | 21 ++++++-- 3 files changed, 50 insertions(+), 49 deletions(-) diff --git a/e2e-tests/setup.spec.ts b/e2e-tests/setup.spec.ts index 42e4800..f2a3e16 100644 --- a/e2e-tests/setup.spec.ts +++ b/e2e-tests/setup.spec.ts @@ -15,7 +15,7 @@ testSetup("setup ai provider", async ({ po }) => { await po.page.getByRole("button", { name: "Go Back" }).click(); await po.page - .getByRole("button", { name: "Setup OpenRouter API Key Free" }) + .getByRole("button", { name: "Setup OpenRouter API Key" }) .click(); await expect( po.page.getByRole("heading", { name: "Configure OpenRouter" }), diff --git a/src/components/SetupBanner.tsx b/src/components/SetupBanner.tsx index 7042e09..f796d11 100644 --- a/src/components/SetupBanner.tsx +++ b/src/components/SetupBanner.tsx @@ -8,7 +8,6 @@ import { XCircle, Loader2, Settings, - GlobeIcon, } from "lucide-react"; import { providerSettingsRoute } from "@/routes/settings/providers/$provider"; @@ -246,47 +245,40 @@ export function SetupBanner() {
{getStatusIcon(isAnyProviderSetup())} - 2. Setup AI Model Access + 2. Setup AI Access
-

- Connect your preferred AI provider to start generating code. +

+ Not sure what to do? Watch the Get Started video above ☝️

- - } - title="Setup Google Gemini API Key" - subtitle={ - <> - - Use Google Gemini for free - - } - /> +
+ + } + title="Setup Google Gemini API Key" + chip={<>Free} + /> - - } - title="Setup OpenRouter API Key" - subtitle={ - <> - - Free models available - - } - /> + + } + title="Setup OpenRouter API Key" + chip={<>Free} + /> +
} title="Setup Dyad Pro" - subtitle={ - <> - - Access all AI models with one plan - - } + subtitle="Access all AI models with one plan" + chip={<>Recommended} />
-

+

Setup other AI providers

- OpenAI, Anthropic, OpenRouter and more + OpenAI, Anthropic and more

@@ -428,7 +416,7 @@ export const OpenRouterSetupBanner = ({ } title="Setup OpenRouter API Key" - subtitle={ + chip={ <> Free models available diff --git a/src/components/SetupProviderCard.tsx b/src/components/SetupProviderCard.tsx index 1bff20d..fba27e9 100644 --- a/src/components/SetupProviderCard.tsx +++ b/src/components/SetupProviderCard.tsx @@ -8,6 +8,7 @@ export function SetupProviderCard({ variant, title, subtitle, + chip, leadingIcon, onClick, tabIndex = 0, @@ -15,7 +16,8 @@ export function SetupProviderCard({ }: { variant: SetupProviderVariant; title: string; - subtitle?: ReactNode; + subtitle?: string; + chip?: ReactNode; leadingIcon: ReactNode; onClick: () => void; tabIndex?: number; @@ -26,7 +28,7 @@ export function SetupProviderCard({ return (
+ {chip && ( +
+ {chip} +
+ )}
{leadingIcon}
-

+

{title}

{subtitle ? (