Skip to content

feat(android-nav3): [Android Nav3 4] Introduce SentryNavEffect - #6132

Merged
0xadam-brown merged 4 commits into
feat/sentry-nav3-effect-stackfrom
feat/sentry-nav3-effect-4-effect
Sep 28, 2026
Merged

0xadam-brown merged 4 commits into
feat/sentry-nav3-effect-stackfrom
feat/sentry-nav3-effect-4-effect

Conversation

@0xadam-brown

@0xadam-brown 0xadam-brown commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Android Nav3)


📜 Description

Introduce SentryNavEffect, the Compose-facing abstraction for Android Nav3. This is the key abstraction for milestone 1 of our Nav3 support. (Milestone 1 aims at parity with Nav2, including support of navigation where each entry in the back stack is interpreted as the currently visible screen).

This PR connects the observer layer from #6131 to Compose lifecycle and recomposition behavior.

💡 Motivation and Context

SentryNavEffect is the key abstraction this integration presents to host apps. Keeping it in its own PR makes the public-facing shape and lifecycle model reviewable on their own, even while the symbol remains internal for now.

addresses: JAVA-274

💚 How did you test it?

  • Unit tests
  • Manually via the (forthcoming) Nav3 sample app, including performance tests and macrobenchmarks
  • API compatibility verified against Google's official nav3 recipes.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

  • Nav3 sample app
  • Expose all ApiStatus.Experimental APIs publicly + add module README + CHANGELOG entry
  • sentry-docs instructions

#skip-changelog

⚠️ Merge this PR using a merge commit (not squash). This PR should merge into the observer branch first, then flow back down the chain.

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against f11a94d

@sentry

sentry Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.57.0 (1) release

⚙️ sentry-android Build Distribution Settings

@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-3-observer branch from 729cbc7 to a0704f7 Compare September 18, 2026 11:00
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch from 0111382 to f841761 Compare September 18, 2026 11:00

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f841761. Configure here.

Comment thread sentry-android-navigation3/build.gradle.kts
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-3-observer branch from a0704f7 to 6a2c118 Compare September 18, 2026 11:28
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch 2 times, most recently from 20d0b21 to e1498fd Compare September 18, 2026 12:22
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-3-observer branch from 9e615c3 to 7e1db9e Compare September 18, 2026 12:38
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch from e1498fd to cffd83e Compare September 18, 2026 12:38
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch from cffd83e to ef33ec7 Compare September 18, 2026 13:08
@ApiStatus.Experimental
@Composable
@Suppress("FunctionNaming")
internal fun <T : Any> SentryNavEffect(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be the main public API for our Nav3 integration – at least for milestone 1. (Milestone 1 aims at Nav2 parity, including support of navigation where each entry in the back stack is interpreted as the currently visible screen).

Marked as experimental b/c this will be made public in a follow-on to the current PR stack.

@0xadam-brown 0xadam-brown added the deep-dive PR needs a thorough review of design, behavior, and edge cases label Sep 18, 2026
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-3-observer branch from 56bd4d4 to fee0b6c Compare September 24, 2026 08:10
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch from 95e9b22 to 33771ca Compare September 24, 2026 08:10
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-3-observer branch from fee0b6c to acf57d4 Compare September 24, 2026 08:18
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch from 33771ca to 337d586 Compare September 24, 2026 08:18
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-3-observer branch from acf57d4 to b0cf97d Compare September 24, 2026 16:33
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch from 337d586 to 8751079 Compare September 24, 2026 16:33
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-3-observer branch from 28691f0 to 76a9013 Compare September 25, 2026 10:07
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch 2 times, most recently from ad04184 to 8a70c21 Compare September 25, 2026 12:50

@runningcode runningcode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I will approve to unblock but I think having someone more familiar with compose would also help.

@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch from 8a70c21 to 15d7842 Compare September 25, 2026 15:10
Base automatically changed from feat/sentry-nav3-effect-3-observer to feat/sentry-nav3-effect-stack September 25, 2026 15:42
Add the Compose-facing abstraction that binds Navigation 3 back stack changes to the observer layer. This establishes the integration’s primary API shape while keeping it internal until the rest of the sequence is ready to expose it.
…ffectTest

setLogger(logger) resolved to SentryOptions.getLogger() via the apply
receiver, setting the logger to its own default rather than a mock.
Nothing asserts on the logger, so the line was misleading dead code.
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch from cfa8248 to 2b40b9d Compare September 25, 2026 15:46
@0xadam-brown
0xadam-brown merged commit ecb6243 into feat/sentry-nav3-effect-stack Sep 28, 2026
27 checks passed
@0xadam-brown
0xadam-brown deleted the feat/sentry-nav3-effect-4-effect branch September 28, 2026 11:24
@0xadam-brown
0xadam-brown restored the feat/sentry-nav3-effect-4-effect branch September 28, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deep-dive PR needs a thorough review of design, behavior, and edge cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants