Repository navigation
fix(android): [Staged Nav3 Transactions 2] Stage Nav3 transactions requested without the nav lease - #6400
Open
0xadam-brown wants to merge 1 commit into
Conversation
This was referenced Oct 27, 2026
📲 Install BuildsAndroid
|
0xadam-brown
marked this pull request as ready for review
October 27, 2026 23:20
A SentryNavEffect that navigates without the nav lease got no nav transaction for that destination. That covers a preloaded ViewPager2 page that's swiped to, and an owner that navigates while covered by another Activity or Fragment (e.g., a delayed push or a result callback) and is then returned to. Such a request is now staged and starts when the owner next acquires the lease, with the arguments, view names and nav context recorded in the meantime. The acquisition is its only chance to start: if another transaction is bound or the scopes decline it then, it's discarded rather than kept for a later acquisition. Swiping back to a page whose transaction has finished still starts none. The sample tags transactions again on resume, as a page can now get its transaction without composing. Refs JAVA-785 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0xadam-brown
force-pushed
the
0xadam-brown/fix/nav3-deferred-transactions
branch
from
October 27, 2026 23:44
3841860 to
867786b
Compare
This branch has not been deployed
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.
PR Stack (Nav3 Deferred Transactions)
📜 Description
A
SentryNavEffectthat navigates without the nav lease now gets a nav transaction for that destination when its owner next acquires the lease.See the PR description in #6398 for more details.
💡 Motivation and Context
Fixes missing nav transactions for:
addresses: JAVA-785
Spans created before the staged start (e.g., while a ViewPager2 page is preloaded offscreen) still attach to whichever transaction is bound at that time. This is documented on
startNavTransaction().A real-deal fix likely involves delivering a
LocalSentrySpanto the destination composable + finding a way to pick up spans generated outside of the composable. But the problem is pre-existing (and present in a number of manifestations on Nav2), and is a lift too large for the current PR stack.💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps