Skip to content

ci(strapi): guard admin singleton deps and design-system bundle - #26969

Closed
innerdvations wants to merge 1 commit into
developfrom
feat/ci/admin-singleton-gates
Closed

innerdvations wants to merge 1 commit into
developfrom
feat/ci/admin-singleton-gates

Conversation

@innerdvations

@innerdvations innerdvations commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Extends admin Vite resolve.dedupe and optimizeDeps.include with CodeMirror singleton modules (@codemirror/state, @codemirror/view, @uiw/react-codemirror) — belt-and-suspenders alongside the design-system bundle fix.
  • Adds a consumer-side unit test that audits the installed @strapi/design-system dist for inlined singleton markers and missing external imports (mirrors design-system bundle-contract.config.json).
  • Adds an e2e smoke test that opens the Complex Content JSON field edit view and asserts no CodeMirror duplicate-instance console errors.

Why is it needed?

#26951 — admin crashes when @strapi/design-system inlines @codemirror/state. Strapi-side dedupe and a dist audit catch regressions even when the bug originates upstream; the e2e test guards the JSON field UX path.

How to test it?

yarn workspace @strapi/strapi test:unit --testPathPattern="admin-vite-aliases|design-system-bundle-contract"
yarn test:e2e --domains content-manager -- tests/e2e/tests/content-manager/edit-view/json-input-edit-view.spec.ts

Merge order

Draft — unit test is expected to fail until @strapi/design-system is bumped to a release that includes strapi/design-system#2034 (externalized CodeMirror / react-virtual in dist).

Suggested sequence:

  1. Merge & release design-system fix (#2034)
  2. Bump @strapi/design-system in this monorepo
  3. Mark this PR ready and merge

Related issue(s)/PR(s)

Extend admin Vite dedupe/optimizeDeps for CodeMirror, audit installed
design-system dist in unit tests, and add JSON field e2e smoke coverage.
@trunk-io

trunk-io Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge   Static Badge

Failed Test Failure Summary Logs
JSON field edit view › editing a JSON field does not crash with duplicate CodeMirror instances The test failed because a specific link element was not found or visible within the timeout period. Logs ↗︎
JSON field edit view › editing a JSON field does not crash with duplicate CodeMirror instances The test failed because a specific link element was not found or visible within the timeout period. Logs ↗︎
JSON field edit view › editing a JSON field does not crash with duplicate CodeMirror instances The test failed because a specific link element was not found or visible within the timeout period. Logs ↗︎
JSON field edit view › editing a JSON field does not crash with duplicate CodeMirror instances The test failed because a specific link element was not found or visible within the timeout period. Logs ↗︎

... and 2 more

Flaky Test Failure Summary Logs
Blocks editor › adds a code block and specifies the language The test failed due to a timeout while trying to click a toolbar element, likely because the element was not visible or was detached from the DOM. Logs ↗︎

View Full Report ↗︎ ⋅ Docs

@innerdvations

Copy link
Copy Markdown
Contributor Author

Superseded by #27064

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