Repository navigation
feat(bundle): add comark-bundle, bundle size before and after from two builds - #426
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Latest result Merged cb97d67 directly: required checks passed and review threads were resolved. Final answersSession Merged cb97d67 directly: required checks passed and review threads were resolved. Resolved the merge conflict in aa31c48, preserving both bundle and issues-box documentation, and pushed the prepared base merge. All 38 bundle tests pass; repository lint passes with warnings. Historical review defects remain fixed, with no valid P0/P1 finding remaining. Hosted checks will validate the merged HEAD. Session Resolved the merge conflict in AGENTS.md, preserving both bundle and editor class prefixes, and pushed f1cd030. All 38 bundle/framework tests pass; repository lint passes with warnings. Used installed binaries after pnpm’s automatic install attempt hit a sandbox database restriction. No valid review findings remain; awaiting hosted checks and review automation. Session Resolved the merge conflict in AGENTS.md, preserving both bundle and editor class prefixes, and pushed f1cd030. All 38 bundle/framework tests pass; repository lint passes with warnings. Used installed binaries after pnpm’s automatic install attempt hit a sandbox database restriction. No valid review findings remain; awaiting hosted checks and review automation. Session Resolved the merge conflict in AGENTS.md, preserving both bundle and editor class prefixes, and pushed f1cd030. All 38 bundle/framework tests pass; repository lint passes with warnings. Used installed binaries after pnpm’s automatic install attempt hit a sandbox database restriction. No valid review findings remain; awaiting hosted checks and review automation. Session Resolved the merge conflict in AGENTS.md, preserving both bundle and editor class prefixes, and pushed f1cd030. All 38 bundle/framework tests pass; repository lint passes with warnings. Used installed binaries after pnpm’s automatic install attempt hit a sandbox database restriction. No valid review findings remain; awaiting hosted checks and review automation. Session Resolved the merge conflict in AGENTS.md, preserving both bundle and editor class prefixes, and pushed f1cd030. All 38 bundle/framework tests pass; repository lint passes with warnings. Used installed binaries after pnpm’s automatic install attempt hit a sandbox database restriction. No valid review findings remain; awaiting hosted checks and review automation. |
There was a problem hiding this comment.
Important
Three P1 defects affect the report's central promises: startup-entry inference can produce zero or inflated totals, Sonda source connections do not reliably describe emitted dependencies, and one unmapped helper hides otherwise available package attribution.
Reviewed changes — Reviewed the new comark-bundle package and its integration across the workspace.
- Build ingestion and comparisons: Folder compression, sourcemap attribution, Sonda reports, startup/lazy classification, and package changes.
- Rendering: Parse-time card and treemap construction, shared styles, and HTML, Vue, React, and Svelte renderers.
- Integration and documentation: Preset registration, linter diagnostics and Doctor pages, docs examples, generated fixtures, package metadata, and agent references.
- Validation: 854 tests passed, along with workspace typechecking, focused formatting/lint checks, and the package's strict Doctor check; additional reproductions used real Vite output and reports generated by published
[email protected].
gpt-6.1-sol(xhigh) | 𝕏
…entence for screen readers
There was a problem hiding this comment.
ℹ️ No new defects found in this commit. The existing P1 review threads remain unresolved, so this is not an approval.
Reviewed changes — Reviewed the rendering and documentation changes since 4d121c0.
- Replaced status-colored graphics with neutral bars, hatching, and treemap tiles while retaining the badge's status colors.
- Adjusted labels and accessible text by increasing label contrast and size and visually hiding the footer sentence; browser checks confirmed the sentence remains in the accessibility tree.
- Updated documentation and agent references to describe the revised visuals and screen-reader sentence.
- Verified focused behavior with 20 passing parser/framework tests, successful direct package builds and publint, stylesheet lint, and light/dark browser checks at desktop and phone widths. The workspace build command stopped at
error: could not lock config file .git/config: Read-only file system; direct builds bypassed that environment restriction.
gpt-6.1-sol(xhigh) | 𝕏
… import it back, and keep packages when a chunk has no map
…unt workers as lazy, and point the docs at the whole build
…ll a package removed when unmapped chunks could hold it
There was a problem hiding this comment.
Important
One new P1 regression remains: docs generation fails because the build-fixture reader is configured only for page parsing, not the other example consumers.
Reviewed changes — Reviewed f9c2d1a, the changes since the prior Pullfrog review at 70eeaa6.
- Restricted build inputs to output folders and removed Sonda ingestion and its fixtures.
- Corrected entry inference for lazy chunks that import back from startup, with an issue when no entry can be identified.
- Preserved partial sourcemap attribution and disclosed unmapped chunks instead of hiding all packages.
- Migrated documentation examples to build fixtures and installed their reader in the server-side page parser.
- Verified regressions and integration with 799 passing tests, workspace typechecking, direct package builds with publint, and the bundle package's strict Doctor check; reproduced the docs-generation failure locally and confirmed it in CI.
gpt-6.1-sol(xhigh) | 𝕏
…ode, and read worker paths from their chunk
… grew, one by one
There was a problem hiding this comment.
Important
The new attribution guard can still report an unchanged package as removed. Two additional edge cases affect compression-cache accuracy and worker classification.
Reviewed changes — Reviewed 78808c0 and c2993f2, the changes since the prior Pullfrog review at f9c2d1a.
- Reworked startup classification for dependencies shared by lazy pages and added worker-reference detection.
- Restricted default-layout inclusion to detected Nuxt builds and accepted an additional layout-import form.
- Added attribution uncertainty handling to package-change descriptions, comparison bars, and treemap tiles.
- Replaced compression-cache keys with content length plus a hash, and adjusted single-build footer visibility and treemap explanations.
- Updated documentation and configuration to recommend whole client-build folders and exclude generated fixture code from formatting and linting.
- Verified behavior and integration with 765 passing tests, workspace typechecking, focused lint, direct package builds with publint, the bundle package's strict Doctor check, and public-render reproductions.
gpt-6.1-sol(xhigh) | 𝕏
…g and in the gallery, and keep them out of the playground
There was a problem hiding this comment.
ℹ️ No new P0/P1 findings — one edge-case defect is detailed inline. The existing P1 docs thread remains open, so this is not an approval.
Reviewed changes — Reviewed the changes since f9c2d1a, including commits that arrived during this review, through 6968c8d.
- Refined startup inference to exclude dependencies shared by lazy pages and nested lazy imports.
- Added worker edges with root-relative and chunk-relative URL resolution.
- Restricted default-layout promotion to Nuxt builds and supported imports without a preload wrapper.
- Qualified package additions and removals using positive unmapped growth per chunk, including when another script shrinks.
- Replaced compression-cache content keys with compact length/hash keys and adjusted visible counts and treemap explanations.
- Updated documentation and diagnostics to recommend complete client builds, describe inference limitations, and exclude generated fixtures from formatting/linting.
- Verified focused behavior with 442 passing tests, package builds and publint, focused formatting/lint checks, and the bundle package’s strict Doctor check; reproduced the cache defect through the built public renderer.
gpt-6.1-sol(xhigh) | 𝕏
There was a problem hiding this comment.
ℹ️ No new defects found in this delta. Earlier P1 findings remain unresolved, so this is not an approval.
Reviewed changes — Reviewed the four commits since c2993f2, through 6968c8d.
- Extended nested lazy-chunk inference to trace dynamic-import chains back to their originating loaders, and documented the remaining graph ambiguity.
- Corrected relative worker paths to resolve against the referring chunk, with regression coverage for root-relative and chunk-relative URLs.
- Reworked attribution uncertainty around positive growth per unmapped chunk, with regressions for unchanged auxiliary scripts and unrelated unmapped chunks that shrink.
- Verified behavior and package checks with 33 passing parser/framework tests, additional public-render checks in both comparison directions, package builds with publint, focused formatting/lint checks, and the bundle package's strict Doctor check.
gpt-6.1-sol(xhigh) | 𝕏
… writes, and leave room for a package that shrank into unmapped code
There was a problem hiding this comment.
ℹ️ No new P0/P1 findings. The existing attribution and worker-recognition threads remain unresolved, so this is not an approval.
Reviewed changes — Reviewed the two commits since 6968c8d, through 518771d, including the fix that arrived during this review.
- Enabled build-fixture access for landing cards and gallery documents through a shared server-side plugin adapter.
- Excluded disk-only bundle examples from playground presets, editor cells, and links; verified both generated examples and the page parser.
- Replaced compression-cache keys with SHA-256 and verified that the previous colliding chunks retain distinct measurements.
- Expanded worker URL recognition for Vite’s coerced bases, nested URLs, and direct constructors, with regression coverage and checks against actual Vite output.
- Relaxed attribution uncertainty bounds and added regressions in both comparison directions for chunks that shrink while losing their maps.
- Verified integration with successful landing/gallery generation, 489 passing tests, workspace typechecking, focused formatting/lint checks, and direct package builds with publint.
pnpm buildstopped aterror: could not lock config file .git/config: Read-only file system; direct dependency-ordered builds bypassed that environment restriction.
gpt-6.1-sol(xhigh) | 𝕏
There was a problem hiding this comment.
ℹ️ No new P0/P1 findings. The existing P1 attribution thread remains unresolved, so this is not an approval.
Reviewed changes — Reviewed the changes since 6968c8d, including the additional fix commit that arrived during this review, through 518771d.
- Enabled fixture-backed docs previews for landing cards and the gallery, and excluded disk-only bundle examples from playground presets, links, and editing controls.
- Replaced compression-cache keys with SHA-256 and extended worker recognition to Vite’s coerced-base, nested relative-base, and direct-constructor output.
- Relaxed attribution uncertainty with a larger unmapped-growth allowance and added regressions for shrinking chunks in both comparison directions.
- Verified behavior and integration with 775 passing tests, workspace and docs typechecking, focused formatting/lint checks, package builds with publint, and the bundle package’s strict Doctor check. Full docs generation passed, including internal links across 437 pages and 496 playground states reached through 517 links; public-render checks confirmed the cache and worker fixes.
gpt-6.1-sol(xhigh) | 𝕏
comark-annotate
comark-badge
comark-bundle
comark-cards
comark-carousel
comark-cast
comark-charts
comark-chat
comark-chips
comark-cjk
comark-code
comark-code-notes
comark-colors
comark-comments
comark-critic
comark-deflist
comark-details
comark-diagrams
comark-diff
comark-embed
comark-fields
comark-figure
comark-file-tree
comark-footnotes
comark-git-graph
comark-github
comark-icon
comark-include
comark-keys
comark-links
comark-linter
comark-magic-move
comark-mark
markdown-it-to-comark
marked-to-comark
comark-mathml
comark-media
comark-metrics
migrate-to-comark
comark-outline
comark-properties
comark-qr
comark-quiz
comark-reading-time
remark-to-comark
comark-sources
comark-steps
comark-table
comark-tabs
comark-tests
comark-time
comark-ui
comark-xref
comark-zoom
commit: |
There was a problem hiding this comment.
✅ No new issues found; no P0/P1 findings remain.
Reviewed changes — Reviewed b5d9985, the substantive change since the prior Pullfrog review at 518771d; the intervening merge only brought in unrelated base-branch changes.
- Replaced compressed-size absence inference with an unknown-presence rule whenever the opposite build contains unmapped chunks, consistently covering the change sentence, bars, and treemap.
- Expanded regression coverage for dramatically shrinking unmapped chunks in both comparison directions, unchanged unmapped scripts, and confirmed additions/removals with complete maps.
- Updated package documentation to describe the revised attribution contract without relying on compressed-size bounds.
- Verified focused behavior with 38 passing parser/framework tests and 10 additional checks through the built public HTML API; package builds with publint, focused formatting/lint checks, and the bundle package's strict Doctor check also passed.
gpt-6.1-sol(xhigh) | 𝕏

