Upgrade react-error-boundary from 3.1.4 to 6.1.2 - #502
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the UI’s React ecosystem dependencies (including react-error-boundary) and includes several React 18 compatibility adjustments across app bootstrap, tests, and workflow graph rendering.
Changes:
- Bump
react-error-boundaryto^6.1.2(and related React/testing-library dependency updates). - Update React 18 app bootstrap (
createRoot) and align tests to newer@testing-library/reactAPIs. - Add additional guards/suppressions around workflow graph rendering and test-environment console noise.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| awx/ui/src/setupTests.js | Adjusts global test console-error handling (now suppresses additional React error output). |
| awx/ui/src/screens/WorkflowApproval/WorkflowApprovalList/useWsWorkflowApprovals.test.js | Switches act import to Testing Library. |
| awx/ui/src/screens/Template/WorkflowJobTemplateVisualizer/VisualizerGraph.js | Adds zoom/layout guards and wraps some d3 init/fit logic in try/catch. |
| awx/ui/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.test.js | Updates expected save payload to include identifier. |
| awx/ui/src/screens/Template/WorkflowJobTemplateVisualizer/Modals/NodeModals/NodeModal.js | Adds identifier to Formik initialValues. |
| awx/ui/src/screens/Organization/OrganizationEdit/OrganizationEdit.test.js | Consolidates act/screen/waitFor imports from Testing Library. |
| awx/ui/src/screens/Organization/OrganizationAdd/OrganizationAdd.test.js | Consolidates act/screen/waitFor imports from Testing Library. |
| awx/ui/src/screens/Login/Login.js | Refactors user-id verification/redirect logic to be idempotent under React 18 behavior. |
| awx/ui/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.js | Adds zoom/layout guards and wraps some d3 init/fit logic in try/catch. |
| awx/ui/src/index.test.js | Updates index bootstrap test to mock react-dom/client createRoot. |
| awx/ui/src/index.js | Switches to React 18 createRoot bootstrap. |
| awx/ui/src/components/Workflow/WorkflowStartNode.js | Adds guard to avoid rendering before node positions are available. |
| awx/ui/package.json | Bumps react-error-boundary and also updates React and Testing Library dependencies. |
| awx/ui/package-lock.json | Lockfile updates reflecting dependency bumps and transitive changes. |
Files not reviewed (1)
- awx/ui/package-lock.json: Generated file
ce3d21c to
1fa7588
Compare
|
All Copilot review comments addressed — the issues flagged here are inherited from the base PR #501 and have been fixed there (commit c0af29f). This branch has been rebased to pick up those fixes. The pnpm and PR-scope comments do not apply: this project uses npm, and this PR is intentionally stacked on #501. |
|
A few merge conflicts. Resolve that and this is ready to merge. |
v6 drops the v3 useErrorHandler hook (renamed to useErrorBoundary in v4, then removed in v5). Our only usage is the ErrorBoundary component with FallbackComponent in App.js, which is stable across all versions. v6 also narrows the React peer dependency to ^18 || ^19, aligning with the React 18 upgrade in PR ctrliq#501.
1fa7588 to
75bbb0a
Compare
|
Rebased onto main (includes PR #501 React 18 merge). Clean single commit, no conflicts. Ready to merge. |
SUMMARY
Upgrade
react-error-boundaryfrom 3.1.4 to 6.1.2.v6 drops the deprecated
useErrorHandlerhook (renamed touseErrorBoundaryin v4, removed in v5). Our only usage is theErrorBoundarycomponent withFallbackComponentinApp.js, which is stable across all versions. No code changes needed.v6 also narrows the React peer dependency to
^18 || ^19, aligning with the React 18 upgrade in PR #501.Depends on: #501
ISSUE TYPE
COMPONENT NAME
UI
ASCENDER VERSION
ADDITIONAL INFORMATION
All 552 test suites pass (2908 tests). No code changes — only
package.jsonandpackage-lock.json.