Skip to content

feat(admin-ui): upgrade React to v19 and align codebase with modern React standards#2881

Merged
moabu merged 13 commits into
mainfrom
admin-ui-issue-2880
Jun 22, 2026
Merged

feat(admin-ui): upgrade React to v19 and align codebase with modern React standards#2881
moabu merged 13 commits into
mainfrom
admin-ui-issue-2880

Conversation

@faisalsiddique4400

@faisalsiddique4400 faisalsiddique4400 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

feat(admin-ui): upgrade React to v19 and align codebase with modern React standards (#2880)

Summary

This PR upgrades the Admin UI to React 19 and modernizes the codebase to align with the latest React recommendations and runtime behavior.

The work includes dependency upgrades, compatibility validation across the application, and incremental adoption of React 19 best practices where applicable. The objective is to keep the Admin UI aligned with the current React ecosystem while improving maintainability, performance, and future upgrade readiness.


Fix Summary

  • Upgraded React to v19
  • Upgraded React DOM to v19
  • Updated related dependencies and peer dependency constraints where required
  • Validated compatibility across Admin UI modules and plugins
  • Updated application code to align with React 19 standards and recommendations
  • Removed deprecated or legacy React patterns where applicable
  • Improved component implementations to follow modern React best practices
  • Updated shared utilities and application infrastructure for React 19 compatibility
  • Reviewed routing, state management, forms, and plugin integrations for upgrade readiness
  • Addressed TypeScript and linting issues surfaced during the upgrade process
  • Improved long-term maintainability and future framework upgrade support

Verification

npm install
npm run check:all
npm run build
npm run test:all

passes successfully.

  • Verified React 19 dependencies install successfully
  • Verified lint and type-check pass successfully
  • Verified production build completes successfully
  • Verified test suites pass successfully
  • Verified application startup and routing behavior
  • Verified plugin loading and navigation flows
  • Verified forms, dialogs, and data-management screens continue functioning correctly
  • Verified no regressions in core Admin UI workflows

🔗 Ticket

Closes: #2880

Summary by CodeRabbit

  • New Features

    • Implemented custom toast notifications with auto-dismiss, hover-pause, and theme-aware styling.
    • Added error boundary with crash UI displaying error details and action buttons.
    • Enhanced table sorting with toggle between ascending/descending order.
  • Bug Fixes

    • Improved window safety checks for server-side rendering contexts.
  • Refactor

    • Upgraded React to v19 with use() hook for context consumption.
    • Replaced third-party toast and table libraries with custom implementations.
    • Updated component props and context provider patterns.
  • Tests

    • Added test coverage for new toast, table, and error screen components.
  • Chores

    • Updated translations and dependencies; removed unused configuration patterns.

Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
…eact standards (#2880)

Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c340339c-d5d9-4615-b985-738ee4d2abd7

📥 Commits

Reviewing files that changed from the base of the PR and between abd587b and 07f2310.

📒 Files selected for processing (2)
  • admin-ui/app/i18n.ts
  • admin-ui/app/routes/Apps/Gluu/GluuNavBar.tsx
💤 Files with no reviewable changes (1)
  • admin-ui/app/routes/Apps/Gluu/GluuNavBar.tsx

📝 Walkthrough

Walkthrough

The admin-ui is upgraded from React 18 to React 19, migrating context consumption from useContext to use, provider JSX to direct context element rendering, and forwardRef to ref-in-props. react-toastify is replaced with a custom portal-rendered toast system backed by Redux. @material-table/core is removed, with SAML and Agama tables migrated to GluuTable. A new GluuErrorScreen fallback with global ErrorBoundary wiring replaces scattered component-level error boundaries.

Changes

Admin UI React 19 and platform refactoring

Layer / File(s) Summary
React 19 dependencies and build tooling cleanup
admin-ui/package.json, admin-ui/vite.config.ts, admin-ui/eslint.config.cjs, admin-ui/jest.config.ts, admin-ui/.markdownlint-cli2.cjs, admin-ui/app/layout/default.tsx, admin-ui/app/utils/regex.ts
Upgrades React/types to v19, removes react-toastify, @material-table/core, and date-fns resolver wiring; adds eslint-plugin-react-hooks rules; updates ignore patterns for lint/test/markdown config.
Context/provider API migration and ref-in-props wiring
admin-ui/app/context/theme/themeContext.tsx, admin-ui/app/components/BootstrapWrappers/..., admin-ui/app/components/Layout/..., admin-ui/app/components/SidebarMenu/..., admin-ui/app/components/*, admin-ui/app/routes/Apps/Gluu/Gluu{Dialog,Loader,Text,...}.tsx, admin-ui/plugins/...
Replaces useContext(X) with use(X), X.Provider with X as JSX element, Consumer render-prop with hook-based pattern, and forwardRef with ref-in-props across all theme/config context consumers.
Type-level alignment for React 19 JSX and cloneElement
admin-ui/app/components/Accordion/AccordionIndicator.tsx, admin-ui/app/components/Layout/LayoutNavbar.tsx, admin-ui/app/components/SidebarMenu/SidebarMenuItem.tsx, admin-ui/app/components/Wizard/Wizard.tsx, admin-ui/app/routes/Apps/Gluu/GluuAlert.tsx, admin-ui/app/routes/Apps/Gluu/types/GluuComponentPropsTypes.ts, admin-ui/plugins/auth-server/components/OidcClients/..., admin-ui/plugins/user-claims/...
Tightens ReactElement<{className?}> prop shapes, adds type JSX imports, and updates typed cloneElement calls across components and test helpers for React 19 compatibility.
Custom GluuToast implementation and Redux toast wiring
admin-ui/app/routes/Apps/Gluu/GluuToast.tsx, admin-ui/app/routes/Apps/Gluu/styles/GluuToast.style.ts, admin-ui/app/routes/Apps/Gluu/types/GluuToast.types.ts, admin-ui/app/routes/Apps/Gluu/__tests__/GluuToast.test.tsx, admin-ui/plugins/auth-server/components/Authentication/AgamaFlows/AgamaFlows.tsx, admin-ui/plugins/auth-server/components/ConfigApiProperties/components/..., admin-ui/plugins/smtp/components/SmtpForm.tsx, admin-ui/app/components/icons/index.ts
Replaces react-toastify with a portal-rendered toast component with per-toast timers, hover-pause, visibility-change pause, exit animations, and a CSS-in-JS style module; migrates all toast.error/toast.success call sites to dispatch(updateToast(...)).
GluuTable sorting updates and MaterialTable migration
admin-ui/app/components/GluuTable/GluuTable.tsx, admin-ui/app/components/GluuTable/GluuTable.style.ts, admin-ui/app/components/GluuTable/__tests__/GluuTable.test.tsx, admin-ui/plugins/auth-server/components/Authentication/AgamaFlows/AgamaProjectConfigModal.tsx, admin-ui/plugins/saml/components/WebsiteSsoIdentityBrokeringList.tsx, admin-ui/plugins/saml/components/WebsiteSsoServiceProviderList.tsx, admin-ui/plugins/saml/components/styles/WebsiteSsoList.style.ts, admin-ui/plugins/saml/helper/..., admin-ui/plugins/saml/__tests__/...
Removes null sort direction toggle and introduces headerCellSortable style; migrates SAML identity-broker and service-provider list pages and Agama project config modal from MaterialTable to GluuTable/GluuSearchToolbar with typed ColumnDef/ActionDef, client-side filtering, and pagination.
Global error boundary, crash handling, and error screen UI
admin-ui/app/utils/logUiCrash.ts, admin-ui/app/routes/Apps/Gluu/GluuErrorScreen.tsx, admin-ui/app/routes/Apps/Gluu/styles/GluuErrorScreen.style.ts, admin-ui/app/routes/Apps/Gluu/Tests/GluuErrorScreen.test.tsx, admin-ui/app/components/App/AppMain.tsx, admin-ui/app/routes/index.tsx, admin-ui/app/routes/Apps/Gluu/GluuErrorFallBack.tsx, admin-ui/app/routes/Apps/Gluu/GluuNavBar.tsx, admin-ui/app/routes/Apps/Gluu/GluuAppSidebar.tsx, admin-ui/app/routes/Apps/Profile/ProfilePage.tsx, admin-ui/app/utils/__tests__/logUiCrash.test.ts
Adds logUiCrash utility and GluuErrorScreen themed crash UI; wires ErrorBoundary at AppMain and route level with location-based reset; removes per-component ErrorBoundary wrappers from navbar, sidebar, and profile page; removes old GluuErrorFallBack.
External links constants and navigation route updates
admin-ui/app/constants/links.ts, admin-ui/app/constants/index.ts, admin-ui/app/helpers/navigation.ts, admin-ui/app/routes/Apps/Gluu/Gluu404Error.tsx
Introduces EXTERNAL_LINKS.SUPPORT constant; replaces ERROR_404 route with PROFILE and LOGOUT in ROUTES; updates the 404 page support link to use the external constant with target="_blank".
Localization message keys and i18n deduplication
admin-ui/app/locales/*/translation.json, admin-ui/app/i18n.ts, admin-ui/app/redux/api/axios.ts
Adds warning, info, back_to_home, support_portal, and crash-screen translation keys to all four locale files; replaces direct toast.warning in handleMissingKey with deduplicated Redux store dispatch; adds typeof window guard in axios URL detection.
User-management constants, country labels, and form helpers
admin-ui/plugins/user-management/common/Constants.ts, admin-ui/plugins/user-management/utils/claimLabelUtils.ts, admin-ui/plugins/user-management/utils/formValidationUtils.ts, admin-ui/plugins/user-management/components/UserEditPage.tsx, admin-ui/plugins/user-management/components/UserForm.tsx, admin-ui/plugins/user-management/components/UserClaimsViewPage.tsx, admin-ui/plugins/user-management/__tests__/...
Introduces STANDARD_FORM_FIELDS tuple and un-exports individual field constants; adds getCountryName lookup for commit-dialog display values; removes shouldDisableApplyButton/hasFormChanges helpers and their tests.
Compatibility defaults and test typing refinements
admin-ui/plugins/auth-server/components/AuthServerProperties/components/AuthServerPropertiesPage.tsx, admin-ui/plugins/auth-server/components/Ssa/components/AvailableCustomAttributesPanel.tsx, admin-ui/plugins/auth-server/components/AuthServerProperties/components/JsonPropertyBuilder.tsx, admin-ui/plugins/auth-server/components/ConfigApiProperties/components/JsonPropertyBuilderConfigApi.tsx, admin-ui/plugins/scripts/components/CustomScriptEditPage.tsx, admin-ui/plugins/fido/__tests__/...
Adds explicit empty-string fallbacks to useDeferredValue calls, relocates useMemo blocks before conditional returns for stable hook ordering, and tightens chart test mock element types.

Sequence Diagram(s)

sequenceDiagram
  rect rgba(173, 216, 230, 0.5)
    Note over FeatureComponent,DocumentBody: Custom Toast Flow
  end
  participant FeatureComponent
  participant ReduxStore
  participant GluuToast
  participant DocumentBody

  FeatureComponent->>ReduxStore: dispatch(updateToast(true, 'error', message))
  ReduxStore-->>GluuToast: showToast=true, type, message
  GluuToast->>GluuToast: create ToastItem, schedule auto-exit timeout
  GluuToast->>DocumentBody: createPortal(toast DOM with progress bar)
  DocumentBody->>GluuToast: onMouseEnter → pauseToast
  DocumentBody->>GluuToast: onMouseLeave → resumeToast
  DocumentBody->>GluuToast: close button → beginExit
  GluuToast->>GluuToast: mark exiting, call onClose, schedule removeToast
  GluuToast->>ReduxStore: dispatch(updateToast(false, 'success', ''))
Loading
sequenceDiagram
  rect rgba(255, 200, 180, 0.5)
    Note over Router,GluuErrorScreen: Global Error Boundary Flow
  end
  participant Router
  participant ErrorBoundary
  participant RoutedContent
  participant GluuErrorScreen
  participant logUiCrash

  Router->>ErrorBoundary: wrap AuthenticatedRouteSelector
  RoutedContent->>ErrorBoundary: wrap Suspense+Routes (resets on pathname change)
  ErrorBoundary->>logUiCrash: onError(error, info.componentStack)
  logUiCrash->>logUiCrash: logger.error + logger.trace structured payload
  ErrorBoundary->>GluuErrorScreen: render FallbackComponent with error prop
  GluuErrorScreen->>GluuErrorScreen: show crash title/message, back-to-home, support portal
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • GluuFederation/flex#2575: Both PRs rewrite WebsiteSsoIdentityBrokeringList.tsx and WebsiteSsoServiceProviderList.tsx table/search/pagination logic for SAML trust relationship management.
  • GluuFederation/flex#2713: Both PRs modify GluuTable.tsx sort/resize/header logic, with overlapping changes to sort-direction toggling and column header rendering.
  • GluuFederation/flex#2798: Both PRs modify the exported ROUTES constant in admin-ui/app/helpers/navigation.ts, adding and removing route entries in the same section.

Poem

🐇 A rabbit bounced up to React nineteen,
Swapped useContext for use — how clean!
Toasty portals now shimmer and glow,
No more toastify stealing the show.
Crash screens bloom where errors once hid,
And tables got GluuTable'd — oh yes they did! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat(admin-ui): upgrade React to v19 and align codebase with modern React standards' accurately summarizes the main change—upgrading React to v19 and modernizing the codebase.
Linked Issues check ✅ Passed The PR substantially fulfills issue #2880 requirements: React upgraded to v19, modern React features adopted (use hook replacing useContext, React.cloneElement typing improvements), codebase aligned with React 19 standards throughout components, utils, and plugins.
Out of Scope Changes check ✅ Passed All changes align with React 19 upgrade objectives. Toast refactoring replaces react-toastify with custom Redux-backed implementation (supporting upgrade), MaterialTable migration to GluuTable supports modernization, translation/localization updates and error boundary additions all support the upgraded architecture.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch admin-ui-issue-2880

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mo-auto mo-auto added comp-admin-ui Component affected by issue or PR kind-feature Issue or PR is a new feature request labels Jun 18, 2026
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{"name":"HttpError","status":500,"request":{"method":"PATCH","url":"https://api.github.com/repos/GluuFederation/flex/issues/comments/4739637823","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octokit.js/0.0.0-development octokit-core.js/7.0.6 Node.js/24","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":{"body":"<!-- This is an auto-generated comment: summarize by coderabbit.ai -->\n<!-- review_stack_entry_start -->\n\n[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/GluuFederation/flex/pull/2881?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)\n\n<!-- review_stack_entry_end -->\n<!-- This is an auto-generated comment: review in progress by coderabbit.ai -->\n\n> [!NOTE]\n> Currently processing new changes in this PR. This may take a few minutes, please wait...\n> \n> <details>\n> <summary>⚙️ Run configuration</summary>\n> \n> **Configuration used**: Organization UI\n> \n> **Review profile**: ASSERTIVE\n> \n> **Plan**: Pro\n> \n> **Run ID**: `754a8c54-5c0a-488a-8aa0-6c2c7953e65c`\n> \n> </details>\n> \n> <details>\n> <summary>📥 Commits</summary>\n> \n> Reviewing files that changed from the base of the PR and between 927ada57e10a9baa9e707c3c0b38131cf4b0315b and 06e7cf328febb712cfbaf4e36314704a51bdc27f.\n> \n> </details>\n> \n> <details>\n> <summary>📒 Files selected for processing (97)</summary>\n> \n> * `admin-ui/.markdownlint-cli2.cjs`\n> * `admin-ui/app/components/Accordion/AccordionIndicator.tsx`\n> * `admin-ui/app/components/BootstrapWrappers/index.tsx`\n> * `admin-ui/app/components/BootstrapWrappers/types.ts`\n> * `admin-ui/app/components/GluuDropdown/GluuDropdown.tsx`\n> * `admin-ui/app/components/GluuModalShell/GluuModalShell.tsx`\n> * `admin-ui/app/components/GluuPageContent/GluuPageContent.tsx`\n> * `admin-ui/app/components/GluuTable/GluuTable.style.ts`\n> * `admin-ui/app/components/GluuTable/GluuTable.tsx`\n> * `admin-ui/app/components/Layout/Layout.tsx`\n> * `admin-ui/app/components/Layout/LayoutContent.tsx`\n> * `admin-ui/app/components/Layout/LayoutNavbar.tsx`\n> * `admin-ui/app/components/Layout/withPageConfig.tsx`\n> * `admin-ui/app/components/LicenseScreens/ApiKey.tsx`\n> * `admin-ui/app/components/LicenseScreens/GenerateLicenseCard.tsx`\n> * `admin-ui/app/components/ModalLayer/ModalLayer.tsx`\n> * `admin-ui/app/components/Notifications/index.tsx`\n> * `admin-ui/app/components/SidebarMenu/SidebarMenu.tsx`\n> * `admin-ui/app/components/SidebarMenu/SidebarMenuItem.tsx`\n> * `admin-ui/app/components/Wizard/Wizard.tsx`\n> * `admin-ui/app/components/icons/index.ts`\n> * `admin-ui/app/context/theme/themeContext.tsx`\n> * `admin-ui/app/i18n.ts`\n> * `admin-ui/app/layout/default.tsx`\n> * `admin-ui/app/locales/en/translation.json`\n> * `admin-ui/app/locales/es/translation.json`\n> * `admin-ui/app/locales/fr/translation.json`\n> * `admin-ui/app/locales/pt/translation.json`\n> * `admin-ui/app/routes/Apps/Gluu/GluuAlert.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuAppSidebar.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuDialog.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuFormDetailRow.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuInlineInput.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuLoader.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuScriptErrorModal.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuSessionTimeoutDialog.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuText.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuToast.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/GluuUploadFile.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/LanguageMenu.tsx`\n> * `admin-ui/app/routes/Apps/Gluu/hooks/useNavbarTheme.ts`\n> * `admin-ui/app/routes/Apps/Gluu/styles/GluuToast.style.ts`\n> * `admin-ui/app/routes/Apps/Gluu/types/GluuComponentPropsTypes.ts`\n> * `admin-ui/app/routes/Apps/Gluu/types/GluuToast.types.ts`\n> * `admin-ui/app/routes/Apps/Profile/ProfilePage.tsx`\n> * `admin-ui/app/routes/Dashboards/DashboardPage.tsx`\n> * `admin-ui/app/routes/Pages/ByeBye.tsx`\n> * `admin-ui/app/routes/components/LogoThemed/LogoThemed.tsx`\n> * `admin-ui/app/styles/plugins/_react-toastify.scss`\n> * `admin-ui/app/styles/plugins/plugins.scss`\n> * `admin-ui/app/utils/ApiKeyRedirect.tsx`\n> * `admin-ui/app/utils/UploadSSA.tsx`\n> * `admin-ui/app/utils/regex.ts`\n> * `admin-ui/eslint.config.cjs`\n> * `admin-ui/jest.config.ts`\n> * `admin-ui/package.json`\n> * `admin-ui/plugins/auth-server/components/AuthServerProperties/components/AuthServerPropertiesPage.tsx`\n> * `admin-ui/plugins/auth-server/components/AuthServerProperties/components/JsonPropertyBuilder.tsx`\n> * `admin-ui/plugins/auth-server/components/Authentication/AgamaFlows/AgamaFlows.tsx`\n> * `admin-ui/plugins/auth-server/components/Authentication/AgamaFlows/AgamaProjectConfigModal.tsx`\n> * `admin-ui/plugins/auth-server/components/Authentication/AgamaFlows/__tests__/helpers/agamaTestUtils.tsx`\n> * `admin-ui/plugins/auth-server/components/Authentication/__tests__/helpers/authenticationTestUtils.tsx`\n> * `admin-ui/plugins/auth-server/components/ConfigApiProperties/__tests__/components/ConfigApiPropertiesForm.test.tsx`\n> * `admin-ui/plugins/auth-server/components/ConfigApiProperties/components/ConfigApiPropertiesForm.tsx`\n> * `admin-ui/plugins/auth-server/components/ConfigApiProperties/components/ConfigApiPropertiesPage.tsx`\n> * `admin-ui/plugins/auth-server/components/ConfigApiProperties/components/JsonPropertyBuilderConfigApi.tsx`\n> * `admin-ui/plugins/auth-server/components/OidcClients/components/ClientActiveTokenDetailPage.tsx`\n> * `admin-ui/plugins/auth-server/components/OidcClients/components/ClientActiveTokens.tsx`\n> * `admin-ui/plugins/auth-server/components/OidcClients/components/ClientAddPage.tsx`\n> * `admin-ui/plugins/auth-server/components/OidcClients/components/ClientEditPage.tsx`\n> * `admin-ui/plugins/auth-server/components/OidcClients/components/ClientLogoutPanel.tsx`\n> * `admin-ui/plugins/auth-server/components/Scopes/components/ScopeListPage.tsx`\n> * `admin-ui/plugins/auth-server/components/Ssa/__tests__/helpers/ssaTestUtils.tsx`\n> * `admin-ui/plugins/auth-server/components/Ssa/components/AvailableCustomAttributesPanel.tsx`\n> * `admin-ui/plugins/fido/__tests__/components/Metrics/ActivityBarChart.test.tsx`\n> * `admin-ui/plugins/fido/__tests__/components/Metrics/OnboardingTimeChart.test.tsx`\n> * `admin-ui/plugins/saml/components/WebsiteSsoIdentityBrokeringList.tsx`\n> * `admin-ui/plugins/saml/components/WebsiteSsoServiceProviderList.tsx`\n> * `admin-ui/plugins/saml/components/styles/WebsiteSsoList.style.ts`\n> * `admin-ui/plugins/saml/helper/index.ts`\n> * `admin-ui/plugins/saml/helper/tableUtils.tsx`\n> * `admin-ui/plugins/scripts/components/CustomScriptListPage.tsx`\n> * `admin-ui/plugins/smtp/components/SmtpForm.tsx`\n> * `admin-ui/plugins/user-claims/components/UserClaimsAddPage.tsx`\n> * `admin-ui/plugins/user-claims/components/UserClaimsEditPage.tsx`\n> * `admin-ui/plugins/user-claims/components/UserClaimsListPage.tsx`\n> * `admin-ui/plugins/user-claims/components/UserClaimsViewPage.tsx`\n> * `admin-ui/plugins/user-management/__tests__/helpers/userManagementTestUtils.tsx`\n> * `admin-ui/plugins/user-management/__tests__/utils/formValidationUtils.test.ts`\n> * `admin-ui/plugins/user-management/common/Constants.ts`\n> * `admin-ui/plugins/user-management/components/User2FADevicesModal.tsx`\n> * `admin-ui/plugins/user-management/components/UserEditPage.tsx`\n> * `admin-ui/plugins/user-management/components/UserForm.tsx`\n> * `admin-ui/plugins/user-management/components/UserList.tsx`\n> * `admin-ui/plugins/user-management/utils/claimLabelUtils.ts`\n> * `admin-ui/plugins/user-management/utils/formValidationUtils.ts`\n> * `admin-ui/vite.config.ts`\n> \n> </details>\n> \n> ```ascii\n>  __________________________________________________\n> < My OKRs are all about finding bugs in your code. >\n>  --------------------------------------------------\n>   \\\n>    \\   (\\__/)\n>        (•ㅅ•)\n>        /   づ\n> ```\n\n<!-- end of auto-generated comment: review in progress by coderabbit.ai -->\n\n<!-- finishing_touch_checkbox_start -->\n\n<details>\n<summary>✨ Finishing Touches</summary>\n\n<details>\n<summary>📝 Generate docstrings</summary>\n\n- [ ] <!-- {\"checkboxId\": \"7962f53c-55bc-4827-bfbf-6a18da830691\"} --> Create stacked PR\n- [ ] <!-- {\"checkboxId\": \"3e1879ae-f29b-4d0d-8e06-d12b7ba33d98\"} --> Commit on current branch\n\n</details>\n<details>\n<summary>🧪 Generate unit tests (beta)</summary>\n\n- [ ] <!-- {\"checkboxId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Create PR with unit tests\n- [ ] <!-- {\"checkboxId\": \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\", \"radioGroupId\": \"utg-output-choice-group-unknown_comment_id\"} -->   Commit unit tests in branch `admin-ui-issue-2880`\n\n</details>\n\n</details>\n\n<!-- finishing_touch_checkbox_end -->\n<!-- tips_start -->\n\n---\n\nThanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=GluuFederation/flex&utm_content=2881)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.\n\n<details>\n<summary>❤️ Share</summary>\n\n- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)\n- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)\n- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)\n- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)\n\n</details>\n\n\n<sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub>\n\n<!-- tips_end -->"},"request":{"retryCount":3,"signal":{},"retries":3,"retryAfter":16}}}

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@admin-ui/app/components/Accordion/AccordionIndicator.tsx`:
- Around line 21-31: The code unsafely casts open and closed parameters from
ReactNode to ReactElement before passing them to React.cloneElement in the
AccordionIndicator component, which will crash at runtime if a caller passes a
non-element node like a string or number. Fix this by either updating the type
definition in AccordionIndicatorProps to specify that open and closed should be
ReactElement instead of ReactNode, or by adding runtime guards using
React.isValidElement() to validate the values before calling cloneElement,
removing the unsafe type casts.

In `@admin-ui/app/routes/Apps/Gluu/GluuToast.tsx`:
- Around line 145-167: The current implementation in the useEffect uses a single
boolean flag pattern with updateToast that clears the toast state after reading
it, causing rapid consecutive updateToast calls to collapse and lose earlier
notifications. Replace the boolean latch approach with a queue-based Redux
contract by creating enqueueToast and dequeueToast actions instead of the
current updateToast pattern. Update the reducer to maintain a toast queue
instead of a single-slot boolean payload, modify the useEffect to depend on the
toast queue (not showToast), and process items from the queue by dequeuing them
after adding to the displayed toasts, ensuring all notifications are preserved
even when multiple updates occur rapidly.
- Around line 42-46: In the GluuToast component, the conditional logic for
rendering the toast message only checks if the type is 'success', causing all
other toast types (warning, info) to fall back to the error message when
normalizedMessage is empty. Replace the simple ternary operator that checks type
=== 'success' with a more comprehensive conditional that handles each toast type
separately and provides appropriate fallback messages for warning, info, and
error types using the t function with the corresponding message keys.

In
`@admin-ui/plugins/auth-server/components/ConfigApiProperties/__tests__/components/ConfigApiPropertiesForm.test.tsx`:
- Around line 12-13: The useAppDispatch mock in the '`@/redux/hooks`' mock
definition creates a new jest.fn() on each invocation, causing dispatch
assertions to fail after component rerenders since each call gets a different
mock instance. Create a single stable jest.fn() mock instance before the
jest.mock call and have useAppDispatch return that same instance consistently on
every call, ensuring dispatch calls can be reliably asserted regardless of
rerenders.

In
`@admin-ui/plugins/auth-server/components/ConfigApiProperties/components/ConfigApiPropertiesPage.tsx`:
- Around line 94-99: The catch block in the handleSubmit function is swallowing
the error after handling it locally. After logging the error, setting the error
message, and dispatching the toast notification, the error must be re-thrown to
propagate the failure back to the caller (ConfigApiPropertiesForm.submitForm).
This ensures the promise is rejected so the caller knows the save operation
failed and will not proceed with post-success cleanup actions like clearing the
patch state.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 754a8c54-5c0a-488a-8aa0-6c2c7953e65c

📥 Commits

Reviewing files that changed from the base of the PR and between 927ada5 and 06e7cf3.

📒 Files selected for processing (97)
  • admin-ui/.markdownlint-cli2.cjs
  • admin-ui/app/components/Accordion/AccordionIndicator.tsx
  • admin-ui/app/components/BootstrapWrappers/index.tsx
  • admin-ui/app/components/BootstrapWrappers/types.ts
  • admin-ui/app/components/GluuDropdown/GluuDropdown.tsx
  • admin-ui/app/components/GluuModalShell/GluuModalShell.tsx
  • admin-ui/app/components/GluuPageContent/GluuPageContent.tsx
  • admin-ui/app/components/GluuTable/GluuTable.style.ts
  • admin-ui/app/components/GluuTable/GluuTable.tsx
  • admin-ui/app/components/Layout/Layout.tsx
  • admin-ui/app/components/Layout/LayoutContent.tsx
  • admin-ui/app/components/Layout/LayoutNavbar.tsx
  • admin-ui/app/components/Layout/withPageConfig.tsx
  • admin-ui/app/components/LicenseScreens/ApiKey.tsx
  • admin-ui/app/components/LicenseScreens/GenerateLicenseCard.tsx
  • admin-ui/app/components/ModalLayer/ModalLayer.tsx
  • admin-ui/app/components/Notifications/index.tsx
  • admin-ui/app/components/SidebarMenu/SidebarMenu.tsx
  • admin-ui/app/components/SidebarMenu/SidebarMenuItem.tsx
  • admin-ui/app/components/Wizard/Wizard.tsx
  • admin-ui/app/components/icons/index.ts
  • admin-ui/app/context/theme/themeContext.tsx
  • admin-ui/app/i18n.ts
  • admin-ui/app/layout/default.tsx
  • admin-ui/app/locales/en/translation.json
  • admin-ui/app/locales/es/translation.json
  • admin-ui/app/locales/fr/translation.json
  • admin-ui/app/locales/pt/translation.json
  • admin-ui/app/routes/Apps/Gluu/GluuAlert.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuAppSidebar.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuDialog.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuFormDetailRow.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuInlineInput.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuLoader.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuScriptErrorModal.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuSessionTimeoutDialog.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuText.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuToast.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuUploadFile.tsx
  • admin-ui/app/routes/Apps/Gluu/LanguageMenu.tsx
  • admin-ui/app/routes/Apps/Gluu/hooks/useNavbarTheme.ts
  • admin-ui/app/routes/Apps/Gluu/styles/GluuToast.style.ts
  • admin-ui/app/routes/Apps/Gluu/types/GluuComponentPropsTypes.ts
  • admin-ui/app/routes/Apps/Gluu/types/GluuToast.types.ts
  • admin-ui/app/routes/Apps/Profile/ProfilePage.tsx
  • admin-ui/app/routes/Dashboards/DashboardPage.tsx
  • admin-ui/app/routes/Pages/ByeBye.tsx
  • admin-ui/app/routes/components/LogoThemed/LogoThemed.tsx
  • admin-ui/app/styles/plugins/_react-toastify.scss
  • admin-ui/app/styles/plugins/plugins.scss
  • admin-ui/app/utils/ApiKeyRedirect.tsx
  • admin-ui/app/utils/UploadSSA.tsx
  • admin-ui/app/utils/regex.ts
  • admin-ui/eslint.config.cjs
  • admin-ui/jest.config.ts
  • admin-ui/package.json
  • admin-ui/plugins/auth-server/components/AuthServerProperties/components/AuthServerPropertiesPage.tsx
  • admin-ui/plugins/auth-server/components/AuthServerProperties/components/JsonPropertyBuilder.tsx
  • admin-ui/plugins/auth-server/components/Authentication/AgamaFlows/AgamaFlows.tsx
  • admin-ui/plugins/auth-server/components/Authentication/AgamaFlows/AgamaProjectConfigModal.tsx
  • admin-ui/plugins/auth-server/components/Authentication/AgamaFlows/__tests__/helpers/agamaTestUtils.tsx
  • admin-ui/plugins/auth-server/components/Authentication/__tests__/helpers/authenticationTestUtils.tsx
  • admin-ui/plugins/auth-server/components/ConfigApiProperties/__tests__/components/ConfigApiPropertiesForm.test.tsx
  • admin-ui/plugins/auth-server/components/ConfigApiProperties/components/ConfigApiPropertiesForm.tsx
  • admin-ui/plugins/auth-server/components/ConfigApiProperties/components/ConfigApiPropertiesPage.tsx
  • admin-ui/plugins/auth-server/components/ConfigApiProperties/components/JsonPropertyBuilderConfigApi.tsx
  • admin-ui/plugins/auth-server/components/OidcClients/components/ClientActiveTokenDetailPage.tsx
  • admin-ui/plugins/auth-server/components/OidcClients/components/ClientActiveTokens.tsx
  • admin-ui/plugins/auth-server/components/OidcClients/components/ClientAddPage.tsx
  • admin-ui/plugins/auth-server/components/OidcClients/components/ClientEditPage.tsx
  • admin-ui/plugins/auth-server/components/OidcClients/components/ClientLogoutPanel.tsx
  • admin-ui/plugins/auth-server/components/Scopes/components/ScopeListPage.tsx
  • admin-ui/plugins/auth-server/components/Ssa/__tests__/helpers/ssaTestUtils.tsx
  • admin-ui/plugins/auth-server/components/Ssa/components/AvailableCustomAttributesPanel.tsx
  • admin-ui/plugins/fido/__tests__/components/Metrics/ActivityBarChart.test.tsx
  • admin-ui/plugins/fido/__tests__/components/Metrics/OnboardingTimeChart.test.tsx
  • admin-ui/plugins/saml/components/WebsiteSsoIdentityBrokeringList.tsx
  • admin-ui/plugins/saml/components/WebsiteSsoServiceProviderList.tsx
  • admin-ui/plugins/saml/components/styles/WebsiteSsoList.style.ts
  • admin-ui/plugins/saml/helper/index.ts
  • admin-ui/plugins/saml/helper/tableUtils.tsx
  • admin-ui/plugins/scripts/components/CustomScriptListPage.tsx
  • admin-ui/plugins/smtp/components/SmtpForm.tsx
  • admin-ui/plugins/user-claims/components/UserClaimsAddPage.tsx
  • admin-ui/plugins/user-claims/components/UserClaimsEditPage.tsx
  • admin-ui/plugins/user-claims/components/UserClaimsListPage.tsx
  • admin-ui/plugins/user-claims/components/UserClaimsViewPage.tsx
  • admin-ui/plugins/user-management/__tests__/helpers/userManagementTestUtils.tsx
  • admin-ui/plugins/user-management/__tests__/utils/formValidationUtils.test.ts
  • admin-ui/plugins/user-management/common/Constants.ts
  • admin-ui/plugins/user-management/components/User2FADevicesModal.tsx
  • admin-ui/plugins/user-management/components/UserEditPage.tsx
  • admin-ui/plugins/user-management/components/UserForm.tsx
  • admin-ui/plugins/user-management/components/UserList.tsx
  • admin-ui/plugins/user-management/utils/claimLabelUtils.ts
  • admin-ui/plugins/user-management/utils/formValidationUtils.ts
  • admin-ui/vite.config.ts
💤 Files with no reviewable changes (8)
  • admin-ui/app/styles/plugins/plugins.scss
  • admin-ui/plugins/saml/helper/tableUtils.tsx
  • admin-ui/app/styles/plugins/_react-toastify.scss
  • admin-ui/plugins/user-management/tests/utils/formValidationUtils.test.ts
  • admin-ui/plugins/user-management/utils/formValidationUtils.ts
  • admin-ui/app/layout/default.tsx
  • admin-ui/vite.config.ts
  • admin-ui/plugins/saml/helper/index.ts

Comment thread admin-ui/app/components/Accordion/AccordionIndicator.tsx Outdated
Comment thread admin-ui/app/routes/Apps/Gluu/GluuToast.tsx Outdated
Comment thread admin-ui/app/routes/Apps/Gluu/GluuToast.tsx
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
admin-ui/eslint.config.cjs (1)

21-22: ⚠️ Potential issue | 🟠 Major

Update ESLint React version to match the React 19 migration.

The settings.react.version is still set to "18" (Lines 21 and 46), mismatching the upgraded React runtime to version 19. This configuration mismatch can affect ESLint rule behavior and the react plugin's functionality.

Suggested fix
   settings: {
-    react: { version: '18' },
+    react: { version: '19' },
   },

Apply this change at Lines 21-22 and Lines 46-47.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@admin-ui/eslint.config.cjs` around lines 21 - 22, The settings.react.version
in the ESLint configuration is still set to "18" but the project has been
upgraded to React 19. Update the react.version property from "18" to "19" in
both occurrences within the settings object in eslint.config.cjs (at lines 21-22
and lines 46-47) to ensure ESLint's React plugin rules and behaviors are
configured for the correct React version.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@admin-ui/app/i18n.ts`:
- Around line 27-29: The dynamic import statement for the Redux store does not
have a rejection handler, which can result in unhandled promise rejections if
the chunk fails to load. Add a catch handler to the import promise chain in the
fire-and-forget async block (where import('`@/redux/store`').then is called) to
gracefully handle any import failures, such as logging the error or providing a
fallback behavior, rather than leaving the rejection unhandled.

In `@admin-ui/app/routes/Apps/Gluu/GluuNavBar.tsx`:
- Around line 85-87: Remove the Box element containing the GluuErrorBoundaryDemo
component from the GluuNavBar navbar. The GluuErrorBoundaryDemo component is a
test/demo component that intentionally throws errors to trigger crash screens,
which should not be exposed in production as it allows users to disrupt active
workflows. Simply delete the entire Box wrapper (className={classes.navbarItem})
along with the GluuErrorBoundaryDemo child component it contains.

In `@admin-ui/eslint.config.cjs`:
- Around line 71-77: The react-hooks/exhaustive-deps rule is missing from the
ESLint configuration in eslint.config.cjs. Add this rule to the configuration
alongside the other react-hooks rules like react-hooks/rules-of-hooks and
react-hooks/error-boundaries. Set it to 'error' to ensure dependency arrays in
useEffect, useMemo, and useCallback are properly maintained and prevent
stale-closure and effect bugs.

---

Outside diff comments:
In `@admin-ui/eslint.config.cjs`:
- Around line 21-22: The settings.react.version in the ESLint configuration is
still set to "18" but the project has been upgraded to React 19. Update the
react.version property from "18" to "19" in both occurrences within the settings
object in eslint.config.cjs (at lines 21-22 and lines 46-47) to ensure ESLint's
React plugin rules and behaviors are configured for the correct React version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0467612c-7e48-45cf-b634-3c596b858357

📥 Commits

Reviewing files that changed from the base of the PR and between d2763b0 and abd587b.

📒 Files selected for processing (28)
  • admin-ui/app/components/App/AppMain.tsx
  • admin-ui/app/constants/index.ts
  • admin-ui/app/constants/links.ts
  • admin-ui/app/helpers/navigation.ts
  • admin-ui/app/i18n.ts
  • admin-ui/app/locales/en/translation.json
  • admin-ui/app/locales/es/translation.json
  • admin-ui/app/locales/fr/translation.json
  • admin-ui/app/locales/pt/translation.json
  • admin-ui/app/redux/api/axios.ts
  • admin-ui/app/routes/Apps/Gluu/Gluu404Error.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuAppSidebar.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuErrorBoundaryDemo.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuErrorFallBack.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuErrorScreen.tsx
  • admin-ui/app/routes/Apps/Gluu/GluuNavBar.tsx
  • admin-ui/app/routes/Apps/Gluu/Tests/GluuErrorScreen.test.tsx
  • admin-ui/app/routes/Apps/Gluu/styles/GluuErrorScreen.style.ts
  • admin-ui/app/routes/Apps/Profile/ProfilePage.tsx
  • admin-ui/app/routes/index.tsx
  • admin-ui/app/utils/__tests__/logUiCrash.test.ts
  • admin-ui/app/utils/logUiCrash.ts
  • admin-ui/eslint.config.cjs
  • admin-ui/package.json
  • admin-ui/plugins/auth-server/components/AuthServerProperties/components/JsonPropertyBuilder.tsx
  • admin-ui/plugins/auth-server/components/ConfigApiProperties/components/ConfigApiPropertiesForm.tsx
  • admin-ui/plugins/auth-server/components/ConfigApiProperties/components/JsonPropertyBuilderConfigApi.tsx
  • admin-ui/plugins/scripts/components/CustomScriptEditPage.tsx
💤 Files with no reviewable changes (2)
  • admin-ui/app/routes/Apps/Gluu/GluuErrorFallBack.tsx
  • admin-ui/app/helpers/navigation.ts

Comment thread admin-ui/app/i18n.ts Outdated
Comment thread admin-ui/app/routes/Apps/Gluu/GluuNavBar.tsx Outdated
Comment thread admin-ui/eslint.config.cjs
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@moabu moabu merged commit 36df92f into main Jun 22, 2026
7 checks passed
@moabu moabu deleted the admin-ui-issue-2880 branch June 22, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-admin-ui Component affected by issue or PR kind-feature Issue or PR is a new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(admin-ui) Upgrade and the version of React and improve the code according to the upgrading standards

4 participants