Skip to content

🐛 Update the view when the page becomes hidden - #5296

Draft
BeltranBulbarellaDD wants to merge 2 commits into
mainfrom
beltran.bulbarella/view-update-on-hidden
Draft

BeltranBulbarellaDD wants to merge 2 commits into
mainfrom
beltran.bulbarella/view-update-on-hidden

Conversation

@BeltranBulbarellaDD

@BeltranBulbarellaDD BeltranBulbarellaDD commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

running CI to find issues

`beforeunload` is not reliably fired on mobile (e.g. in-app browsers), so the exit flush carried the `time_spent` of the last view update. Also update the view on `visibilitychange:hidden`, unless a `beforeunload` update already ran for the same exit.
@cit-pr-commenter-54b7da

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

Copy link
Copy Markdown

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum Salesforce 192.62 KiB 192.76 KiB +145 B +0.07% ✅
Rum 192.60 KiB 192.74 KiB +145 B +0.07% ✅
Rum Salesforce Profiler 8.01 KiB 8.01 KiB 0 B 0.00% ✅
Rum Profiler 8.01 KiB 8.01 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.22 KiB 60.27 KiB +48 B +0.08% ✅
Rum Slim 148.53 KiB 148.66 KiB +132 B +0.09% ✅
Worker 24.23 KiB 24.23 KiB 0 B 0.00% ✅
Rum Shopify 223.66 KiB 223.80 KiB +145 B +0.06% ✅
Rum Shopify Profiler 8.00 KiB 8.00 KiB 0 B 0.00% ✅
Rum Shopify Recorder 4.85 KiB 4.85 KiB 0 B 0.00% ✅

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

✨ Unblock PR with BitsAI

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 2 Pipeline jobs failed

DDCI - DataDog/browser-sdk | check-staging-merge — 🔧 Needs a code fix, caused by this PR

View more details · View in DDCI

DataDog/browser-sdk | check-staging-merge

View more details · View in GitLab

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 75.00%
• Overall Coverage: 78.05% (-0.07%)

Useful? React with 👍 / 👎

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

Add the `update_view_on_hidden` experimental feature and only update the view on `visibilitychange:hidden` when it is enabled, to limit the extra batches sent to the intake.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant