Skip to content

✨ Add view_update support to developer extension#4319

Merged
mormubis merged 3 commits into
mainfrom
adlrb/partial-view-extension
May 14, 2026
Merged

✨ Add view_update support to developer extension#4319
mormubis merged 3 commits into
mainfrom
adlrb/partial-view-extension

Conversation

@mormubis
Copy link
Copy Markdown
Contributor

Motivation

With the partial_view_updates experimental feature enabled, the SDK now emits view_update events alongside regular view events. Without this change, those events would silently appear in the extension as unstyled/unlabeled — no color, no description, just a raw JSON blob. Since view_update is the whole point of the feature, engineers debugging it need to see these events clearly.

Changes

Added a ViewUpdateDescription component that shows the document version, view name, and a count of changed fields in the event. The color map now recognizes view_update (same blue as view), and event sorting handles the optional date field that view_update carries per the schema.

Also fixed a pre-existing crash in getViewNamenew URL(relativeUrl) throws when the URL is a path like /home, which is common in SPAs. Wrapped it in a try/catch and fall back to the raw string.

Test instructions

  1. Enable the feature flag: datadogRum.init({ enableExperimentalFeatures: ['partial_view_updates'] })
  2. Open the Browser SDK developer extension
  3. Interact with the page to generate view updates
  4. Verify view_update events appear in blue with a description like View update v3 · /home · 2 fields changed

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

🤖 Generated with Claude Code

@mormubis mormubis changed the title ✨ Add view_update support to developer extension ✨ Add view_update support to developer extension Mar 13, 2026
@mormubis mormubis marked this pull request as ready for review March 13, 2026 11:02
@mormubis mormubis requested a review from a team as a code owner March 13, 2026 11:02
Copy link
Copy Markdown

@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: 41bbd47c2f

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

// Sort events chronologically
if (a.date !== b.date) {
return b.date - a.date
return (b.date ?? 0) - (a.date ?? 0)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep undated events out of epoch-based sort

Coercing missing timestamps to 0 makes any event without date sort as if it happened at Unix epoch, so view_update entries with omitted dates are pushed to the bottom and can be dropped by the slice(0, MAXIMUM_LOGGED_EVENTS) retention logic under normal traffic. This regresses the new view_update workflow because recent updates become hard to see or disappear entirely when date is absent.

Useful? React with 👍 / 👎.

Comment thread developer-extension/src/panel/components/tabs/eventsTab/eventRow.tsx Outdated
@cit-pr-commenter-54b7da
Copy link
Copy Markdown

cit-pr-commenter-54b7da Bot commented Mar 13, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 169.51 KiB 169.51 KiB 0 B 0.00%
Rum Profiler 5.97 KiB 5.97 KiB 0 B 0.00%
Rum Recorder 21.23 KiB 21.23 KiB 0 B 0.00%
Logs 54.70 KiB 54.70 KiB 0 B 0.00%
Rum Slim 127.85 KiB 127.85 KiB 0 B 0.00%
Worker 22.99 KiB 22.99 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0021 0.003 +42.86%
RUM - add action 0.0105 0.017 +61.90%
RUM - add error 0.0097 0.0156 +60.82%
RUM - add timing 0.0004 0.0008 +100.00%
RUM - start view 0.0092 0.0153 +66.30%
RUM - start/stop session replay recording 0.0007 0.0011 +57.14%
Logs - log message 0.0139 0.0221 +58.99%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 38.24 KiB 37.93 KiB -309 B
RUM - add action 64.64 KiB 68.31 KiB +3.68 KiB
RUM - add timing 36.73 KiB 38.55 KiB +1.82 KiB
RUM - add error 70.01 KiB 68.81 KiB -1.20 KiB
RUM - start/stop session replay recording 45.58 KiB 41.10 KiB -4.47 KiB
RUM - start view 483.88 KiB 484.40 KiB +539 B
Logs - log message 55.00 KiB 54.88 KiB -117 B

🔗 RealWorld

@datadog-prod-us1-3
Copy link
Copy Markdown

datadog-prod-us1-3 Bot commented Mar 13, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 0.00%
Overall Coverage: 76.96% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 60763a1 | Docs | Datadog PR Page | Give us feedback!

Comment thread developer-extension/src/panel/components/tabs/eventsTab/eventRow.tsx Outdated
Comment thread developer-extension/src/panel/hooks/useEvents/eventCollection.ts Outdated
@mormubis mormubis force-pushed the adlrb/partial-view-extension branch from 4255372 to 63abc77 Compare March 31, 2026 11:39
@mormubis mormubis requested a review from BenoitZugmeyer March 31, 2026 12:32
mormubis added 3 commits May 13, 2026 17:14
- eventRow.tsx: add view_update to event type color map
- eventRow.tsx: add ViewUpdateDescription component showing document version,
  view name, and count of changed fields
- eventRow.tsx: fix URL construction crash for relative URLs in getViewName
- eventCollection.ts: handle nullable date in compareEvents (view_update has
  optional date per ViewProperties schema)
@mormubis mormubis force-pushed the adlrb/partial-view-extension branch from 9380590 to 60763a1 Compare May 13, 2026 15:16
@mormubis mormubis merged commit ccda253 into main May 14, 2026
23 checks passed
@mormubis mormubis deleted the adlrb/partial-view-extension branch May 14, 2026 07:31
@github-actions github-actions Bot locked and limited conversation to collaborators May 14, 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