Skip to content

Enterprise login UI#9671

Open
bhagyasakalanka wants to merge 7 commits intowso2:masterfrom
bhagyasakalanka:enterprise-login-ui
Open

Enterprise login UI#9671
bhagyasakalanka wants to merge 7 commits intowso2:masterfrom
bhagyasakalanka:enterprise-login-ui

Conversation

@bhagyasakalanka
Copy link
Contributor

Purpose

Add UI for enteprise login feature.

Initially, we will only show a banner asking customers to contact us for configuration

image

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

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
📝 Walkthrough

Walkthrough

Adds an enterprise login UI: new ConsoleEnterpriseLogin React component, a conditional ConsoleSettings tab shown for paid non-sub-organization tenants, enum members for the tab, a dependency on @wso2is/admin.subscription.v1, a changeset, and i18n type + English translations for the enterprise login banner and tab label.

Changes

Cohort / File(s) Summary
Changeset & Package
/.changeset/long-clouds-watch.md, features/admin.console-settings.v1/package.json
Adds a changeset marking three packages as patch with summary "Add UI for enterprise login" and adds dependency @wso2is/admin.subscription.v1 to the admin console-settings package.
New Component
features/admin.console-settings.v1/components/console-enterprise-login/console-enterprise-login.tsx
Adds ConsoleEnterpriseLogin React component rendering a localized informational banner with action button that opens a mailto using support email from Redux.
Console Settings Integration
features/admin.console-settings.v1/components/console-settings-tabs.tsx, features/admin.console-settings.v1/models/ui.ts
Adds ENTERPRISE_LOGIN to ConsoleSettingsModes and ConsoleSettingsTabIDs; inserts an enterprise-login tab that conditionally renders ConsoleEnterpriseLogin based on subscription tier and organization type.
i18n Types & Translations
modules/i18n/src/models/namespaces/console-settings-ns.ts, modules/i18n/src/translations/en-US/portals/console-settings.ts
Extends ConsoleSettingsNS with enterpriseLogin keys and adds English translations for enterpriseLogin.banner (title, description, action) and enterpriseLogin.tabLabel.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description fills only the Purpose section with minimal detail and a screenshot, but omits all other required template sections including Related Issues, Related PRs, and the mandatory Developer and Security checklists. Complete the description template by filling in all remaining sections: Related Issues, Related PRs, and all checklist items (testing, security, documentation). Mark items as N/A or provide details as applicable.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Enterprise login UI' directly and clearly describes the main change—adding a UI component for enterprise login functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Changeset Required ✅ Passed Pull request includes valid changeset file documenting all modified packages with appropriate patch version updates.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
features/admin.console-settings.v1/components/console-settings-tabs.tsx (1)

166-179: ⚠️ Potential issue | 🟠 Major

Add missing dependencies to consoleTabs memo to ensure Enterprise Login tab visibility updates correctly.

The memo at line 116 uses an empty dependency array while reading tierName, isLoginFlowEnabled, isSharedAccessDisabled, isSubOrganization, componentId, and t. Since tierName comes from the async useSubscription() hook, the memo won't recalculate when the subscription tier loads, keeping the Enterprise Login tab stuck in the wrong visibility state.

Fix
                !(isSubOrganization() || tierName === TenantTier.FREE) && {
                    className: "console-enterprise-login",
                    "data-componentid": `${componentId}-tab-enterprise-login`,
                    "data-tabid": ConsoleSettingsModes.ENTERPRISE_LOGIN,
                    hidden: false,
                    id: ConsoleSettingsModes.ENTERPRISE_LOGIN,
                    label: t("consoleSettings:enterpriseLogin.tabLabel"),
                    pane: <ConsoleEnterpriseLogin />,
                    value: ConsoleSettingsTabIDs.ENTERPRISE_LOGIN
                }
            ]
                .filter((tab: ConsoleSettingsTabInterface) => tab && !tab?.hidden)
                .map((tab: ConsoleSettingsTabInterface, index: number) => ({ ...tab, value: index })),
