Skip to content

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

Open
0xadam-brown wants to merge 2 commits into
feat/sentry-nav3-effect-3-observerfrom
feat/sentry-nav3-effect-4-effect
Open

0xadam-brown wants to merge 2 commits into
feat/sentry-nav3-effect-3-observerfrom
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 95e9b22

@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
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.
@0xadam-brown
0xadam-brown force-pushed the feat/sentry-nav3-effect-4-effect branch from cffd83e to ef33ec7 Compare September 18, 2026 13:08
…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.
@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
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.

1 participant