Skip to content

[0.85] Add Fast Refresh performance marker and unstable_fastRefreshComplete CDP event#56639

Open
motiz88 wants to merge 3 commits intofacebook:0.85-stablefrom
motiz88:pick-fast-refresh-complete-0.85
Open

[0.85] Add Fast Refresh performance marker and unstable_fastRefreshComplete CDP event#56639
motiz88 wants to merge 3 commits intofacebook:0.85-stablefrom
motiz88:pick-fast-refresh-complete-0.85

Conversation

@motiz88
Copy link
Copy Markdown
Contributor

@motiz88 motiz88 commented Apr 28, 2026

Summary

Cherry-pick of 2 commits from main plus a Metro dependency bump, adding:

  1. Fast Refresh performance marker (Add performance marker for Fast Refresh update (#56176) #56176) — adds a performance.mark('Fast Refresh - Update done') entry in the performance timeline when a Fast Refresh update completes, deduplicated by Metro's changeId.
  2. unstable_fastRefreshComplete CDP event (Add unstable_fastRefreshComplete CDP event (#56273) #56273) — emits a new experimental ReactNativeApplication.unstable_fastRefreshComplete CDP event to subscribed sessions, reusing the same changeId-based deduplication.
  3. Metro bump to ^0.84.3 — Metro 0.84.3 adds changeId to HMR update-done messages, which is required by both of the above for event deduplication.

Previously backported to 0.83-stable in #56399 (which included a Metro bump from 0.83.3 to 0.83.6 for the same reason).

Changelog:

[Internal]

Test Plan

  • CI

cc @huntie

huntie added 2 commits April 28, 2026 13:46
Summary:
Pull Request resolved: facebook#56176

NOTE: Resubmission of D84624705.

Adds a prominent vertical "Fast Refresh ⚛︎" marker entry in the performance timeline when a Fast Refresh update is complete.

Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D97486551

fbshipit-source-id: 4c70b674370bab06f02e8d356bbd2979c9686a44
Summary:
Pull Request resolved: facebook#56273

Adds a new, experimental `ReactNativeApplication.unstable_fastRefreshComplete` CDP event, emitted to subscribed active CDP sessions when a Fast Refresh update completes.

**Notes**

- As with D97486551, we reuse the `changeId` block in `HMRClient.js`, ensuring duplicate updates for the same change are not reported.

Changelog: [Internal]

Reviewed By: GijsWeterings, hoxyq

Differential Revision: D98493216

fbshipit-source-id: b0b81a210fb84873e9358aa5484038062f110103
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 28, 2026
@github-actions
Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

Metro 0.84.3 adds `changeId` to HMR `update-done` messages,
which is required by the `unstable_fastRefreshComplete` CDP
event and the Fast Refresh performance marker to deduplicate
events across multiple updates for the same file change.
@motiz88 motiz88 force-pushed the pick-fast-refresh-complete-0.85 branch from 01c3f73 to dce75e2 Compare April 28, 2026 15:50
@motiz88 motiz88 marked this pull request as ready for review April 28, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner Pick Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants