Repository navigation
Conversation
Collaborator
|
This is a great idea! A lot of UI work is about to drop, but after that, this can be validated. Hopefully, it will flow smoothly! |
CG-8663
force-pushed
the
perf/split-desktop-bundle
branch
from
November 30, 2026 05:59
e17fbdb to
760e881
Compare
Author
|
Thank you. Rebased on main after the Files list and the viewer landed, so it merges cleanly again: 1,092 kB down to 789 kB now. Two new screens (Plugins, Transfers) were importing from Desktop.tsx and now use desktop/context. I will rebase again once the rest of the UI work is in, so it is ready when you want to validate it. |
CG-8663
force-pushed
the
perf/split-desktop-bundle
branch
from
December 5, 2026 10:02
760e881 to
d8b39be
Compare
App.tsx now loads Desktop with lazy(), like the other screens. That alone did nothing: other modules imported small pieces of Desktop.tsx (useDesktop, AppFrame), and AddFile and ImportDiskImage imported uploadOne from Files.tsx, which kept both files in the main bundle. Those pieces move to their own modules: - desktop/context.ts: DesktopApi, DesktopContext, useDesktop - desktop/AppFrame.tsx: AppFrame, useAppFrame and the app-window gates - fileUpload.ts: uploadOne and the chunked upload Main bundle on 4b99950: 1,092 kB / 336.7 kB gzip -> 789 kB / 239.8 kB gzip. Desktop is now its own 102 kB chunk, loaded only in the desktop layout, and Files its own 141 kB chunk. No behaviour change. test/bundle-split.test.mjs fails on main and guards against a static import pulling either file back in. Co-Authored-By: Chronara AI <info@chronara.io>
CG-8663
force-pushed
the
perf/split-desktop-bundle
branch
from
December 5, 2026 10:10
d8b39be to
57f4360
Compare
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.
What this changes
The first download gets smaller: the desktop shell and the Files screen are no longer part of the main bundle.
main(4b99950)App.tsxloadsDesktopwithlazy(), like the other screens. A phone never downloads it.Desktop.tsxandFiles.tsx. Those pieces move to their own modules:desktop/context.ts:DesktopApi,DesktopContext,useDesktopdesktop/AppFrame.tsx:AppFrame,useAppFrameand the app-window gatesfileUpload.ts:uploadOneand the chunked uploadNo behaviour change: the code is moved, not rewritten.
How you tested it
npm run typecheckandnpm run buildpass, rebased onmain(4b99950).test/bundle-split.test.mjsfails onmainand passes here. It stops a static import from pulling either file back into the main bundle. It passes withsigned-in-shell.test.mjs(7 of 7).test/api-proxy.test.mjs, on unchangedmaintoo), so the full run is the one GitHub does here.Anything to know
vite build. The main bundle is still over Vite's 500 kB warning; this is the first cut, not the last.Built with Chronara AI