Skip to content

⚗️ [RUM-13259] Add shadow DOM support for action selectors#4097

Merged
rgaignault merged 17 commits intomainfrom
romanG/selector-shadow-dom
Feb 23, 2026
Merged

⚗️ [RUM-13259] Add shadow DOM support for action selectors#4097
rgaignault merged 17 commits intomainfrom
romanG/selector-shadow-dom

Conversation

@rgaignault
Copy link
Contributor

@rgaignault rgaignault commented Jan 16, 2026

Motivation

Second part of shadow DOM support for actions. This PR adds selector generation for elements inside shadow DOM, using a /shadow/ marker to indicate shadow boundaries.
Follows up on the first PR that added action name support.

Changes

  • Generate selectors that cross shadow DOM boundaries with /shadow/ marker
  • Added unit tests for shadow DOM selectors
  • Added e2e tests for selector generation

These two pictures are coming from the same click with and without the parameter enabled. The selector is correct and more precise that's why the width and height are smaller.

Before

image

After

image

Selector query

image

Test instructions

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.

@rgaignault rgaignault requested a review from a team as a code owner January 16, 2026 14:13
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ccb1ca4218

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cit-pr-commenter
Copy link

cit-pr-commenter bot commented Jan 16, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 171.96 KiB 172.21 KiB +261 B +0.15%
Rum Profiler 4.67 KiB 4.67 KiB 0 B 0.00%
Rum Recorder 24.88 KiB 24.88 KiB 0 B 0.00%
Logs 56.29 KiB 56.29 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 127.73 KiB 127.99 KiB +261 B +0.20%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0086 0.005 -41.86%
RUM - add action 0.0267 0.0192 -28.09%
RUM - add error 0.0205 0.0164 -20.00%
RUM - add timing 0.0047 0.0033 -29.79%
RUM - start view 0.0159 0.0188 +18.24%
RUM - start/stop session replay recording 0.001 0.0009 -10.00%
Logs - log message 0.0215 0.0214 -0.47%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 25.94 KiB 27.19 KiB +1.25 KiB
RUM - add action 112.96 KiB 114.69 KiB +1.73 KiB
RUM - add timing 27.34 KiB 26.70 KiB -652 B
RUM - add error 115.92 KiB 116.44 KiB +528 B
RUM - start/stop session replay recording 25.90 KiB 25.37 KiB -548 B
RUM - start view 506.44 KiB 504.18 KiB -2.26 KiB
Logs - log message 46.62 KiB 45.31 KiB -1.31 KiB

🔗 RealWorld

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 16, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 83.87%
Overall Coverage: 77.18% (+0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a0385e1 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

Copy link
Contributor

@BeltranBulbarellaDD BeltranBulbarellaDD left a comment

Choose a reason for hiding this comment

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

Nice! Works perfectly with the html test
Looks good in the explorer UI too

Copy link
Contributor

@sethfowler-datadog sethfowler-datadog left a comment

Choose a reason for hiding this comment

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

LGTM!

@rgaignault
Copy link
Contributor Author

/to-staging

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Jan 26, 2026

View all feedbacks in Devflow UI.

2026-01-26 12:39:42 UTC ℹ️ Start processing command /to-staging


2026-01-26 12:39:50 UTC ℹ️ Branch Integration: starting soon, merge expected in approximately 0s (p90)

Commit 72be44cef8 will soon be integrated into staging-05.


2026-01-26 12:59:44 UTC ℹ️ Branch Integration: this commit was successfully integrated

Commit 72be44cef8 has been merged into staging-05 in merge commit 0debb8f7a3.

Check out the triggered pipeline on Gitlab 🦊

If you need to revert this integration, you can use the following command: /code revert-integration -b staging-05

gh-worker-dd-mergequeue-cf854d bot added a commit that referenced this pull request Jan 26, 2026
Integrated commit sha: 72be44c

Co-authored-by: rgaignault <roman.gaignault@datadoghq.com>
@rgaignault rgaignault merged commit 5b33bd5 into main Feb 23, 2026
21 checks passed
@rgaignault rgaignault deleted the romanG/selector-shadow-dom branch February 23, 2026 10:58
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants