Files
hyperframes/packages
Miguel Angel Simon Sierra e9632ade66 perf(studio): defer the source editor and markdown preview off first paint
The studio shipped one eager entry chunk of 1,126,473 B gzip. CodeMirror and
the markdown renderer were the two largest blocks on that path and neither is
needed to paint the shell.

- React.lazy the source editor (@codemirror/*, @lezer/*) and the storyboard
  source view (marked, dompurify), copying the deferred-dependency shape of the
  mediabunny dynamic import in player/lib/mediaProbe.ts.
- Add LazyPanel: one Suspense + error boundary whose fallback fills the panel's
  slot (h-full w-full flex-1) so opening the editor cannot shift the layout, and
  whose rejected-chunk state renders a visible retry instead of a blank panel.
- manualChunks splits the React runtime and the remaining vendor code out of the
  app chunk so app-only deploys stop invalidating them for repeat visitors.
- tests/e2e/studio-bundle-budget.mjs gates the built artifact with no browser.
  It measures the entry module plus its modulepreloaded chunks, not the entry
  file alone: the entry file alone gzips to well under half the eager total and
  would report a false pass while the browser still downloads all of it.

The gate enforces a ratchet just above what we ship today and reports the gap to
the 600 KiB target every run. Closing that gap needs the Node-only AST stack
(@babel/parser, esprima, acorn, recast, ast-types) out of the browser bundle,
where it arrives through @hyperframes/sdk — outside this unit.
2026-08-03 22:02:33 -07:00
..
2026-08-02 21:57:19 -07:00
2026-08-02 21:57:19 -07:00
2026-08-02 21:57:19 -07:00