Repository navigation
ref(android): [Staged Nav3 Transactions 1] Give each SentryNavEffect a lease registration and a transaction handle - #6399
Open
0xadam-brown wants to merge 1 commit into
Conversation
…ansaction handle NavLeaseCoordinator now observes each candidate's lifecycle itself, via register(), and publishes and unpublishes its nav state through LeasedNavState. NavScopes folds the old NavScope into an inner class and publishes its StagedNavData and nav transaction through a single publisher. Each NavScopes instance now keeps its nav transaction in a StagedNavTransaction handle, which INavScope.startNavTransaction and finishNavTransaction drive, rather than BackStackObserver binding and unbinding transactions itself and the coordinator retaining them. StagedNavTransaction alone decides whether the scope's transaction slot is free. No behavior change: nav transactions still start only with the nav lease and a free slot, and an owner that regains the lease still gets its unfinished transaction back. The integration tests are unchanged. This prepares for deferring transactions requested without the lease. Refs JAVA-785 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 27, 2026
📲 Install BuildsAndroid
|
0xadam-brown
marked this pull request as ready for review
October 27, 2026 23:20
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
Refactors
.navigation3.lifecycleahead of staging nav transactions in the next PR.Lets us separate three responsibilities:
Behavior is unchanged save for one corner case: when a SentryNavEffect regains the lease, its unfinished transaction is now also re-bound if the scope holds a finished transaction. Before, it was only re-bound into an empty scope. The update matches the rule for starting a transaction, and in practice shouldn't occur, since a finished
SentryTracerremoves itself from the scope.See the PR description in #6398 for more details.
💡 Motivation and Context
Splits out structural refactoring from the meaningful behavioral changes which follow.
addresses: JAVA-785
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The next PR stages nav transactions requested without the nav lease.
#skip-changelog