Skip to content

chore(APICP): revamp the portal UI with a scope-aware app shell - #3281

Open
ShavinAnjithaAlpha wants to merge 5 commits into
wso2:mainfrom
ShavinAnjithaAlpha:feat/apicp-portal-ui-rewamp
Open

chore(APICP): revamp the portal UI with a scope-aware app shell#3281
ShavinAnjithaAlpha wants to merge 5 commits into
wso2:mainfrom
ShavinAnjithaAlpha:feat/apicp-portal-ui-rewamp

Conversation

@ShavinAnjithaAlpha

Copy link
Copy Markdown
Contributor

Purpose

Revamp the API Control Plane portal's app shell so it reads and behaves like Bijira, and restructure the source tree around it. The sidebar, header and layout are the visible half; underneath, the scope model (organization → project → API) is made explicit in the route builders, the navigation registry and a new ScopeGate, so what the sidebar offers and what a page can actually render can no longer disagree.

Resolves https://github.com/wso2-enterprise/apim-saas/issues/2897, https://github.com/wso2-enterprise/apim-saas/issues/2907

App shell

Sidebar

  • Replaced per-scope sidebar headings with three divider-separated clusters: Place, API, and Global.
  • Added nested submenus for Test, Insights, Observability, and Manage, with active-child expansion and explicit navigation in the collapsed rail.
  • Made all items available at every scope via scope-less aliases, with ScopeGate resolving missing scope.
  • Made Overview scope-adaptive and highlighted across nested scopes.
  • Limited capability gating to API scope so API-level entry points remain accessible while an API is unloaded.

Header

  • Organization / Project / API switchers, each a new searchable SearchableComplexSelect (icon + primary/secondary rows, bounded trigger width, ellipsized option text) in place of the plain ComplexSelect.
  • Quick selectors (ProjectQuickSelector, APIQuickSelector) appear for the levels not yet selected, with their own loading/error states.
  • Step-back affordances: an inline clear button on the project and API switchers navigates back to organization / project level.
  • Options resolve displayName with a fallback to the handle, and keep the current value selectable before the list loads so the switcher never renders out of range.
  • All shell strings moved to react-intl (brand title, switcher labels, search / empty / no-results copy, notification tooltip, footer links, panel title).

Layout

  • Breadcrumbs moved inside PageContent (full width, Stack-spaced above the outlet) instead of floating above it, and now label from displayName.
  • Footer and notification-panel strings i18n'd.

Scope model, routes and gating

  • projectPath / apiPath builders with an explicit unresolved-scope marker. A null handle produces the page's scope-less alias by substituting a reserved select-scope segment (/organizations/acme/select-scope/apis) rather than dropping segments, which would make /organizations/acme/projects/apis read positionally as project apis, and would collide project Settings/Home with their organization-level equivalents.
  • ScopeGate renders a project/API picker in place of the page body until the route carries the scope the page needs, then navigates to the fully-scoped URL.
  • projectScopedPaths / apiScopedPaths / apiScopeSelectPaths generate both the route patterns AppRoutes registers and the match predicates the sidebar highlights on, from the same builder, the route table and the highlight can't drift apart. Submenu parents match only the aliases, so parent and child never both claim active.
  • ConsoleScopeProvider / ConsoleScopeContext now expose isProjectScope / isApiScope, projects and their error state, and API capabilities, typed against the generated resource clients (RestApi, Organization, Project) rather than hand-written domain types.
  • Runtime logs moved from project-wide observe/runtimelogs to API-scoped observability/logs.
  • New ComingSoon placeholder pages for Admin, API Insights, Compliance, Metrics, Alerts, Monetize, LifeCycle, API Console and API Chat, so every sidebar destination resolves to something.

