Repository navigation
perf(web): the browser panel's host loads in the desktop app only - #916
Merged
Merged
Conversation
The layer that holds every thread's browser pages, and this window's browser connection for agents, was imported by the app's root, so a browser tab and a phone downloaded and parsed about 70 KB of code they can never use: the web build has no <webview>. It is now a chunk the desktop app fetches as it starts. Startup code drops from 913,440 B to 890,863 B gzip (the entry chunk from 249,661 B to 227,551 B), which also gives the startup budget back its headroom. A desktop-window browser test checks the window still mounts the layer.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This was referenced Nov 14, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The problem
The layer that holds every thread's browser pages, and this window's browser connection for agents, was imported by the app's root and rendered only in the desktop app. So a browser tab and a phone downloaded and parsed about 70 KB of code they can never use: the web build has no
<webview>. It also left the startup code within about 1.5 KB of its size budget in CI.The fix
BrowserHostLayeris now a chunk of its own (lazyWithPreload), fetched by the desktop app as it starts and never by the web app. It sits under a plainSuspense, notOptionalChunk: the browser panel needs it, so a failure still shows.Measured locally (gzip):
The budget stays where it is, as headroom; its comment records the new measurement.
Checked
isElectronmocked) checks the window still loads and mounts the layer.vp fmt,vp lint,vp run typecheck.ThemeShareDialog.browser.tsx"sends the same share again after GitHub didn't answer" timed out clicking Share in the full local run, as it did in a full local run on an unrelated branch, and passes alone.Not checked
The real desktop app was not opened to try the browser panel.