[#1251] Build ActivationFlow.tsx (3-step UI with refresh-resume)#1289
Conversation
3-step activation: (1) SIWE sign with inbound referral binding from localStorage, (2) X handle verify + confirm with preview card, (3) Missions: X follow (required) + FC follow (optional). Refresh-resume via /activation-status — skips completed steps on remount. All 8 error states: signature rejected/expired, X not found, X UNIQUE conflict, twitterapi down, FC not found/not following/ FID conflict. Progress strip with idle/active/done indicators. Closes #1251 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
realproject7
left a comment
There was a problem hiding this comment.
@re2 review — APPROVE ✅
Checked against issue #1251 acceptance criteria:
| Criterion | Status |
|---|---|
| 3 steps work (SIWE → X handle → Missions) | ✅ |
| Inbound referral binding after SIWE | ✅ localStorage read + register-referral POST |
| Non-blocking errors: 400/404/409 → clear + continue, 401/500 → keep | ✅ |
| Does NOT reuse ReferralInput.tsx | ✅ fresh logic |
| Refresh-resume via activation-status | ✅ skips completed steps |
| All 8 error states implemented | ✅ see below |
| FC step skippable | ✅ marked optional |
| Session expired re-sign | ✅ re-sign CTA at bottom of step 3 |
| Version 1.35.0 → 1.36.0 (feature) | ✅ |
Closes #1251 in body |
✅ |
Error states verified (all 8):
- Sig rejected → "Signature rejected — please try again." ✅
- Sig expired → resets to step 1 with re-sign prompt ✅
- X not found → 404 message ✅
- X UNIQUE → 409 "already linked to another wallet" ✅
- twitterapi down → "Couldn't verify right now" ✅
- FC not found → 404 message ✅
- FC not following → 422 "don't follow @plotlink yet" ✅
- FID conflict → 409 "already linked" ✅
Code review notes:
- SIWE message built with correct domain/URI/statement/chainId matching server config
- Signature intentionally not persisted to localStorage — re-sign required after refresh (correct per spec)
- Referral binding inline in handleSign — non-blocking, correct error status handling per RE1 r27
- Progress strip with StepIndicator (idle/active/done) visual states
- X follow opens intent URL + tracks via x-follow-click in parallel
- FC verify handles all partial-failure paths (404/422/409/502)
No blocking issues found.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The ActivationFlow implements the broad 3-step shape and referral binding path, but completion does not hand control back to the parent state machine. A user can finish the required mission and still remain on the activation card instead of transitioning to Mining.
Findings
- [high] Activation completion does not transition the page to Mining.
- File:
src/components/airdrop/ActivationFlow.tsx:211 - The
/api/airdrop/x-follow-clickresponse is the point where the backend can setactivated_at, but the client only callssetXFollowed(true)and ignores the response. The parentAirdropStateMachineonly reads/api/airdrop/activation-statuson mount/address changes, so after a successful activation there is no callback, refetch, or parent state update to make T3.1 leave Pre-activation. This misses #1251 acceptance: “After completion: state transitions to Mining.” - Suggestion: plumb an
onActivatedcallback fromAirdropStateMachineintoActivationFlowand update the parent activation result whenx-follow-clickreturnsactivated: true, or otherwise trigger a real activation-status refetch/remount after the required mission succeeds.
- File:
Decision
Requesting changes for the missing post-activation transition. CI was still pending at review time.
ActivationFlow calls onActivated when x-follow-click returns activated: true. Parent AirdropStateMachine updates fetchResult to trigger state derivation from Pre-activation to Mining. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The requested activation-completion issue is resolved. ActivationFlow now notifies the parent when x-follow-click returns activated: true, and the parent updates its activation result so the page can transition to Mining immediately.
Findings
- None blocking.
Decision
Approving PR #1289. The 3-step SIWE/X/missions flow, inbound referral binding behavior, refresh-resume path, post-activation transition, and CI checks now satisfy #1251.
Summary
Full 3-step activation flow component:
Step 1: SIWE Sign-In
localStorage.plotlink_ref, POSTs to/register-referralwith SIWE auth. Non-blocking: 400/404/409 → clear + continue; 401/500 → keep for retry.Step 2: X Handle Verification
verify-x-handle→ preview card (avatar, display name, followers)confirm-x-handle(server-side re-lookup)Step 3: Missions
x-follow-clickverify-fcwith all partial-failure pathsRefresh-Resume (R20)
Calls
/activation-statuson mount, skips completed steps based on confirmed timestamps.Error States (8 total)
Signature rejected/expired, X not found, X UNIQUE conflict, twitterapi down, FC not found, FC not following, FID conflict, session expired re-sign.
Version
1.35.0 → 1.36.0 (feature)
Closes #1251
🤖 Generated with Claude Code