Skip to content

feat(kiloclaw) simplify on boarding. remove channels. show email addr#3120

Open
St0rmz1 wants to merge 4 commits intomainfrom
feat/claw-inbound-email-step
Open

feat(kiloclaw) simplify on boarding. remove channels. show email addr#3120
St0rmz1 wants to merge 4 commits intomainfrom
feat/claw-inbound-email-step

Conversation

@St0rmz1
Copy link
Copy Markdown
Contributor

@St0rmz1 St0rmz1 commented May 7, 2026

Summary

Two related changes to the KiloClaw onboarding wizard.

1. Add a read only Inbound Email step. New screen between the calendar step and provisioning, telling the user their bot has an inbox at the platform's existing alias. Shows the alias from KiloClawDashboardStatus.inboundEmailAddress with a Copy address button (clipboard API plus a transient Copied state and toast). No new infra, no schema, no auth changes; the alias is already populated by the platform on provision.

While the platform status query is still in flight, the address line reads "Setting up your inbox…" and the Continue button is disabled. Once the address resolves, Copy and Continue both unlock. If the feature is genuinely disabled for the instance, the address line says so explicitly. Skip is intentionally not offered: the screen is informational and the user should at least see the address before advancing.

2. Remove the channels selection and pairing steps from the active wizard. New flow: identity → calendar → inbound email → provisioning → chat. The component files (ChannelSelectionStep.tsx, ChannelPairingStep.tsx) stay in the codebase in case channel pairing is reintroduced later, but they are no longer wired into the wizard sequence, the render switch, the state machine, or the fake walkthrough. selectedChannelId and channelTokens state vars are gone; useOnboardingSaves keeps working with channelTokens: null. The exec preset save still fires post identity so freshly provisioned instances default to "Allow everything".

Type level: 'channels' and 'pairing' dropped from OnboardingStep, ClawOnboardingRenderStep, the wizard step list, and the fake step list. hasPairingStep removed from the flow state. getClawOnboardingStepProgress is now single arg with a fixed total of 4 steps.

Tracking events on the new step: claw_setup_email_viewed (fires on render via the same ref guarded effect pattern used for identity and calendar), claw_setup_email_address_copied, and claw_setup_email_completed.

Verification

  • Provisioned a fresh kiloclaw instance through /claw/new. Identity step works as before. Calendar step renders. Inbound email step renders next with the alias populated from the platform status response and a Copy button. Continue advances directly to the provisioning spinner; channels and pairing screens never render.
  • Clicked Continue on the email step within the first second after the calendar step's Continue, before the platform status query had returned. Continue button was disabled with "Setting up your instance…" copy. Address line read "Setting up your inbox…". Once the status query returned, both unlocked and showed the real alias.
  • Clicked Copy address. Address landed on the system clipboard. Toast "Inbound email address copied" fired. Button briefly flipped to a Copied state for two seconds, then back. Did not flip when the write was blocked (verified by temporarily denying clipboard permission in devtools).
  • Started the copy reset timer, then clicked Continue within the two second window. No console warnings about state updates on an unmounted component.
  • Returning user with an active running instance landing on /claw/new: still auto routes straight to /chat (no regression from the post provisioning short circuit).
  • Existing wizard resume after an OAuth round trip: returning to /claw/new?step=calendar&success=google_connected still resumes at the calendar step with the success toast and clean URL.

Visual Changes

Before After

Reviewer Notes

  • The Copy reset timer id lives in copyResetTimerRef; a cleanup effect clears any in flight timer on unmount, and handleCopy clears the previous timer before scheduling a new one. This handles both the user navigating away within the two second window and rapid re clicks of the Copy button.
  • handleCopy guards navigator.clipboard?.writeText first, awaits the write, and only flips Copied / fires the success toast / fires the analytics event after the write resolves. Failed writes show an error toast and leave the button in its un copied state.
  • The post provisioning carve out in getRenderStepDecision still honors explicit wizard steps (calendar, email, provisioning) when the wizard remounts in post provisioning mode after a full page reload. The previously honored channels and pairing branches are gone along with the rest of the channels work.
  • PairingChannelId type and isPairingChannel helper are kept in the state file because ChannelPairingStep.tsx still imports them. Both helpers are unused in the active flow.
  • A pre existing failing test (batch-review-decisions.test.ts) for an unrelated GitHub bot code path shows up in CI for any PR; not introduced by this branch.

Comment thread apps/web/src/app/(app)/claw/components/InboundEmailStep.tsx Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented May 7, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • apps/web/src/app/(app)/claw/components/ClawOnboardingFakeWalkthrough.tsx

Reviewed by gpt-5.5-20260423 · 499,781 tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants