Skip to content

perf(bundle): lazy-load Sentry and auth modules, adopt zod/mini on boot schemas - #182

Merged
wgordon17 merged 6 commits into
gordon-code:mainfrom
wgordon17:feat/site-modernization-pr5
Nov 4, 2026
Merged

wgordon17 merged 6 commits into
gordon-code:mainfrom
wgordon17:feat/site-modernization-pr5

Conversation

@wgordon17

@wgordon17 wgordon17 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add a deploy-safe pnpm bundle:report measurement script (rollup-plugin-visualizer scoped to the client Vite environment with .wrangler/deploy/config.json backup/restore) to track client chunk and module sizes.
  • Split URL/token scrubbers in sentry.ts from lazy SDK initialization in sentry-init.ts behind sentry-facade.ts with a 20-entry pre-init scrubbed error buffer and idle SDK load, removing @sentry/* from initial boot chunks and tree-shaking sentry-init to 87.75 KB raw / 29.91 KB gzip-9.
  • Defer authenticated-only Octokit/MCP initializers until sign-in with synchronous getClient() token sync, drop unauthenticated dashboard prefetching on /login, lazy-load the emoji map and CustomTabModal, and migrate boot-path schemas to zod/mini with dynamic settings-transfer imports (cutting initial boot JS from 367.33 KB raw / 116.65 KB gzip-9 to 182.26 KB raw / 58.50 KB gzip-9 and DashboardPage from 264.02 KB raw / 77.46 KB gzip-9 to 227.35 KB raw / 61.08 KB gzip-9).

@wgordon17
wgordon17 force-pushed the feat/site-modernization-pr5 branch from 8b85ccb to 1d85612 Compare November 3, 2026 13:36
Import only init and captureException in sentry-init.ts so Rolldown
tree-shakes unused Sentry integrations (cutting sentry-init from
411.05 KB raw / 136.33 KB gzip-9 to 87.75 KB raw / 29.91 KB gzip-9),
short-circuit expandEmoji before reading emojiVersion on colon-free
strings, and expand boot-path separation and unit test coverage.
@wgordon17
wgordon17 force-pushed the feat/site-modernization-pr5 branch from eb7a969 to 5cfc090 Compare November 3, 2026 23:21
@wgordon17
wgordon17 marked this pull request as ready for review November 4, 2026 20:24
@wgordon17
wgordon17 requested a review from a team November 4, 2026 20:24
@wgordon17
wgordon17 merged commit c63711d into gordon-code:main Nov 4, 2026
1 check passed
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