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 (