Restructuring

  • src/features/*src/pages/appShell/appShellPages/* (apis, deploy, gateways, projects, organizations, observability, insights, manage, test, admin, settings), with each page's own components/ and utils/ subfolders.
  • src/features/authsrc/contexts/auth; features/billing/ProductActivationsrc/hooks; layouts → src/pages/appShell; src/pages/auth for login/callback.
  • API resource index modules added under src/api/resources/* (organizations, projects, restApis, apiKeys, gateways).
  • Project listing gains pagination, sorting and a reworked card grid; project forms moved onto Oxygen form controls.

Theme

  • AppThemeProvider wraps Oxygen's OxygenUIThemeProvider with a theme registry (AcrylicOrangeTheme), a dedicated emotion cache and CssBaseline.
  • Shared sx recipes (glassSurfaceSx, hairline, interactiveCardSx, stickyBottomBarSx) so surfaces stay consistent across pages.
  • Oxygen UI reference docs and authoring skills added under portals/api-control-plane/.claude/ (components, patterns, migration, theming + oxygen-component / oxygen-form / oxygen-layout / oxygen-migrate).

Documentation

N/A

Tests

  • New: AppSidebar.test.tsx, ScopeGate.test.tsx, paths.test.ts, useNavigationItems.test.tsx.
  • Expanded: navigationRegistry.test.ts (clusters, submenus, adaptive items, alias matching), ApiListPage.test.tsx, ProjectListPage.test.tsx, NewProjectDialog.test.tsx, apiCapabilities.test.ts.

Related

Test environment

  • Node.js 24.x (per engines in package.json), npm
  • Vite 5.0.11, TypeScript 5.8.3, React 19.2.3, react-intl 10.1.20
  • Vitest 2.1.8 on jsdom 25.0.1

- Restructure the pages, components, hooks and contexts.
- Restructure pages, components, hooks, and contexts
- Fix issues introduced by the restructuring
- Enhance project listing with pagination, sorting, and improved UI
- Add an index to the project API resource section
- Add form controls to project-related forms
- Temporarily make the app sidebar static
…ome restructuring

- Make the App Side Bar and Header consistent with the bijira.
- Updated projectPath and apiPath functions to manage unresolved project and API scopes.
- Refactored routes to utilize new path builders for project and API-level pages.
- Improved ConsoleScopeContext and ConsoleScopeProvider to handle new API capabilities and project management.
- Added ScopeGate component to manage access to pages based on selected scopes.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 153 files, which is 53 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b00920e-bc7e-4d25-9512-2a36714f9dea

📥 Commits

Reviewing files that changed from the base of the PR and between 44a453e and 3572c88.

⛔ Files ignored due to path filters (1)
  • portals/api-control-plane/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (153)
  • portals/api-control-plane/.claude/skills/apicp-ui/SKILL.md
  • portals/api-control-plane/CLAUDE.md
  • portals/api-control-plane/package.json
  • portals/api-control-plane/src/App.smoke.test.tsx
  • portals/api-control-plane/src/App.tsx
  • portals/api-control-plane/src/api/core/http.test.ts
  • portals/api-control-plane/src/api/core/http.ts
  • portals/api-control-plane/src/api/mocks/data.ts
  • portals/api-control-plane/src/api/mocks/handlers.ts
  • portals/api-control-plane/src/api/organizations/organizationClient.ts
  • portals/api-control-plane/src/api/platform/platformClient.test.ts
  • portals/api-control-plane/src/api/platform/platformClient.ts
  • portals/api-control-plane/src/api/projects/projectClient.ts
  • portals/api-control-plane/src/api/resources/apiKeys/index.ts
  • portals/api-control-plane/src/api/resources/applications/index.ts
  • portals/api-control-plane/src/api/resources/gatewayCustomPolicies/index.ts
  • portals/api-control-plane/src/api/resources/gateways/index.ts
  • portals/api-control-plane/src/api/resources/organizations/index.ts
  • portals/api-control-plane/src/api/resources/projects/index.ts
  • portals/api-control-plane/src/api/resources/projects/projects.hooks.ts
  • portals/api-control-plane/src/api/resources/restApis/index.ts
  • portals/api-control-plane/src/api/resources/secrets/index.ts
  • portals/api-control-plane/src/api/resources/subscriptionPlans/index.ts
  • portals/api-control-plane/src/api/resources/subscriptions/index.ts
  • portals/api-control-plane/src/components/ComingSoon.tsx
  • portals/api-control-plane/src/components/ConfirmDialog.tsx
  • portals/api-control-plane/src/components/cards/ApiCard.tsx
  • portals/api-control-plane/src/components/cards/ProjectCard.tsx
  • portals/api-control-plane/src/components/cards/ProjectsGrid.tsx
  • portals/api-control-plane/src/components/cards/SummaryCardSection.tsx
  • portals/api-control-plane/src/components/common/SearchableComplexSelect.tsx
  • portals/api-control-plane/src/contexts/auth/AuthProvider.test.tsx
  • portals/api-control-plane/src/contexts/auth/AuthProvider.tsx
  • portals/api-control-plane/src/contexts/auth/AuthStateContext.ts
  • portals/api-control-plane/src/contexts/auth/authConstants.ts
  • portals/api-control-plane/src/contexts/auth/authTypes.ts
  • portals/api-control-plane/src/extensions.tsx
  • portals/api-control-plane/src/features/apis/ApiDetailPage.tsx
  • portals/api-control-plane/src/features/apis/ApiListPage.test.tsx
  • portals/api-control-plane/src/features/manage/ManagePage.tsx
  • portals/api-control-plane/src/features/projects/NewProjectDialog.tsx
  • portals/api-control-plane/src/features/projects/ProjectListPage.test.tsx
  • portals/api-control-plane/src/features/projects/ProjectListPage.tsx
  • portals/api-control-plane/src/features/settings/GeneralSettingsPage.tsx
  • portals/api-control-plane/src/features/settings/SettingsLayout.tsx
  • portals/api-control-plane/src/hooks/ProductActivation.tsx
  • portals/api-control-plane/src/i18n/messages/en.json
  • portals/api-control-plane/src/layouts/AppHeader.tsx
  • portals/api-control-plane/src/layouts/AppSidebar.tsx
  • portals/api-control-plane/src/navigation/navigationRegistry.test.ts
  • portals/api-control-plane/src/navigation/navigationRegistry.tsx
  • portals/api-control-plane/src/navigation/navigationTypes.ts
  • portals/api-control-plane/src/navigation/useNavigationItems.test.tsx
  • portals/api-control-plane/src/navigation/useNavigationItems.ts
  • portals/api-control-plane/src/navigation/useSettingsTabs.tsx
  • portals/api-control-plane/src/pages/appShell/APIQuickSelector.tsx
  • portals/api-control-plane/src/pages/appShell/AppHeader.tsx
  • portals/api-control-plane/src/pages/appShell/AppLayout.tsx
  • portals/api-control-plane/src/pages/appShell/AppSidebar.test.tsx
  • portals/api-control-plane/src/pages/appShell/AppSidebar.tsx
  • portals/api-control-plane/src/pages/appShell/ProjectQuickSelector.tsx
  • portals/api-control-plane/src/pages/appShell/appLayoutConstants.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/admin/AdminPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/ApiCardGrid.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/ApiCreatePage.test.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/ApiCreatePage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/ApiDetailPage.test.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/ApiDetailPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/ApiListPage.test.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/ApiListPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/ApiListView.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/components/ApiCard.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/components/RestApiChips.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/AttachedPolicyList.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/AvailablePoliciesPanel.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/DocumentsTab.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/PolicyConfigDrawer.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/PolicyTab.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/RoutingTab.test.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/RoutingTab.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/SchemaField.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/backendDiscovery.test.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/backendDiscovery.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/components/SaveBar.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/developEdit.test.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/developEdit.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/policyDnd.test.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/develop/policyDnd.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/overview/ApiKeysPanel.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/overview/InvokeUrlPanel.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/overview/OverviewTab.test.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/overview/OverviewTab.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/overview/ProgressBanner.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/overview/ResourcesPanel.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/restApiDisplay.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/utils/apiCapabilities.test.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/apis/utils/apiCapabilities.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/deploy/DeployPage.test.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/deploy/DeployPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/deploy/GatewayDeploymentHistory.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/deploy/components/GatewayDeployCard.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/deploy/components/GatewayDeployEnvCard.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/deploy/components/GatewayDeploymentRow.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/deploy/components/GatewayDeploymentSelector.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/deploy/utils/gatewayDeployUtils.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/gateways/GatewayCreatePage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/gateways/GatewayDetailPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/gateways/GatewaysPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/gateways/components/CopyableCommand.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/gateways/gatewayEnvironments.test.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/gateways/gatewayEnvironments.ts
  • portals/api-control-plane/src/pages/appShell/appShellPages/gateways/gatewaysUi.css
  • portals/api-control-plane/src/pages/appShell/appShellPages/insights/CompliancePage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/insights/InsightsPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/manage/LifeCyclePage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/manage/MonetizePage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/observability/AlertsPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/observability/MetricsPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/observability/RuntimeLogsPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/organizations/ExploreMoreCard.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/organizations/OrganizationHomePage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/projects/NewProjectDialog.test.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/projects/NewProjectDialog.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/projects/ProjectHomePage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/projects/ProjectListPage.test.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/projects/ProjectListPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/projects/ProjectsGrid.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/settings/SettingsPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/system/SystemPages.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/test/ApiChatPage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/test/ApiConsolePage.tsx
  • portals/api-control-plane/src/pages/appShell/appShellPages/test/TestPage.tsx
  • portals/api-control-plane/src/pages/appShell/useFooterHeight.ts
  • portals/api-control-plane/src/pages/auth/AuthCallbackPage.tsx
  • portals/api-control-plane/src/pages/auth/LoginPage.tsx
  • portals/api-control-plane/src/routes/AppRoutes.settingsTab.test.tsx
  • portals/api-control-plane/src/routes/AppRoutes.tsx
  • portals/api-control-plane/src/routes/ProtectedRoute.tsx
  • portals/api-control-plane/src/routes/paths.test.ts
  • portals/api-control-plane/src/routes/paths.ts
  • portals/api-control-plane/src/scope/ConsoleScopeContext.ts
  • portals/api-control-plane/src/scope/ConsoleScopeProvider.tsx
  • portals/api-control-plane/src/scope/ScopeGate.test.tsx
  • portals/api-control-plane/src/scope/ScopeGate.tsx
  • portals/api-control-plane/src/scope/consoleRouteParams.ts
  • portals/api-control-plane/src/test/mockAuthState.ts
  • portals/api-control-plane/src/test/mockScope.ts
  • portals/api-control-plane/src/test/utils.tsx
  • portals/api-control-plane/src/theme/AppThemeProvider.tsx
  • portals/api-control-plane/src/theme/emotionCache.ts
  • portals/api-control-plane/src/theme/index.ts
  • portals/api-control-plane/src/theme/receipes.ts
  • portals/api-control-plane/src/theme/themes.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

useCreateApiKey,
useUpdateApiKey,
useRevokeApiKey,
} No newline at end of file

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.

Add one extra line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a fixed in commit 3572c88, review it.

@@ -0,0 +1,1431 @@
# Oxygen UI Component Reference

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.

Initiate a one skill based on this all like 'how to develop UI'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a fixed in commit 3572c88, review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants