fix(deeplink): resolve tip card deeplinks on cold launch - #1146
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.buildNavGraphForLaunchbundles a tip-card deeplink intopendingAction(alongsideOpenCashLinkandLogin) andMainRootfires it eagerly throughApp.kt'sonPendingActioncallback. But that callback only handledOpenCashLinkandLogin—PresentTipCardfell into the no-opelsebranch and was dropped. The subsequentdeepLink = nullthen erased the link before the fallbackLaunchedEffect(deepLink, currentRoute)(which does handlePresentTipCard) 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
PresentTipCardintobuildNavGraphForLaunchand the fallback effect, but not the eageronPendingActiondispatcher.Fix
Add the missing
PresentTipCardbranch toonPendingActionso it callssession.resolveTipCard(userId)eagerly, mirroring the cash-link path. One line, exactly matching the already-working fallback handler.Testing
TipCardDelegate → BillPresentationDelegatechain is sound and only ever lacked theresolveTipCardcall.