Skip to content

The agent that grows with you

fix(desktop): collapse Fireworks behind the provider disclosure on first run

Teknium9d6c5a920c77
diff --git a/apps/desktop/src/components/onboarding/index.test.tsx b/apps/desktop/src/components/onboarding/index.test.tsx
index d167c042ce6..2231f39c761 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 6fb2adfd856..3b44c4cba05 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 (
<div className="grid gap-2">
<div className="grid max-h-[60dvh] gap-2 overflow-y-auto p-1">
{featured ? <FeaturedProviderRow onSelect={select} provider={featured} /> : null}
- {/* Slot #2 — always visible, matching CANONICAL_PROVIDERS (Nous → Fireworks). */}
- <FireworksProviderRow onClick={() => openKeyForm('FIREWORKS_API_KEY')} />
{showRest ? (
<>
+ {/* Fireworks leads the expanded list, matching CANONICAL_PROVIDERS
+ (Nous → Fireworks), but stays hidden until the user opens it. */}
+ <FireworksProviderRow onClick={() => openKeyForm('FIREWORKS_API_KEY')} />
{rest.map(p => (
<ProviderRow key={p.id} onSelect={select} provider={p} />
))}
diff --git a/apps/desktop/src/components/onboarding/providers.tsx b/apps/desktop/src/components/onboarding/providers.tsx
index f02226b7c9e..e35b7ab3cb7 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 (
<RowButton className={PROVIDER_ROW_CLASS} onClick={onClick}>