Skip to content

Pin @a2ui/web_core <0.8.4 to prevent React TextField breakage#829

Merged
ava-cassiopeia merged 3 commits intogoogle:mainfrom
CopilotKit:fix-react-renderer-after-merge
Mar 12, 2026
Merged

Pin @a2ui/web_core <0.8.4 to prevent React TextField breakage#829
ava-cassiopeia merged 3 commits intogoogle:mainfrom
CopilotKit:fix-react-renderer-after-merge

Conversation

@lukasmoschitz
Copy link
Contributor

Summary

Fixes #810

Test plan

  • React renderer builds successfully
  • All 349 unit tests pass
  • 189/201 visual parity tests pass — 12 failures are pre-existing known issues (dateTimeInputTime, multipleChoice, video) documented in PARITY.md

cc @ditman @jacobsimionato

The Lit harness stopped rendering after the merge because:

1. @a2ui/markdown-it was pinned to ^0.0.1 (npm registry) which has a
   synchronous renderMarkdown(). After commit b904548 made
   MarkdownRenderer async, the Lit directive calls .then() on the
   result, causing "markdownRenderer(...).then is not a function".

   Fix: switch to file:../../markdown/markdown-it to stay in sync with
   the local source (now async, v0.0.2).

2. The React Vite dev server lazily discovers @a2ui/web_core subpath
   imports, triggering "optimized dependencies changed. reloading"
   mid-page-load which causes blank screenshots in Playwright.

   Fix: add web_core subpath imports to optimizeDeps.include so Vite
   pre-bundles them upfront.
web_core 0.8.4 renames TextField's `type` to `textFieldType`
(google#806). Pin until the React renderer is updated to
match (google#810).
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request pins the @a2ui/web_core dependency to prevent a breaking change in a patch release, which is a good immediate fix. It also includes updates to the visual parity test setup, switching to a local version of @a2ui/markdown-it and optimizing the Vite configuration. My feedback focuses on making the version pin for @a2ui/web_core more explicit to improve long-term maintainability.

},
"dependencies": {
"@a2ui/web_core": "^0.8.0",
"@a2ui/web_core": "<0.8.4",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While pinning the version to <0.8.4 correctly prevents the breaking change from being installed, it's a bit loose on the lower bound. The original ^0.8.0 indicated a reliance on at least version 0.8.0. To be more explicit and safe, consider combining both constraints. This ensures you get versions from 0.8.0 up to, but not including, the breaking change.

This is a good temporary fix, and as noted in the PR description, a follow-up to adapt to the breaking change in web_core would be the ideal long-term solution.

Suggested change
"@a2ui/web_core": "<0.8.4",
"@a2ui/web_core": ">=0.8.0 <0.8.4",

@ava-cassiopeia ava-cassiopeia merged commit 41ff38d into google:main Mar 12, 2026
8 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[react] TextField type renamed to textFieldType

2 participants