Agents back performance PRs with whatever the build printed: a Vite log with sizes per file, or a hand-made table. Neither says what every page loads, and a script that sums "the entry and its static imports" misses what Nuxt's default layout loads through
import(), which every page that uses the layout still waits for.This adds
comark-bundle. The block reads the two builds itself, so there's nothing to paste:Each prop takes a build's client output folder. The block measures every chunk with gzip -9 and brotli 11, follows
import,import()and workers between chunks, and names packages from the sourcemaps. Every page is the entries (from Vite's manifest orindex.html, else guessed from the graph), their static imports, and Nuxt's default layout. The card shows that number with its change, one bar per build where what changed is marked in neutrals, and a treemap of the new build behind a native<details>. The change is also one sentence for screen readers, such as "Every page up 4.3 kB (79.0%): lodash removed; echarts, zrender moved into every page; lodash-es added".srcshows one build. No script.A package on one side only isn't called added or removed when the chunks without a sourcemap on the other side grew enough to hold it, so a lost sourcemap doesn't read as a removal.
It's registered in comark-ui's preset for HTML, Vue, React and Svelte, in comark-linter with COMARK4801 to 4809 and a doctor page each, in the docs rail and in the comark-ui skill. Like
tests, the preset reads no builds until it getsroot. The docs page renders its examples on the server from the package's test fixtures; the playground can't read builds.The design went through four rounds on a prototype canvas: a dense table, bars over a treemap, tabs, and this one.
New block, so the evidence is after only: the card on Drop
On two builds of a real Nuxt app without sourcemaps, about 240 chunks each, the first parse takes about 3.7 s, mostly brotli 11; it's cached per process after that. The tests use made-up builds that
packages/bundle/scripts/fixtures.mjswrites: a Vite build with sourcemaps but for one helper chunk, and a Nuxt build without.vp check,pnpm typecheck,lint:docsand the bundle, doctor and workspace tests pass.pnpm run doctorstops atcomark-git-graph, whose warnings are already onmain; the bundle package has no findings.Not in this PR: analyzer JSON reports (Sonda's graph is the source graph before tree-shaking, not the emitted chunks), CSS, and per-route numbers.