Skip to content

Fix panel chunk re-split after lazy service clients#3946

Draft
koala73 wants to merge 1 commit into
mainfrom
codex/re-split-panel-chunks
Draft

Fix panel chunk re-split after lazy service clients#3946
koala73 wants to merge 1 commit into
mainfrom
codex/re-split-panel-chunks

Conversation

@koala73
Copy link
Copy Markdown
Owner

@koala73 koala73 commented May 28, 2026

Summary

  • lazy-initialize generated service clients in panel modules so panel evaluation no longer creates TDZ-prone cross-chunk singletons
  • split panel components into documented domain chunks with lazy panel-support, while routing static-entry shared code to preloadable app-shared
  • keep app-shell panel imports type-only/dynamic and strengthen chunk guard tests

Tradeoff

Validation

  • node --test tests/chunk-assignment.test.mjs
  • npm run typecheck
  • npm run build:full
  • production preview smoke at http://127.0.0.1:4173/: HTTP 200, no page errors, hasTdzReferenceError: false
  • verified dist/index.html no longer modulepreloads panels-* or panel-support, and the built main chunk has no static from "./panel-support..." import

Fixes #3944

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

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

Project Deployment Actions Updated (UTC)
worldmonitor Ready Ready Preview, Comment May 28, 2026 6:21am

Request Review

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.

Follow-up: re-split panel chunks after lazy service-client initialization

1 participant