-        []
+        [ componentId, isLoginFlowEnabled, isSharedAccessDisabled, isSubOrganization, t, tierName ]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@features/admin.console-settings.v1/components/console-settings-tabs.tsx`
around lines 166 - 179, The memo computing consoleTabs (the useMemo that builds
the array including the ConsoleEnterpriseLogin tab) is missing dependencies so
it doesn't update when async values change; update the dependency array to
include tierName, isLoginFlowEnabled, isSharedAccessDisabled, isSubOrganization,
componentId and t so the memo recomputes when the subscription/toggle flags or
localization change; ensure the filter/map logic that references
ConsoleSettingsTabInterface, ConsoleSettingsModes and ConsoleSettingsTabIDs
remains unchanged and only the dependency list is adjusted.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@features/admin.console-settings.v1/components/console-enterprise-login/console-enterprise-login.tsx`:
- Around line 56-70: The CTA Button currently builds
href={`mailto:${supportEmail}`} and can render mailto:undefined when
supportEmail is missing; update the console-enterprise-login component to guard
this by checking the supportEmail value (from the supportEmail selector) and
either disable or omit the Button/action when supportEmail is falsy, or replace
href with a safe fallback (e.g., no href and disabled) so the Alert action never
links to mailto:undefined; ensure you modify the Alert action/Button rendering
logic in console-enterprise-login to reference supportEmail and adjust props
accordingly.

In `@features/admin.console-settings.v1/package.json`:
- Line 36: Replace the registry semver for the feature dependency
"@wso2is/admin.subscription.v1" with the workspace protocol; update its version
spec from "^1.5.205" to use "workspace:^1.5.205" (i.e., change the value for the
"@wso2is/admin.subscription.v1" dependency in package.json to start with
"workspace:^").

---

Outside diff comments:
In `@features/admin.console-settings.v1/components/console-settings-tabs.tsx`:
- Around line 166-179: The memo computing consoleTabs (the useMemo that builds
the array including the ConsoleEnterpriseLogin tab) is missing dependencies so
it doesn't update when async values change; update the dependency array to
include tierName, isLoginFlowEnabled, isSharedAccessDisabled, isSubOrganization,
componentId and t so the memo recomputes when the subscription/toggle flags or
localization change; ensure the filter/map logic that references
ConsoleSettingsTabInterface, ConsoleSettingsModes and ConsoleSettingsTabIDs
remains unchanged and only the dependency list is adjusted.

ℹ️ Review info

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de69aa7 and 00fe360.

📒 Files selected for processing (7)
  • .changeset/long-clouds-watch.md
  • features/admin.console-settings.v1/components/console-enterprise-login/console-enterprise-login.tsx
  • features/admin.console-settings.v1/components/console-settings-tabs.tsx
  • features/admin.console-settings.v1/models/ui.ts
  • features/admin.console-settings.v1/package.json
  • modules/i18n/src/models/namespaces/console-settings-ns.ts
  • modules/i18n/src/translations/en-US/portals/console-settings.ts

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.01%. Comparing base (93e8e87) to head (47c7ec6).
⚠️ Report is 30 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9671      +/-   ##
==========================================
+ Coverage   55.88%   56.01%   +0.12%     
==========================================
  Files          42       42              
  Lines        1020     1023       +3     
  Branches      254      231      -23     
==========================================
+ Hits          570      573       +3     
  Misses        450      450              
Flag Coverage Δ
@wso2is/core 56.01% <ø> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pavinduLakshan
Copy link
Member

Hi @bhagyasakalanka,

Isn’t having a separate tab just to render this info alert a bit of an overkill? In my opinion, we could simply display the banner right above the tab group instead.

We could also make the banner expandable, so users can click to view additional details, such as an explanation of what Enterprise Login is and how it works.

Additionally, this banner should be hidden in the on-prem console. I assume this has already been taken into consideration, but it’s worth confirming.

@bhagyasakalanka
Copy link
Contributor Author

Hi @bhagyasakalanka,

Isn’t having a separate tab just to render this info alert a bit of an overkill? In my opinion, we could simply display the banner right above the tab group instead.

We could also make the banner expandable, so users can click to view additional details, such as an explanation of what Enterprise Login is and how it works.

Additionally, this banner should be hidden in the on-prem console. I assume this has already been taken into consideration, but it’s worth confirming.

We had a chat with @JKAUSHALYA on this initially. In the future, we will improve this tab to provide self configuration of enterprise IDP. Hence we add this as a new tab instead of a banner above

@bhagyasakalanka
Copy link
Contributor Author

Additionally, this banner should be hidden in the on-prem console. I assume this has already been taken into consideration, but it’s worth confirming.

Yes.. This is not visible in onprem

@pavinduLakshan
Copy link
Member

In the future, we will improve this tab to provide self configuration of enterprise IDP. Hence we add this as a new tab instead of a banner above

Shall we onboard the tab once the self service UI is available and keep the banner above the tab group for now? Because having a single banner in a separate tab wouldn't look good, IMO.

cc: @jeradrutnam

@jeradrutnam
Copy link
Member

+1 for @pavinduLakshan sugggestion if it will not onboard in near future. Additionally we can improve the messaging a bit.

"Contact us to configure an Enterprise login to this organization's console access."

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.

3 participants