Skip to content

feat(claw): add channel pairing step to onboarding for Telegram/Discord#1391

Draft
RSO wants to merge 4 commits intomainfrom
RSO/pond-rugby
Draft

feat(claw): add channel pairing step to onboarding for Telegram/Discord#1391
RSO wants to merge 4 commits intomainfrom
RSO/pond-rugby

Conversation

@RSO
Copy link
Contributor

@RSO RSO commented Mar 23, 2026

Summary

  • After provisioning completes, users who selected Telegram or Discord now see a new "Pair your account" step (step 5/5) that polls for incoming pairing requests and lets them approve inline with a button
  • Slack skips this step since it has no dmPolicy/pairing mechanism — its flow remains 4 steps
  • Channel-specific instructions: Telegram says "send any message to your bot", Discord says "send a DM to your bot"
  • Uses the existing useKiloClawPairing + useRefreshPairing hooks with a 5-second setInterval to bust the KV cache and get fresh requests into the shared query cache

Verification

  • pnpm typecheck — passes
  • pnpm format — passes (oxfmt)
  • pnpm lint — passes (pre-push hook ran successfully)

Visual Changes

New onboarding step shown after provisioning for Telegram/Discord users. No changes to existing screens.

Reviewer Notes

  • Zero backend changes — this is purely frontend routing and a new component
  • The pairing step reuses the shared React Query cache via useKiloClawPairing + useRefreshPairing (same hooks that PairingCard in Settings uses), so approving from either location stays in sync
  • ChannelSelectionStepView still hardcodes totalSteps={4} — there's a visual jump from 4 dots to 5 dots when transitioning to provisioning for Telegram/Discord. This is acceptable since users never see both steps simultaneously, but could be refined in a follow-up
  • The ProvisioningStepView totalSteps prop defaults to 4 so Storybook stories continue working without changes

RSO added 4 commits March 23, 2026 14:12
After provisioning completes, users who selected Telegram or Discord are
shown an inline pairing step that polls for incoming pairing requests and
lets them approve with a button. Slack skips this step since it has no
dmPolicy/pairing mechanism.

- New ChannelPairingStep component with channel-specific instructions
- ClawDashboard captures selectedChannelId and routes to pairing step
- ProvisioningStep accepts dynamic totalSteps (4 or 5)
Extract ChannelPairingStepView as a pure visual component (no hooks)
following the ProvisioningStep/ProvisioningStepView pattern. Stories
cover both channels, waiting/request/approving/loading states.
Replace instruction card + dashed polling box with a centered spinner,
heading, and subtitle matching the provisioning step style. Title now
reads 'Pair your Telegram/Discord bot'. Skip button uses subdued
opacity. Step indicator stays left-aligned.
Show pairing code prominently with user ID, full-width authorize
button, and decline link. Remove dead imports and JSX comments.
Add cursor-pointer to all interactive elements.
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.

1 participant