Skip to content

perf(dashboard): reduce bundled font and diagram assets - #10034

Merged
Soulter merged 1 commit into
masterfrom
codex/dashboard-bundle-trim
Sep 10, 2026
Merged

Soulter merged 1 commit into
masterfrom
codex/dashboard-bundle-trim

Conversation

@Soulter

@Soulter Soulter commented Sep 10, 2026

Copy link
Copy Markdown
Member

The dashboard ships three copies of each KaTeX font face and forces Mermaid through its bundled UMD entry. Keep only WOFF2 font sources and let Vite resolve Mermaid's normal ESM entry so shared diagram modules can be bundled without the UMD duplication.

This PR is based directly on master. It does not depend on #10022 or #10023 and includes no PDF or workspace changes. No dependencies, diagram types, font glyphs, or CDN requirements are added or removed; browsers without WOFF2 support lose the legacy font fallback.

Validation

  • Clean frozen-lockfile installs and pnpm build passed before and after the change (including Vue/TypeScript checking).
  • With identical ZIP DEFLATE level 9 settings: 5,992,646 → 5,265,325 bytes, saving 710 KiB (12.1%). These are local master builds; CI uses different packaging settings.
  • All 19 KaTeX WOFF2 files are byte-for-byte unchanged. No KaTeX WOFF/TTF files remain, and all generated CSS asset references resolve.
  • The Mermaid ESM API and flowchart, sequence, class, state, ER, and pie parsers passed under both default and dark configurations in a DOM environment. Browser layout/visual testing was not run.
  • ruff format ., ruff check ., and git diff --check passed.

Summary by Sourcery

Reduce dashboard bundle size by eliminating redundant KaTeX font assets and Mermaid UMD duplication.

Enhancements:

  • Reduce dashboard bundle size by shipping only KaTeX WOFF2 font assets and resolving Mermaid through its standard ESM entry.

Build:

  • Update Vite asset processing to remove redundant KaTeX font formats and avoid Mermaid's bundled UMD entry.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@Soulter
Soulter merged commit c6eefb5 into master Sep 10, 2026
24 checks passed
@Soulter
Soulter deleted the codex/dashboard-bundle-trim branch September 10, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant