Repository navigation
feat(nav3): [Part 5] Add the built-in SerialNameAndProperties mapper - #6706
Open
0xadam-brown wants to merge 1 commit into
Open
0xadam-brown wants to merge 1 commit into
0xadam-brown wants to merge 1 commit into
Conversation
This was referenced Nov 20, 2026
Contributor
|
4 of 9 tasks
📲 Install BuildsAndroid
|
This was referenced Nov 20, 2026
Contributor
PR risk: not classifiedFor commit The last run ended with status |
0xadam-brown
marked this pull request as ready for review
November 20, 2026 15:38
0xadam-brown
requested review from
romtsn and
runningcode
and removed request for
a team
November 20, 2026 15:38
0xadam-brown
force-pushed
the
feat/nav3-serial-name-mappers-9
branch
2 times, most recently
from
November 23, 2026 13:11
8c1faf4 to
ec9fb95
Compare
0xadam-brown
force-pushed
the
feat/nav3-serial-name-mappers-8
branch
from
November 23, 2026 13:11
546f3b8 to
d2d0c6e
Compare
0xadam-brown
force-pushed
the
feat/nav3-serial-name-mappers-8
branch
from
November 23, 2026 14:28
d2d0c6e to
782f546
Compare
0xadam-brown
force-pushed
the
feat/nav3-serial-name-mappers-9
branch
2 times, most recently
from
November 23, 2026 15:34
a3d765c to
52103fe
Compare
0xadam-brown
force-pushed
the
feat/nav3-serial-name-mappers-8
branch
from
November 23, 2026 15:34
782f546 to
122ad95
Compare
Records each back stack entry's kotlinx.serialization properties as arguments, in addition to its serial name. When the mapper is created, its compatibility probe encodes an SDK-owned fixture and compares the result with the known-good output. Any failure or mismatch, including a LinkageError, disables property encoding for every entry, which then keeps its name and records encoding_failed, since recording wrong arguments is worse than recording none.
0xadam-brown
force-pushed
the
feat/nav3-serial-name-mappers-8
branch
from
November 24, 2026 10:21
122ad95 to
f4a7b52
Compare
0xadam-brown
force-pushed
the
feat/nav3-serial-name-mappers-9
branch
from
November 24, 2026 10:21
52103fe to
1f9a83c
Compare
5 of 9 tasks
0xadam-brown
changed the base branch from
feat/nav3-serial-name-mappers-8
to
feat/nav3-serial-name-mappers-argument-source
November 24, 2026 10:23
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 Serial Name Mappers)
Former parts 1–3 merged into
mainas #6697, #6698, and #6699; preparatory refactors merged in #6749. Two other former parts merged separately as #6713 and #6714.📜 Description
BackStackEntryMapper.SerialNameAndPropertieslets an application opt into recording serializable route properties alongside destination names. That gives navigation reports useful context without requiring a custom mapper for each route, while keeping the resulting arguments subject to the same back stack limits as custom output.Before collecting properties, the mapper checks that the app’s serialization runtime can encode a known fixture correctly. If the check throws or produces unexpected output, it disables property collection while continuing to record destination names. This avoids presenting incorrect arguments as useful route context.
A nonfatal property encoding failure preserves the destination's name and records why its arguments were dropped. This keeps navigation identity useful even when a particular route's diagnostic data cannot be represented.
The
KotlinxArgumentSourcethat encodes properties into Sentry arguments is reviewed separately in #6751 (Part 4); this PR wires it into the mapper.💡 Motivation and Context
Let's host apps that want to serialize back stack entry names and properties easily do so.
addresses: JAVA-787 (link)
See the "Callouts" section in #6703 for a discussion of why I exposed the built-in mappers as properties rather than methods.
💚 How did you test it?
Nav3 release build and unit tests passed. Repository-wide
make format api, Spotless checks, ABI validation, and Detekt passed. The full suite also passed against serialization 1.13.0.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Continue with Part 6: Demonstrate the built-in mappers.