Skip to content

✨ [RUM-17885] Enable Soft Navigation tracking behind the betaTrackSoftNavigations option - #5283

Merged
mormubis merged 5 commits into
mainfrom
adlrb/soft-navigation-beta
Nov 17, 2026
Merged

mormubis merged 5 commits into
mainfrom
adlrb/soft-navigation-beta

Conversation

@mormubis

@mormubis mormubis commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Soft Navigation shipped behind the soft_navigation experimental flag in #4966 and #5167, and we've been running it in the Datadog app. The flag is internal, so customers can't try it yet. #2696 asked for a beta while the API was still experimental. This replaces it with a beta init option so customers can opt in before it becomes the default, likely in v8.

Changes

betaTrackSoftNavigations is off by default and replaces the soft_navigation flag, same as betaEnableViewUpdates in #4833. It only applies to route_change views on browsers that support the API (Chrome 151+), other browsers keep the current behavior.

web-ui enables the flag through enableExperimentalFeatures. When it picks up this version, it needs to pass betaTrackSoftNavigations instead, like it does for betaEnableViewUpdates, or the experiment stops. Unknown experimental features are ignored, so nothing breaks.

The option is reported in configuration telemetry as beta_track_soft_navigations.

I synced the schemas with rum-events-format master to get beta_track_soft_navigations (DataDog/rum-events-format#463). The sync also pulls unrelated schema changes already on master (the unreal source, the message resource type, init_context and a few others). They're all additive.

The unit and E2E tests now go through the option.

Test instructions

  1. betaTrackSoftNavigations: true in your init config.
  2. Chrome 151+, click a button whose handler mutates the DOM and calls history.pushState.
  3. Check the route_change view event, view.performance.fcp and view.performance.lcp should be populated. Without the option, they aren't.
  4. With telemetrySampleRate and telemetryConfigurationSampleRate at 100, the configuration telemetry should report beta_track_soft_navigations: true.

Unit: yarn test:unit packages/browser-rum-core/src/domain/configuration packages/browser-rum-core/src/domain/view

E2E: yarn test:e2e -g "soft navigation"

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change. The existing soft navigation scenarios now use the option.
  • Updated documentation and/or relevant AGENTS.md file. JSDoc only, it shows up in the API reference under Beta. No docs page until it's the default.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum Salesforce 192.54 KiB 192.62 KiB +76 B +0.04% ✅
Rum 192.52 KiB 192.60 KiB +76 B +0.04% ✅
Rum Profiler 8.17 KiB 8.17 KiB 0 B 0.00% ✅
Rum Salesforce Profiler 8.17 KiB 8.17 KiB 0 B 0.00% ✅
Rum Salesforce Recorder 32.62 KiB 32.62 KiB 0 B 0.00% ✅
Rum Recorder 32.62 KiB 32.62 KiB 0 B 0.00% ✅
Logs 60.26 KiB 60.22 KiB -36 B -0.06% ✅
Rum Slim 148.45 KiB 148.53 KiB +86 B +0.06% ✅
Worker 24.23 KiB 24.23 KiB 0 B 0.00% ✅
Rum Shopify 223.58 KiB 223.66 KiB +76 B +0.03% ✅
Rum Shopify Profiler 8.17 KiB 8.17 KiB 0 B 0.00% ✅
Rum Shopify Recorder 4.85 KiB 4.85 KiB 0 B 0.00% ✅

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 78.01% (-0.10%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7c87601 | Docs | View more details | Give us feedback!

@mormubis
mormubis marked this pull request as ready for review November 16, 2026 08:22
@mormubis
mormubis requested a review from a team as a code owner November 16, 2026 08:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T09:55:32.346327Z 7c87601 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-16T09:57:12.585909Z 7c87601 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: PASS

More details

The beta option activates the existing soft-navigation path while preserving experimental-flag support, route-change restrictions, and browser-support checks. Configuration validation and telemetry serialization consistently include the new option.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 80a5253

@mormubis
mormubis marked this pull request as draft November 16, 2026 09:04
@mormubis
mormubis marked this pull request as ready for review November 16, 2026 09:54

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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.

Bits Code Review: PASS

More details

The beta option consistently controls soft-navigation tracking and configuration telemetry while retaining the browser-support and manual-metrics guards. Runtime validation remains limited by the missing Playwright Chromium executable.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 7c87601

@mormubis
mormubis merged commit 947a36d into main Nov 17, 2026
32 checks passed
@mormubis
mormubis deleted the adlrb/soft-navigation-beta branch November 17, 2026 12:04
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants