Skip to content

perf(web): lazy-load DeductionPanel to exclude dompurify from web bundle#685

Merged
koala73 merged 1 commit intomainfrom
fix/lazy-load-deduction-panel
Mar 1, 2026
Merged

perf(web): lazy-load DeductionPanel to exclude dompurify from web bundle#685
koala73 merged 1 commit intomainfrom
fix/lazy-load-deduction-panel

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Mar 1, 2026

Summary

  • DeductionPanel is desktop-only (isDesktopApp guard) but was statically imported, pulling dompurify + marked into the web bundle unnecessarily
  • Converted to dynamic import() so Vite code-splits them into a separate chunk only loaded on desktop

Test plan

  • Web build: verify dompurify is not in the main JS bundle
  • Desktop app: verify DeductionPanel still loads and renders LLM analysis

DeductionPanel is desktop-only (guarded by isDesktopApp) but was
statically imported, pulling dompurify + marked into the web bundle.
Convert to dynamic import() so Vite code-splits them out of web builds.
@vercel
Copy link

vercel bot commented Mar 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Building Building Preview, Comment Mar 1, 2026 5:29pm
worldmonitor-finance Building Building Preview, Comment Mar 1, 2026 5:29pm
worldmonitor-happy Building Building Preview, Comment Mar 1, 2026 5:29pm
worldmonitor-startup Building Building Preview, Comment Mar 1, 2026 5:29pm

Request Review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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