Skip to content

fix(deeplink): resolve tip card deeplinks on cold launch - #1146

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/tip-card-deeplink-cold-launch
Jul 24, 2026
Merged

fix(deeplink): resolve tip card deeplinks on cold launch#1146
bmc08gt merged 1 commit into
code/cashfrom
fix/tip-card-deeplink-cold-launch

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Problem

Tip-card deeplinks (tip/{userId}) are silently dropped on a cold app launch. They work fine when the app is already running (warm launch). Cash links, which went through the same cold-launch hardening earlier, are unaffected.

Root cause

On cold launch, MainRoot.buildNavGraphForLaunch bundles a tip-card deeplink into pendingAction (alongside OpenCashLink and Login) and MainRoot fires it eagerly through App.kt's onPendingAction callback. But that callback only handled OpenCashLink and LoginPresentTipCard fell into the no-op else branch and was dropped. The subsequent deepLink = null then erased the link before the fallback LaunchedEffect(deepLink, currentRoute) (which does handle PresentTipCard) could recover it.

Warm launches are past Loading, so the fallback effect processes the link directly — which is why the bug only shows on cold start.

The gap was introduced in c46c130 (#1127): it wired PresentTipCard into buildNavGraphForLaunch and the fallback effect, but not the eager onPendingAction dispatcher.

Fix

Add the missing PresentTipCard branch to onPendingAction so it calls session.resolveTipCard(userId) eagerly, mirroring the cash-link path. One line, exactly matching the already-working fallback handler.

Testing

  • Traced the full cold-launch deeplink flow end-to-end; the downstream TipCardDelegate → BillPresentationDelegate chain is sound and only ever lacked the resolveTipCard call.
  • The new branch call is identical to the already-verified warm-path handler.

On cold launch, MainRoot.buildNavGraphForLaunch bundles a tip-card
deeplink into pendingAction (alongside OpenCashLink and Login) and
MainRoot fires it eagerly via App.kt's onPendingAction callback. But
that callback only handled OpenCashLink and Login — PresentTipCard fell
into the no-op `else` branch and was dropped, and the subsequent
`deepLink = null` erased the link before the fallback
LaunchedEffect(deepLink, currentRoute) could recover it. The tip card
was silently lost on every cold start.

Warm launches were unaffected because the app is already past Loading,
so the fallback effect (which does handle PresentTipCard) processes the
link directly.

Add the missing PresentTipCard branch to onPendingAction so it calls
session.resolveTipCard(userId) eagerly, mirroring the cash-link path.

The gap was introduced in c46c130 (#1127), which wired PresentTipCard
into buildNavGraphForLaunch and the fallback effect but not the eager
onPendingAction dispatcher.
@github-actions github-actions Bot added the type: fix Bug fix label Jul 24, 2026
@bmc08gt
bmc08gt merged commit 3254cd6 into code/cash Jul 24, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/tip-card-deeplink-cold-launch branch July 24, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant