Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reload action (regression in #144) #153

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

huntie
Copy link
Member

@huntie huntie commented Feb 28, 2025

Summary

Fix reload behaviour for React Native targets. This regressed in the chromium/6613 sync (#144) due to stricter page reload logic.

It turns out, ResourceTreeModel is completely bypassed for Node/React Native targets, since they don't have Capability.DOM (and calling the the reloadPage method in this way is unpredictable behaviour). We now explicitly fork this logic for React Native.

Test plan

Reload (cmd + R)

  • Input cmd + R from anywhere in DevTools.
  • ✅ Successful app reload
Screen.Recording.2025-02-28.at.10.56.18.mov
  • This change maintains backwards compatibility with previous Local Storage data (if modifying settings, experiments, or other persisted client state).

Reload to profile

  • Navigate to React Profiler panel
  • Select "Reload to start profiling"
  • ✅ Successful app reload
Screen.Recording.2025-02-28.at.11.34.26.mov

Upstreaming plan

  • This commit should be sent as a patch to the upstream devtools-frontend repo. I've reviewed the contribution guide.
  • This commit is React Native-specific and cannot be upstreamed.

Copy link

@hoxyq hoxyq left a comment

Choose a reason for hiding this comment

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

Thanks!

@huntie huntie merged commit 97e9912 into facebook:main Feb 28, 2025
1 of 2 checks passed
@huntie huntie deleted the fix-reload-action branch February 28, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants