fix(native): OTA beta switch off PostHog, Peanut-only receive, claim settles on CLAIMED - #2955
fix(native): OTA beta switch off PostHog, Peanut-only receive, claim settles on CLAIMED#2955innolope-dev wants to merge 3 commits into
Conversation
The five-tap beta switch was gated on a `beta-ota-channel` PostHog flag that was never created, so `isFeatureEnabled` returned false on every prod device and the switch never appeared — the toast said "Beta updates aren't enabled for this device" and no device could self-assign to the Capgo `staging` channel. The tap gesture already keeps the control off customer devices, and Capgo's own self-assignment setting is the real access boundary, so the cohort added nothing but a missing setup step. Drop the flag: five taps now reveals the switch on any native build. The off switch stays reachable, so a device on staging can always return to the store bundle. Remove the now-dead notEnabled toast and its locale strings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fe2ritzXbCgcxnWLLdJyfg
The claim/receive screen offered alternate rails (bank, mercadopago, pix, exchange/wallet) beside the Peanut button. Hide them so the only way to receive is on Peanut, matching the app-first direction. The rail code stays intact behind a SHOW_ALT_RAILS flag (mirrors the file's existing SHOW_INVITE_MODAL_FOR_DEVCONNECT pattern), so it is a one-line re-enable. The rail-specific tests are skipped for the same reason, not deleted. The guest "Continue with Peanut" button and the devconnect event flow are untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fe2ritzXbCgcxnWLLdJyfg
… txHash The claim success screen stayed on "Processing" until the poll observed the on-chain claim txHash, but the backend marks the SendLink CLAIMED and sends the "claimed" notification before that hash projects (and, on native, the poll GET is often slow to arrive). So a user could get the success push while the screen kept spinning. Settle on the same signal that fires the notification: treat CLAIMED as terminal success, with or without the txHash. The poll reports the hash when it is already there and null when it has yet to project; the view tracks a `claimConfirmed` flag instead of gating success on the hash. FAILED/CANCELLED and the give-up fallback are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fe2ritzXbCgcxnWLLdJyfg
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code-analysis diffPainscore total: 7062.75 → 7062.66 (-0.09) 🆕 New findings (21)
…and 1 more. ✅ Resolved (20)
📈 Painscore deltas (top movers)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
🖼 Visual diff — no screen moved62 shots, all identical. baseline Fixture screenshots, no backend. Advisory — this check never blocks a merge. Posted from the default branch by ds-shots-comment.yml; the report it renders is untrusted data. |
|
Superseded by #2956 — same three commits, re-authored locally under my git identity with signed commits (cloud sessions hardcode the author to Claude, which this repo's CLAUDE.md forbids). Tree is byte-identical. |
Why
Three fixes found while investigating native "trouble reaching Peanut" reports.
beta-ota-channelPostHog flag that was never created, soisFeatureEnabledreturned false on every prod device — the switch stayed hidden and no device could self-assign to the Capgostagingchannel.CLAIMEDand sends the notification before the on-chainclaim.txHashprojects, but the UI only settled once the poll observed that hash.What
1. OTA beta switch without the cohort (
875d231b)beta-ota-channelflag gate. Five taps now reveals the switch on any native build.notEnabledtoast and its locale strings.2. Peanut-only receive screen (
ae8b6838)SHOW_ALT_RAILSflag (mirrors the file'sSHOW_INVITE_MODAL_FOR_DEVCONNECTpattern) — one-line re-enable. Rail-specific tests aredescribe.skip'd, not deleted.3. Settle the claim screen on CLAIMED (
de1aa6f0)status === CLAIMEDas terminal success — the same point the backend marks the claim done and notifies — with or without thetxHash.nullwhen it has yet to project; the success view tracks aclaimConfirmedflag instead of gating on the hash. FAILED/CANCELLED and the give-up fallback are unchanged.Tests
useClaimSuccessPolling: updated the CLAIMED-without-hash case to settle instead of poll on; other cadence/failure/ceiling tests unchanged.SuccessClaimLinkView: added a case for CLAIMED-without-hash rendering the success card.BetaUpdatesCard/About.view: dropped the cohort cases.Notes / risks
peanut-api-ts:SendLink.statusis set toCLAIMEDandprocessPostClaim(which sends the push) run together, after the claim tx is handled; the failure path writesFAILEDviarollbackClaimOnError.claimedpush is sent to the sender; the claimer's screen now settles on the sameCLAIMEDmoment, so both track one signal.processPostClaimawaits the receipt but does not flipFAILEDon a revert, so a revert-after-CLAIMED would show success in both the notification and now the UI.🤖 Generated with Claude Code
https://claude.ai/code/session_01Fe2ritzXbCgcxnWLLdJyfg
Generated by Claude Code