Skip to content

Conversation

@wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Jan 21, 2026

Related issues

Proposed Changes

PR #2307 removed electron-devtools-installer due to deprecated Electron APIs, replacing it with a custom implementation. However, this broke the automatic extension installation for new developers.

This PR takes a different approach by patching electron-devtools-installer to use the new Electron APIs (session.extensions.*) instead of the deprecated ones (session.*). This solution:

  • Eliminates deprecation warnings
  • Maintains automatic extension installation
  • Uses the well-tested and maintained electron-devtools-installer package
  • Applies the fix from upstream commit f8ec609 (not yet released)

Testing Instructions

  1. Start the app and confirm:
  • Extensions should install automatically
  • No deprecation warnings should appear in the console
  1. Verify extensions work:
  • Open DevTools (Cmd+Option+I / Ctrl+Shift+I)
  • Check for "Redux" tab (Redux DevTools)

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@wojtekn wojtekn requested a review from a team January 21, 2026 10:42
@wojtekn wojtekn self-assigned this Jan 21, 2026
@wpmobilebot
Copy link

wpmobilebot commented Jan 21, 2026

📊 Performance Test Results

Comparing 596195a vs trunk

site-editor

Metric trunk 596195a Diff Change
load 2883.00 ms 2864.00 ms -19.00 ms 🟢 -0.7%

site-startup

Metric trunk 596195a Diff Change
siteCreation 8087.00 ms 7122.00 ms -965.00 ms 🟢 -11.9%
siteStartup 3942.00 ms 3947.00 ms +5.00 ms 🔴 0.1%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

Copy link
Contributor

@bcotrim bcotrim left a comment

Choose a reason for hiding this comment

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

I was able to start the app without seeing any errors.
I am not sure if this was happening previously, but starting the app with devtools already opened doesn't show React DevTools.
I remember that previously we had this workaround: https://github.com/Automattic/studio/pull/1379/changes#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80R105
Maybe we still need that?

Image

Doing a refresh ( cmd + R) displays the React DevTools as expected

Image

package.json Outdated
},
"scripts": {
"prestart": "npm run cli:build",
"setup:devtools": "ts-node ./scripts/setup-dev-extensions.ts",
Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't find this file in the scripts folder.

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! It seems that the change from another PR slipped in. I removed this line.

@wojtekn
Copy link
Contributor Author

wojtekn commented Jan 21, 2026

Maybe we still need that?

That code was still there. I adjusted it, but I'm unsure if it helps - it still required me to run CMD+R to refresh it at least one. On subsequent runs, it shows without that refresh.

@bcotrim
Copy link
Contributor

bcotrim commented Jan 21, 2026

That code was still there. I adjusted it, but I'm unsure if it helps - it still required me to run CMD+R to refresh it at least one. On subsequent runs, it shows without that refresh.

Thanks for following up on that!
I can replicate the same behavior, but it also happens in trunk. Since the original goal of this PR is working I think we can address that issue as a follow-up, if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants