🎨 Gate view_update events behind datadogMode in developer extension#4622
🎨 Gate view_update events behind datadogMode in developer extension#4622mormubis wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c1c113bb0
ℹ️ 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".
| const visibleEvents = datadogMode | ||
| ? filteredEvents | ||
| : filteredEvents.filter((event) => !('type' in event && event.type === 'view_update')) |
There was a problem hiding this comment.
Filter hidden view updates out of facets
When datadogMode is off and partial view updates are enabled, this only removes view_update items from the returned events array; the unchanged facetRegistry still contains those events and is passed to EventsTabSide, which renders counts from facetRegistry.getFacetValueCounts(...). As a result, customers still see a view_update facet/count, and selecting it produces an empty list because the events are hidden afterward. The registry or events used for facets should be built from the same visibility set.
Useful? React with 👍 / 👎.
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 266234a | Docs | Datadog PR Page | Give us feedback! |
4c1c113 to
eadac27
Compare
thomas-lebeau
left a comment
There was a problem hiding this comment.
shouldn't this use "show only the last view Event"?
- if it's checked, the view update are merged into the view event.
- if it's no checked, then we show each view and view update events.
Then if we want we can hide this checkbox when in non-datadog mode.
we need to make sure to keep the compatibility with both mechanism (old view update and the new one)
3663d16 to
d37adda
Compare
d37adda to
266234a
Compare
@thomas-lebeau Updated! The "Show only the latest View event" checkbox now controls view_update visibility. When checked (default), only the latest view is shown, no view_updates. When unchecked, both show, but if a view_update exists for a specific document_version, the corresponding full view is skipped to avoid redundancy. The checkbox itself is hidden behind datadogMode. What do you think? |

Motivation
Follow-up from #4319.
view_updateevents are an implementation detail of partial view updates. Customers don't need to see them when debugging.The full
viewevent is still sent to the extension on every intermediate update viaRUM_EVENT_COLLECTED, so views stay up to date in the list.Changes
The "Show only the latest View event" checkbox now controls
view_updatevisibility:view_updateevents, no intermediate viewsview_updateexists for a specificview.id + document_version, the corresponding full view is skipped to avoid redundancyThe checkbox itself is hidden behind
datadogMode. Customers always get the default behavior.Known limitation: the facet sidebar counts
view_updateevents even when they are filtered from the list. This is a pre-existing limitation of how facet counts are computed from all collected events, not from the filtered set.Test instructions
partial_view_updatesexperimental feature and open the developer extensionview_updateevents don't appear,viewevents update normallyview_updatediffs appear, corresponding full views are hiddenChecklist