[DevTools][Protocol Manager] Fixed Protocol Monitor displaying CDP events as "(pending)" #200
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
CDP events pending doesn't make sense, since events can't be updated after they arrive (since they don't have an id anyway): https://github.com/ChromeDevTools/devtools-frontend/blob/3201a3630665afd30e0a879f4ebeae6fcc4f3806/front_end/panels/protocol_monitor/ProtocolMonitor.ts#L562-L587
Also, events are allowed to have no params based on:
The two events that caught my eye are:
Both are expected to be sent without params, however Chrome does send an empty object params for them.
I work on the DevTools branch for React Native-
https://github.com/facebook/react-native-devtools-frontend
We've omitted "params" for these events as per the CDP docs, resulting in "(pending)" displayed in the Protocol Monitor. We thought we made a mistake at first, but it turns out it's just the Protocol Monitor's UI.
Test plan
Upstreaming plan
devtools-frontend
repo following the contribution guide for Meta employees OR contribution guide.