Skip to content

fix(native): deferred deep-link hardening + un-prune its dev page (for v1.0.47) - #2598

Merged
kushagrasarathe merged 2 commits into
mobile-releasefrom
fix/deferred-hardening-mr
Aug 3, 2026
Merged

fix(native): deferred deep-link hardening + un-prune its dev page (for v1.0.47)#2598
kushagrasarathe merged 2 commits into
mobile-releasefrom
fix/deferred-hardening-mr

Conversation

@kushagrasarathe

Copy link
Copy Markdown
Contributor

Summary

Two fixes for the deferred deep linking shipped in 1.0.43+ (adb200e65 cherry-picked the pre-review version of peanut-ui#2560):

  1. 9c7bd7ebe — the review hardening from feat(native): deferred deep linking through the store install (TASK-20772) #2560 (ffc9e79e8), clean cherry-pick. The shipped builds carry the pre-review semantics, including the two that broke Kush's device test and one field-facing blocker:

    • one-shot flag burned on ANY first launch (transient/empty read included) → a single organic-looking launch permanently kills the hand-off, no retry — this is why "nothing happens" on TestFlight 1.0.46 and why it's undebuggable after the fact
    • 30-day inviteCode cookie → login lockout (routes /setup past Landing, the only Log In screen — the fix(offramp): let the offramp campaign skip the invite-code gate at signup #2346 regression class) → now a session cookie matching the web invite flow
    • iOS: consume-before-prompt (kill-during-prompt can't re-prompt), Android: retry on transient null, dest must-map guard, 10s late-navigation window, locale-prefix query fix, toInviteCode reuse
  2. 3c05197ef — stop pruning dev/deferred from the native export. pruneExportedAssets strips all of /dev; that page is the deferred-link landing target (dest=/dev/deferred) and AASA paths:["*"] routes it into the app on iOS — on 1.0.46 the navigation hits a missing route and chunk-error recovery reload-loops the user into a setup bounce (reproduced). Everything else still prunes; verified against a real export (out/dev/ = exactly deferred/).

Risks

  • Restore semantics change slightly (session invite cookie, retries) — all covered by the 29 deferred/hook tests cherry-picked alongside; full suite 2345 green on this branch.
  • Bundle grows by a few KB (one dev page, walled off web-prod inside the page).

QA

  • npm test 2345 ✅ · typecheck ✅ · native export built from this branch, prune verified
  • After tag: fresh-install iOS test per TASK-20772 — use dest=%2Fhistory for store builds if you want a user-facing landing, or dest=%2Fdev%2Fdeferred now works too

@innolope-dev this touches your lane — the cherry-pick is verbatim ffc9e79e8 from main plus the prune exemption; nothing else. Suggest this rides the next tag (v1.0.47). Your telemetry PR #2587 would rebase cleanly on top of this once retargeted.

Screenshots: N/A (no visible change)

- inviteCode restored as SESSION cookie matching InvitesPage (a 30-day
  cookie routes /setup past Landing, the only Log In screen — the #2346
  lockout class); campaignTag stays 30d, it no longer gates the step
- dest must map through deepLinkToNativePath like openDeepLink — an
  unmappable dest is dropped, not pushed verbatim into the static export
- android: a transient null referrer read no longer burns the one-shot;
  the read is prompt-free and the referrer lives ~90 days, so next
  launch retries. definitive reads (incl. play's organic utm) consume.
- iOS: consume BEFORE the prompt-raising read — kill-during-prompt can
  never re-prompt on later launches
- late-resolving restore (prompt left up, slow referrer service) no
  longer navigates: 10s window from launch, cookies/locale still apply
- stripLocalePrefix handles /pt-br?x=1 (query split before segmenting)
- invite normalization now calls toInviteCode instead of duplicating it
pruneExportedAssets stripped all of /dev as web-only dead weight — true
until dev/deferred became the deferred-deep-link landing target
(dest=/dev/deferred, and AASA paths:["*"] routes it into the app on
iOS). On 1.0.46 that navigation hits a missing route, chunk-error
recovery reloads in a loop, and the user gets bounced to setup. Exempt
the one native-reachable dev page (a few KB); everything else still
prunes.
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview Aug 3, 2026 10:46am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7de557dc-f729-40bc-9c7a-4501e3bf0e12

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@kushagrasarathe
kushagrasarathe merged commit 68f5240 into mobile-release Aug 3, 2026
10 of 11 checks passed
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