From 9d6c5a920c773f86fad9ea16528212faeaa21815 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Mon, 10 Aug 2026 20:46:41 -0700 Subject: [PATCH] fix(desktop): collapse Fireworks behind the provider disclosure on first run The first-run provider picker showed Fireworks AI alongside Nous Portal before the user opened the 'Other providers' disclosure. Only Nous Portal should be visible up front; Fireworks now lives inside the expanded list but keeps its #1 position there (Nous -> Fireworks ordering preserved). --- .../src/components/onboarding/index.test.tsx | 9 +++++---- apps/desktop/src/components/onboarding/index.tsx | 13 ++++++++----- .../desktop/src/components/onboarding/providers.tsx | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/desktop/src/components/onboarding/index.test.tsx b/apps/desktop/src/components/onboarding/index.test.tsx index d167c042ce6bb..2231f39c761d6 100644 --- a/apps/desktop/src/components/onboarding/index.test.tsx +++ b/apps/desktop/src/components/onboarding/index.test.tsx @@ -62,18 +62,19 @@ describe('onboarding Picker', () => { expect(screen.getByText('Nous Portal')).toBeTruthy() expect(screen.getByText('Recommended')).toBeTruthy() - // Fireworks is the always-visible #2 slot (after Nous), even while OAuth - // alternatives stay collapsed behind the disclosure. - expect(screen.getByText('Fireworks AI')).toBeTruthy() + // Fireworks stays behind the disclosure with the other alternatives; only + // Nous Portal is visible before the user expands the list. + expect(screen.queryByText('Fireworks AI')).toBeNull() expect(screen.queryByText('Anthropic API Key')).toBeNull() fireEvent.click(screen.getByRole('button', { name: 'Other providers' })) + expect(screen.getByText('Fireworks AI')).toBeTruthy() expect(screen.getByText('Anthropic API Key')).toBeTruthy() expect(screen.getByRole('button', { name: 'Collapse' })).toBeTruthy() }) - it('shows Fireworks in slot #2 ahead of other OAuth providers', () => { + it('shows Fireworks first in the expanded list, ahead of other OAuth providers', () => { setProviders([ provider('openai-codex', 'OpenAI Codex / ChatGPT'), provider('minimax-oauth', 'MiniMax'), diff --git a/apps/desktop/src/components/onboarding/index.tsx b/apps/desktop/src/components/onboarding/index.tsx index 6fb2adfd85662..3b44c4cba057b 100644 --- a/apps/desktop/src/components/onboarding/index.tsx +++ b/apps/desktop/src/components/onboarding/index.tsx @@ -467,19 +467,22 @@ export function Picker({ ctx }: { ctx: OnboardingContext }) { const select = (p: OAuthProvider) => void startProviderOAuth(p, ctx) const featured = ordered.find(p => p.id === FEATURED_ID) ?? null const rest = featured ? ordered.filter(p => p.id !== FEATURED_ID) : ordered - // Collapse the secondary providers behind a disclosure only when Nous - // Portal is present to anchor the choice — otherwise show the full list. - const collapsible = Boolean(featured) && rest.length > 0 + // Collapse the secondary providers behind a disclosure whenever Nous Portal + // is present to anchor the choice — otherwise show the full list. The + // Fireworks/OpenRouter key rows always live behind the disclosure, so the + // toggle is warranted even when there are no other OAuth providers. + const collapsible = Boolean(featured) const showRest = !collapsible || showAll return (
{featured ? : null} - {/* Slot #2 — always visible, matching CANONICAL_PROVIDERS (Nous → Fireworks). */} - openKeyForm('FIREWORKS_API_KEY')} /> {showRest ? ( <> + {/* Fireworks leads the expanded list, matching CANONICAL_PROVIDERS + (Nous → Fireworks), but stays hidden until the user opens it. */} + openKeyForm('FIREWORKS_API_KEY')} /> {rest.map(p => ( ))} diff --git a/apps/desktop/src/components/onboarding/providers.tsx b/apps/desktop/src/components/onboarding/providers.tsx index f02226b7c9e41..e35b7ab3cb7d2 100644 --- a/apps/desktop/src/components/onboarding/providers.tsx +++ b/apps/desktop/src/components/onboarding/providers.tsx @@ -76,7 +76,7 @@ function ConnectedTag() { const PROVIDER_ROW_CLASS = 'group flex w-full items-center justify-between gap-3 rounded-[6px] px-3 py-2.5 text-left transition-colors hover:bg-(--ui-control-hover-background)' -/** Quick-key row for API-key providers (Fireworks #2 after Nous, OpenRouter further down). */ +/** Quick-key row for API-key providers (Fireworks leads the expanded list after Nous, OpenRouter further down). */ export function KeyProviderRow({ onClick, pitch, title }: { onClick: () => void; pitch: string; title: string }) { return (