Skip to content

Open DevTools after the renderer loads to fix the blank screen on a fresh config - #4512

Merged
bcotrim merged 1 commit into
trunkfrom
fix-blank-screen-from-early-devtools
Aug 12, 2026
Merged

Open DevTools after the renderer loads to fix the blank screen on a fresh config#4512
bcotrim merged 1 commit into
trunkfrom
fix-blank-screen-from-early-devtools

Conversation

@bcotrim

@bcotrim bcotrim commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Related issues

  • None — hit while running npm start against an empty DEV_CONFIG_DIR.

How AI was used in this PR

Claude Code reproduced the failure, isolated the trigger across fresh/seeded configs and both renderers, and wrote the fix. Reviewed and verified locally.

Proposed Changes

  • Starting Studio from source with a config that has no devToolsOpen (any fresh profile) opened a blank window. DevTools was attached before the first page load committed, which left the sandboxed renderer without its preload script — no window.ipcApi, so the renderer's bootstrap threw. DevTools now opens once the renderer has finished loading.
  • Hits both the agentic and classic renderers; it's a renderer-process level failure, not a UI bug.
  • Not user-facing: packaged builds compile the auto-open branch out and expose no way to open DevTools, so this is contributor-facing only.

Testing Instructions

  1. DEV_CONFIG_DIR=/tmp/studio-fresh npm start
  2. The app loads normally with DevTools open. On trunk the window is blank, the terminal logs Attempted to get the 'ipcNative' object but it was missing, and the console shows IPC API not available.
  3. Restart with an existing config to confirm DevTools still respects the saved open/closed state.

Pre-merge Checklist

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

@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing aa2748f vs trunk

app-size

Metric trunk aa2748f Diff Change
App Size (Mac) 1406.61 MB 1406.61 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk aa2748f Diff Change
load 1045 ms 1001 ms 44 ms ⚪ 0.0%

site-startup

Metric trunk aa2748f Diff Change
siteCreation 7513 ms 7571 ms +58 ms 🔴 0.8%
siteStartup 2869 ms 2867 ms 2 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@sejas sejas left a comment

Copy link
Copy Markdown
Member

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 refreshing it. I created a new site and it assigned the correct port. Thanks for the fix!

@bcotrim
bcotrim merged commit 8679acf into trunk Aug 12, 2026
14 checks passed
@bcotrim
bcotrim deleted the fix-blank-screen-from-early-devtools branch August 12, 2026 11:05
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.

3 participants