Skip to content

fix(ui-customization): upgrade Baseline UI to remove vulnerable Zod - #209

Open
MahmoudElsayad wants to merge 1 commit into
masterfrom
mahmoud/nov6-ui-zod-migration
Open

MahmoudElsayad wants to merge 1 commit into
masterfrom
mahmoud/nov6-ui-zod-migration

Conversation

@MahmoudElsayad

Copy link
Copy Markdown
Contributor

What

Upgrade the UI customization example from Baseline UI 0.45.8 to 3.9.0. Both lockfiles now resolve Zod 4.6.7, which fixes the remaining npm alert and pnpm alert from #208.

Baseline UI 3.9.0 passed the seven-day cooldown. The example compiles without source changes, and no Zod major override is needed. The SDK version and cooldown policy stay unchanged.

Validation

  • npm and pnpm production builds and the example's ESLint command pass. The pinned Node.js 24.19.0 toolchain regenerated the npm lockfile with the cooldown active.
  • The frozen pnpm install, all 16 dependency-policy tests, cooldown coverage, override synchronization, and targeted Biome formatting pass.
  • A Playwright browser run creates the first comment, adds another, saves with Enter, edits, deletes, and checks the count. It reports no page errors. The test adds the supported Comment toolbar item through a browser-only response override because the default toolbar omits it.

On November 6, 2026, both audits report zero high or critical findings. npm still reports four low and seven moderate findings; pnpm reports one low and one moderate finding. These are outside the Zod remediation. The builds still report dependency annotation and bundle-size warnings. An oversized malicious Zod payload was not tested.

Type

  • Update to existing content

Checklist

  • npm run format passes. Targeted formatting passes; the repository-wide rewrite was not run.
  • README/index updated where needed. Setup and navigation are unchanged.
  • Example has a README with a description and quick start.
  • The documented run command starts the example successfully.
  • No duplicate content.

@MahmoudElsayad MahmoudElsayad self-assigned this Nov 5, 2026
@MahmoudElsayad
MahmoudElsayad marked this pull request as ready for review November 5, 2026 23:12
@MahmoudElsayad
MahmoudElsayad requested review from a team as code owners November 5, 2026 23:12
"@baseline-ui/core": "^0.45.8",
"@baseline-ui/icons": "^0.45.8",
"@baseline-ui/tokens": "^0.45.8",
"@baseline-ui/core": "3.9.0",

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.

This upgrade breaks how the comment thread looks. I rendered it on master and on this branch. On this branch the card is dark, the counter text is blue, the editor shrinks to a small box with a resize handle, and the send button turns into a peach dashed square.

The cause is that the thread renders inside the viewer's shadow root, and this example's own Baseline UI CSS stays in the main page, so it never reaches the thread. The thread gets its styles from the copy of Baseline UI bundled inside @nutrient-sdk/viewer 1.15.1 (0.58.0). That only worked because 0.45.8 happened to generate the same class names as 0.58.0. 3.9.0 generates different ones, and the SDK's stylesheet gives some of them other meanings. For example, _1yep5z6g9 is background-inverse-strong there, which is why the card goes dark.

The Playwright check covered create, edit and delete, but not appearance, so it passed anyway. One way to fix it: move @nutrient-sdk/viewer to a release whose bundled Baseline UI matches the version pinned here, then compare a screenshot of the open thread with master.

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.

2 participants