Conversation
Show total framework JS weight as a round badge in the debug bar. Clicking opens a panel listing bootstrap, island entries, and shared chunks with individual sizes — scoped to the current page's rendered islands.
Contributor
Mochi review reportTry this PRExpand instructionsgh run download -R khromov/mochi 26419797109 -n mochi-framework-pr -D /tmp/mochi-pr && bun i /tmp/mochi-pr/mochi-framework-pr.tgzLines of code (non-blank lines) packages/mochi
Unchanged: packages/docs
Unchanged: packages/site
Unchanged: packages/demos
Unchanged: packages/minimal
Unchanged: packages/cli
Unchanged: |
b792fc5 to
457dc6b
Compare
Each bundle row in the JS panel is now expandable to show the source files that contributed bytes (from Bun's metafile inputs). Entries that import shared chunks show the effective size (transitive closure of chunk deps) alongside the raw shim size, with chunk dependency pills listing each imported chunk and its size.
Truncated file paths in the bundle inputs list can now be clicked to expand to full multiline view with highlighting. The path is copied to clipboard on click. Click again to collapse.
Strip leading ../ segments, node_modules/, and Bun's .bun/<pkg>+<hash>/node_modules/ from displayed paths for readability. Full path is still copied to clipboard on click.
Merged
khromov
pushed a commit
that referenced
this pull request
May 26, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>mochi-framework: 0.4.0</summary> ## [0.4.0](mochi-framework-v0.3.2...mochi-framework-v0.4.0) (2026-05-26) ### Features * make url export isomorphic (server + client) ([#47](#47)) ([11bbbe6](11bbbe6)) * per-page JS bundle panel in debug bar ([#42](#42)) ([7eba984](7eba984)) ### Bug Fixes * resolve Svelte 5 state warnings and add autofixer tooling ([#49](#49)) ([3d949a5](3d949a5)) ### Performance * consolidate per-request HTML passes in renderComponent ([#36](#36)) ([285a87f](285a87f)) * reduce server island runtime by ~80% (8.59kB → 1.91kB ) ([#50](#50)) ([d570bc8](d570bc8)) </details> <details><summary>create-mochi: 0.2.3</summary> ## [0.2.3](create-mochi-v0.2.2...create-mochi-v0.2.3) (2026-05-26) ### Bug Fixes * remove redundant project name prompt from create-mochi ([#44](#44)) ([dfa3c95](dfa3c95)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Summary
48 KB); pages with no islands show a green0with a sparkle animationComponentRegistry.renderComponent()fromclientStatsand seeded viawindow.__mochi_debug.bundlesmochi-frameworkas a downloadable artifact with "Try this PR" install instructions in the review commentTest plan
bun run dev:site, open a page with islands — badge should show total JS size0with sparkle