Skip to content

Upgrade react-error-boundary from 3.1.4 to 6.1.2 - #502

Merged
cigamit merged 1 commit into
ctrliq:mainfrom
blaipr:feature/react-error-boundary-v5
Jun 24, 2026
Merged

Upgrade react-error-boundary from 3.1.4 to 6.1.2#502
cigamit merged 1 commit into
ctrliq:mainfrom
blaipr:feature/react-error-boundary-v5

Conversation

@blaipr

@blaipr blaipr commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

SUMMARY

Upgrade react-error-boundary from 3.1.4 to 6.1.2.

v6 drops the deprecated useErrorHandler hook (renamed to useErrorBoundary in v4, removed in v5). Our only usage is the ErrorBoundary component with FallbackComponent in App.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

  • Bug, Docs Fix or other nominal change

COMPONENT NAME

UI

ASCENDER VERSION

awx: 25.4.1.dev126+gebb3790da5

ADDITIONAL INFORMATION

All 552 test suites pass (2908 tests). No code changes — only package.json and package-lock.json.

Copilot AI left a comment

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.

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-boundary to ^6.1.2 (and related React/testing-library dependency updates).
  • Update React 18 app bootstrap (createRoot) and align tests to newer @testing-library/react APIs.
  • 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

Comment thread awx/ui/package.json
Comment thread awx/ui/package-lock.json
Comment thread awx/ui/src/setupTests.js
Comment thread awx/ui/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.js
Comment thread awx/ui/src/screens/Job/WorkflowOutput/WorkflowOutputGraph.js
Comment thread awx/ui/src/index.js Outdated
@blaipr
blaipr force-pushed the feature/react-error-boundary-v5 branch from ce3d21c to 1fa7588 Compare June 23, 2026 23:30
@blaipr

blaipr commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

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.

@cigamit

cigamit commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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.
@blaipr
blaipr force-pushed the feature/react-error-boundary-v5 branch from 1fa7588 to 75bbb0a Compare June 24, 2026 08:21
@blaipr

blaipr commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main (includes PR #501 React 18 merge). Clean single commit, no conflicts. Ready to merge.

@cigamit
cigamit merged commit 746d47a into ctrliq:main Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants