When a user clicks a provider in the notifier or storage step, they should be able to configure it (Slack webhook URL, S3 credentials, etc.) before it is added to their list. Data is stored in `flowData` only — no server actions are called during onboarding.
### Phase Machine
Each step manages a local phase:
```ts
typePhase=
|{kind:"grid"}
|{kind:"configuring";provider: string}
```
**Phase "grid"**
- Shows the provider selection grid (style: see Section 2)
- Already-configured providers show at top with check badge and remove button
- Unconfigured providers are clickable → transition to `configuring`
- "Continue" button visible if at least 0 channels configured (step is optional)
- "Add another" link/button visible when at least 1 configured
**Phase "configuring"**
- Header: provider icon + name + "Back" button (returns to grid, no save)
- Channel name `Input` (required, min 5 chars per existing schema)
-`renderChannelForm(provider, form)` renders the provider-specific fields
-`useZodForm` with `NotificationChannelFormSchema` (notifier) or `StorageChannelFormSchema` (storage)
- Submit validates → appends `{ id: crypto.randomUUID(), provider, label, name, config }` to local channels list → returns to grid phase
- No server action called
### Updated `OnboardingChannel` type
```ts
exporttypeOnboardingChannel={
id: string;
provider: string;
label: string;
name: string;
config: Record<string,unknown>;
};
```
`step-defaults.tsx` reads `id` and `label` from notifiers/storages — unchanged, continues to work.
-`src/features/onboarding/steps/step-notifier.tsx` — full rewrite
-`src/features/onboarding/steps/step-storage.tsx` — full rewrite
### Dependencies reused
-`renderChannelForm` from `@/features/channel/channels-helpers`
-`NotificationChannelFormSchema` / `StorageChannelFormSchema` from `@/features/channel/channel-form.schema`
-`useZodForm`, `Form`, `FormField`, `FormItem`, `FormLabel`, `FormControl`, `FormMessage` from `@/components/ui/form`
-`notificationProviders` / `storageProviders` from their respective helpers
---
## 2. Style Refactor — All Onboarding Steps
### Goal
Replace hardcoded dark colors and inconsistent `<button>` styling across all step components with design-system tokens matching the org-combobox visual language.
## 3. Conditional Step Graph — Skip Agent Steps When No Agents
### Rule
If the user skips or submits `agent-create` with zero agents (`flowData.agents` empty or undefined), skip `agent-waiting`, `project-create`, and `db-settings` — jump directly to `finish`.