Skip to content

feat: hide CIRA in profile when disabled on the server - #3514

Open
nmgaston wants to merge 1 commit into
mainfrom
fix-cira-warning-clean
Open

feat: hide CIRA in profile when disabled on the server#3514
nmgaston wants to merge 1 commit into
mainfrom
fix-cira-warning-clean

Conversation

@nmgaston

@nmgaston nmgaston commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Original PR: #3445

This pull request refines the handling of the CIRA (Cloud Internet Remote Access) feature in the profile management UI, improving both the user experience and code maintainability. The main changes ensure that CIRA options only appear when available, prevent users from selecting CIRA when it's disabled, and clean up related UI and translation strings. The test suite is expanded to cover these scenarios.

CIRA feature handling and UI improvements:

  • The CIRA connection option and related fields in profile-detail.component.html are now only shown if CIRA is enabled, preventing users from selecting or viewing CIRA options when the feature is unavailable. The fallback logic ensures profiles referencing CIRA automatically switch to a supported mode if CIRA is disabled.
  • The warning icon and tooltip indicating a profile uses CIRA when it's disabled are removed from the profiles list, streamlining the UI.

Logic and state management:

  • Introduced a new ciraAvailabilityResolved signal to track when the server's CIRA feature status is known, preventing premature changes to profile forms before the server response arrives.
    Test coverage:

  • Added and updated tests in profile-detail.component.spec.ts to verify correct behavior when CIRA is enabled, disabled, or the feature status is pending, including automatic fallback logic and UI visibility.
    Translation cleanup:

  • Removed unused translation strings related to CIRA being disabled from all localization files, as the warning and inline notes are no longer shown in the UI.

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 )

@nmgaston nmgaston changed the title feat: add dialog warning if adding profile without CIRA configured feat: hide CIRA in profile when disabled on the server Aug 21, 2026
@nmgaston
nmgaston force-pushed the fix-cira-warning-clean branch from eb1beb5 to 9b00455 Compare August 21, 2026 20:39
@madhavilosetty-intel
madhavilosetty-intel force-pushed the fix-cira-warning-clean branch 2 times, most recently from 831b639 to ad76cfb Compare August 26, 2026 22:39
Hide the CIRA connection mode once the Console server reports CIRA
disabled, but keep it visible and disabled while /server/features is
still in flight, so a saved CIRA profile does not render an empty
radio group during the call.

Warn on save only when saving actually drops a stored CIRA config,
i.e. editing a profile created with one on a server where CIRA is
now disabled. It previously fired on every non-CIRA save, which
blocked submit in the unit specs and the Cypress profile suites.

A stored non-TLS profile comes back with tlsMode 0, which
Validators.required accepts while the select renders blank, so the
coerced profile saved silently with TLS off. Blank an out-of-range
tlsMode when TLS is selected and surface the required error.

Copilot AI 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.

Pull request overview

This PR updates the Profiles UI to better handle cases where CIRA is disabled on the server (enterprise flavor), preventing users from selecting or editing CIRA settings when unavailable and introducing a dedicated confirmation dialog when saving would drop an existing CIRA configuration.

Changes:

  • Added a “No CIRA” warning dialog and corresponding i18n strings.
  • Updated ProfileDetailComponent to track when CIRA availability is resolved, hide/disable CIRA UI appropriately, and coerce existing CIRA profiles to TLS when CIRA is confirmed disabled.
  • Expanded unit tests to cover the new availability-resolved behavior, UI visibility, coercion, and save-confirmation flow.

Reviewed changes

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

Show a summary per file
File Description
src/assets/i18n/ar.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/de.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/en.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/es.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/fi.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/fr.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/he.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/it.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/ja.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/nl.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/ru.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/assets/i18n/sv.json Adds noCira.* dialog strings; removes profileDetail.ciraDisabledOption.
src/app/shared/no-cira-warning/no-cira-warning.component.ts Introduces the new dialog component (standalone-style imports).
src/app/shared/no-cira-warning/no-cira-warning.component.html Dialog UI/wording layout for the “CIRA config will be removed” warning.
src/app/shared/no-cira-warning/no-cira-warning.component.scss Styling for the new dialog.
src/app/shared/no-cira-warning/no-cira-warning.component.spec.ts Basic unit test coverage for the new dialog component.
src/app/profiles/profile-detail/profile-detail.component.ts Adds resolved-availability signal, coercion logic, sequential dialog flow, and “drop CIRA config” warning gate.
src/app/profiles/profile-detail/profile-detail.component.html Conditionally shows/hides CIRA option based on resolved availability; adjusts TLS error display.
src/app/profiles/profile-detail/profile-detail.component.spec.ts Adds tests for resolved/pending CIRA availability behavior and new warning flow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/assets/i18n/nl.json
"value": "Dit profiel heeft een bestaande CIRA-configuratie, maar CIRA is momenteel uitgeschakeld op de server. Het opslaan van dit profiel verwijdert de CIRA-configuratie."
},
"noCira.title": {
"description": "Titel van het dialoogvenster voor de CIRA-verwijderingswarschuwing",
Comment on lines +193 to +195
component.ciraEnabled.set(false)
;(component as any).ciraAvailabilityResolved.set(true)

Comment on lines +203 to +205
component.ciraEnabled.set(false)
;(component as any).ciraAvailabilityResolved.set(false)

Comment on lines 45 to +47
import { RandomPassAlertComponent } from '../../shared/random-pass-alert/random-pass-alert.component'
import { StaticCIRAWarningComponent } from '../../shared/static-cira-warning/static-cira-warning.component'
import { NoCIRAWarningComponent } from '../../shared/no-cira-warning/no-cira-warning.component'
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