Skip to content

feat: toggle CIRA tab from server features API#3350

Draft
madhavilosetty-intel wants to merge 1 commit into
mainfrom
feat/cira-tab-toggle
Draft

feat: toggle CIRA tab from server features API#3350
madhavilosetty-intel wants to merge 1 commit into
mainfrom
feat/cira-tab-toggle

Conversation

@madhavilosetty-intel
Copy link
Copy Markdown
Contributor

In the enterprise build, fetch GET /api/v1/server/features from the Console API on navbar init and show the CIRA tab only when ciraEnabled is true (driven by the server's APP_DISABLE_CIRA setting). The cloud (MPS+RPS) build is unchanged and continues to show the tab.

Adds ServerFeaturesService and the ServerFeatures model, with specs for the service and the navbar's cloud/enterprise branches.

Resolves #3200

PR Checklist

  • Unit Tests have been added for new changes
  • API tests have been updated if applicable
  • All commented code has been removed
  • If you've added a dependency, you've ensured license is compatible with Apache 2.0 and clearly outlined the added dependency.

What are you changing?

Anything the reviewer should know when reviewing this PR?

If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )

Copy link
Copy Markdown

Copilot AI left a comment

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 adds an enterprise-only capability check (via the Console API) to control whether the CIRA navbar tab is shown, while keeping cloud (MPS+RPS) behavior unchanged.

Changes:

  • Introduces a ServerFeatures model and a ServerFeaturesService to call GET /api/v1/server/features.
  • Updates the navbar component to fetch server features on init (enterprise only) and conditionally render the CIRA link.
  • Adds unit tests for the new service and for navbar enterprise/cloud branching behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/models/models.ts Adds ServerFeatures interface used by the new features endpoint.
src/app/server-features.service.ts New service to fetch server feature flags.
src/app/server-features.service.spec.ts Unit tests covering success/error behavior for the new service.
src/app/core/navbar/navbar.component.ts Fetches server features on init in enterprise mode and stores CIRA enabled state in a signal.
src/app/core/navbar/navbar.component.html Conditionally renders the CIRA nav link based on ciraEnabled().
src/app/core/navbar/navbar.component.spec.ts Adds tests for cloud vs enterprise initialization and CIRA enable/disable behavior.

Comment thread src/app/core/navbar/navbar.component.ts Outdated
Comment thread src/app/server-features.service.ts Outdated
Comment thread src/app/core/navbar/navbar.component.spec.ts
Comment thread src/app/core/navbar/navbar.component.spec.ts
In the enterprise build, fetch GET /api/v1/server/features from the
Console API on navbar init and show the CIRA tab only when ciraEnabled
is true (driven by the server's APP_DISABLE_CIRA setting). The cloud
(MPS+RPS) build is unchanged and continues to show the tab.

Adds ServerFeaturesService and the ServerFeatures model, with specs for
the service and the navbar's cloud/enterprise branches.

Resolves #3200
@madhavilosetty-intel madhavilosetty-intel marked this pull request as draft June 1, 2026 22:53
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.

Enhance CIRA User Experience in Console UI

3 participants