Update to react 19 - #5474
Merged
Merged
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. OpenSSF ScorecardScorecard details
Scanned Files
|
daniele-mng
force-pushed
the
update-to-react-19
branch
3 times, most recently
from
August 5, 2026 05:58
6bd1c81 to
931f1c4
Compare
daniele-mng
force-pushed
the
update-to-react-19
branch
from
August 6, 2026 11:17
931f1c4 to
ac6d3a5
Compare
daniele-mng
marked this pull request as ready for review
August 6, 2026 11:17
greenbonebot
enabled auto-merge (rebase)
August 6, 2026 11:17
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5474 +/- ##
==========================================
- Coverage 81.85% 81.82% -0.03%
==========================================
Files 1284 1284
Lines 33680 33688 +8
Branches 10027 10030 +3
==========================================
- Hits 27569 27566 -3
- Misses 5453 5462 +9
- Partials 658 660 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bjoernricks
approved these changes
Aug 6, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates the web frontend to React 19 (and corresponding @types/* packages) and applies a set of TypeScript/ref-typing adjustments plus test updates to align with React 19 + updated typings behavior.
Changes:
- Upgrade
react,react-dom,react-is, and React type packages to React 19 versions; update@greenbone/ui-lib. - Update ref-related typings/usages (e.g.,
RefObject<... | null>, callback refs) and element cloning typings. - Adjust unit tests to match updated React rendering / mock-call semantics and timing.
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/web/utils/Render.tsx | Ref utility tweaks for React 19 (notably setRef). |
| src/web/utils/tests/withTranslation.test.tsx | Test expectation updated for React 19 mock invocation behavior. |
| src/web/pages/vulnerabilities/dashboard/VulnerabilitiesHostsBarChart.tsx | svgRef prop type updated to allow null. |
| src/web/pages/reports/AuditReportDetailsContent.tsx | Removes a TS suppression around AuditThresholdPanel usage. |
| src/web/pages/reports/tests/ReportDetailsPage.test.tsx | Test timing/queries updated (waitFor, role-based readiness). |
| src/web/pages/reports/tests/AuditReportDetailsPage.test.tsx | Test timing/queries updated (waitFor, role-based readiness). |
| src/web/pages/policies/PoliciesComponent.tsx | Adds explicit props to PolicyDialog usage for typing compatibility. |
| src/web/pages/hosts/tests/HostComponent.test.tsx | Updates HostsDialog test render with newly-required/typed props. |
| src/web/pages/hosts/tests/Dialog.test.tsx | Updates HostsDialog tests with newly-required/typed props. |
| src/web/pages/audits/DetailsPage.tsx | Adds missing callback props to AuditComponent. |
| src/web/hooks/usePreviousValue.ts | Makes useRef initialization explicit for React 19 typings. |
| src/web/entity/tests/Tags.test.tsx | Updates EntityTags tests with required callbacks. |
| src/web/entities/tests/withEntitiesFooter.test.tsx | Test expectation updated for React 19 mock invocation behavior. |
| src/web/entities/tests/withEntitiesActions.test.tsx | Test expectation updated for React 19 mock invocation behavior. |
| src/web/components/tab/Tabs.tsx | Tightens cloneElement typing for React 19. |
| src/web/components/info-tip/ComponentWithInfoTip.tsx | Tightens slot typing and refactors slot.props access. |
| src/web/components/hover-card/ComponentWithHoverCard.tsx | Tightens slot typing and refactors slot.props access. |
| src/web/components/form/ToggleButton.tsx | Avoids onToggle collision with intrinsic HTML attribute typing. |
| src/web/components/form/Download.tsx | Ref callback made block-bodied (style/typing alignment). |
| src/web/components/dashboard/display/DataDisplay.tsx | Ref types updated to allow null. |
| src/web/components/chart/HostsTopologyChart.tsx | Callback ref updated to block-bodied (style/typing alignment). |
| src/web/components/chart/donut/Pie.tsx | Default destructuring values adjusted (likely for typing consistency). |
| src/web/components/chart/Donut.tsx | Ref wiring updated to align with ref typing changes. |
| src/web/components/chart/base/Tooltip.tsx | Ref object types updated to allow null. |
| src/web/components/chart/base/Line.tsx | Ref typing updated to allow null. |
| src/web/components/chart/base/Legend.tsx | LegendRef type updated to allow null. |
| package.json | React 19 + related dependency/version updates. |
| package-lock.json | Lockfile updates reflecting the dependency upgrades. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
573
to
577
| if (isFunction(rf)) { | ||
| (rf as React.RefCallback<TRef>)(ref); | ||
| } else if (isObject(rf) && isDefined(rf.current)) { | ||
| // @ts-expect-error | ||
| (rf as React.RefObject<TRef>).current = ref; | ||
| } |
Comment on lines
+63
to
66
| title: slotProps.title ? ( | ||
| <> | ||
| {slot.props.title} | ||
| {slotProps.title} | ||
| {infoTipElement} |
Comment on lines
+58
to
61
| title: slotProps.title ? ( | ||
| <> | ||
| {slot.props.title} | ||
| {slotProps.title} | ||
| {hoverCardElement} |
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
Update to react 19
Why
References
GEA-1998
Checklist