chore(ui): unify monorepo on React 19#6584
Merged
Merged
Conversation
The ui/ workspaces pinned two React majors: docs on 19, console and website on 18. npm hoisted React 18 to the root and nested 19 under docs, so a root-hoisted React-18 component rendered by docs' React 19 crashed astro build, and the two @types/react copies disagreed and broke tsc. Hoist a single react/react-dom 19 at the root, drop the per-app pins, and bump @stripe/react-stripe-js to ^3.1.1 (the only dependency without React 19 support; keeps @stripe/stripe-js 4). Console code is migrated via types-react-codemod plus the inert string-to-boolean change. Fixes: #6583
tsc -b emits a declaration file for the composite openapi-ts.config.ts, but .gitignore only covered the vite.config.d.ts sibling, leaving the artifact tracked as untracked after every build.
|
Claude finished @luizhf42's task in 5m 42s —— View job Code Review CompleteReviewed 21 files across code quality, security, testing, language patterns, and architecture — no new issues found. The code looks good as-is. Key verifications:
If you push additional changes and want a new review, tag |
otavio
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Move every
ui/workspace onto a single React 19 major.react/react-domare now hoisted once at the workspace root, the per-app pins are removed, and the console source is migrated to React 19's type and runtime changes.Why
The monorepo pinned two React majors —
apps/docson^19,apps/consoleandapps/websiteon^18. Because npm workspaces hoist the most-shared version, React 18 landed at the root anddocsnested its own React 19, so a root-hoisted React-18 component rendered by docs' React 19react-dom/servercrashedastro build("Objects are not valid as a React child"), and the two@types/reactcopies disagreed (bigintinReactNode), breakingtsc. This blocked bringing@heroicons/reactintodocsand was a latent footgun for any pre-compiled React dependency used across the boundary. This executes Option B from the issue (move everything forward) rather than downgradingdocs.Closes #6583
Changes
react/react-dom/@types/react/@types/react-dom^19.1.0to the rootpackage.json; drop the redundantreact/react-dom/@typespins fromconsole,website, anddocsso all apps resolve one major.@stripe/react-stripe-js^2.8.0→^3.1.1— the only dependency without React 19 support. v3.1.x adds React 19 while still accepting@stripe/stripe-js@^4, so the existing@stripe/stripe-jspin is unchanged. Every other React-coupled dependency (@tanstack/react-query,zustand,react-router-dom,@tiptap/react,@heroicons/react,@fortawesome/react-fontawesome,@testing-library/react,@astrojs/react) already declares^19support.types-react-codemodfor the three breaking type categories — the removed globalJSXnamespace (JSX.Element→React.JSX.Element), callback refs that may no longer return a value, andRefObject<T>widening toRefObject<T | null>.inertfrom a string to a boolean attribute (inert={true}), which React 19 now requires — this also fixed three tests assertingclosest("[inert]")and silences a runtime warning that existed before.tsc -b-emittedopenapi-ts.config.d.ts, a pre-existing.gitignoregap the build surfaced (thevite.config.d.tssibling was already ignored).Testing
Run inside the
uicontainer:npm run build(all workspaces, includestsc -b),npm run lint -w @shellhub/console(0 errors), andnpm run test(console 2536, website 71, design-system 192, docs 15 — all pass). Manually smoke the billing card form (apps/console/src/components/billing/BillingPayment.tsx), the only consumer of the bumped Stripe package.