Skip to content

feat: avoid reloading AMT Summary when updating AMT Features#3427

Open
nmgaston wants to merge 4 commits into
mainfrom
noloadSummaryOnFeatureChange
Open

feat: avoid reloading AMT Summary when updating AMT Features#3427
nmgaston wants to merge 4 commits into
mainfrom
noloadSummaryOnFeatureChange

Conversation

@nmgaston

@nmgaston nmgaston commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

This pull request refines the loading state management in the GeneralComponent to provide more granular feedback when updating AMT features. Instead of using a single loading state for all operations, a dedicated isUpdatingFeatures signal is introduced. This allows the UI to display a progress bar specifically when AMT features are being updated, without interfering with other loading indicators. Unit tests have been added to verify this improved behavior.

UI and State Management Improvements:

  • Added a new isUpdatingFeatures signal to GeneralComponent to track the loading state specifically for AMT feature updates, decoupling it from the general loading state (isLoading). (src/app/devices/general/general.component.ts)
  • Updated the template to show a mat-progress-bar only when isUpdatingFeatures() is true, giving users more precise feedback during feature updates. (src/app/devices/general/general.component.html)

Testing Enhancements:

  • Added unit tests to ensure that the feature update loading state (isUpdatingFeatures) is managed independently from the summary loading state (isLoading). (src/app/devices/general/general.component.spec.ts)
  • Updated the test suite to mock the new setAmtFeatures method and use Subject for simulating asynchronous responses. (src/app/devices/general/general.component.spec.ts)

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.

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 refines GeneralComponent loading-state management so AMT feature updates no longer reuse the summary-loading signal, enabling more targeted UI feedback during AMT feature updates.

Changes:

  • Introduces a dedicated isUpdatingFeatures signal to track AMT feature-update in-flight state independently of isLoading.
  • Updates the AMT Enabled Features UI to show an indeterminate mat-progress-bar only while features are being updated.
  • Adds unit tests validating that feature-update loading does not affect the summary-loading state.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/app/devices/general/general.component.ts Adds isUpdatingFeatures and switches setAmtFeatures() to toggle it instead of isLoading.
src/app/devices/general/general.component.html Displays a progress bar inside the AMT Enabled Features card when isUpdatingFeatures() is true.
src/app/devices/general/general.component.spec.ts Adds tests for independent loading states during feature updates.

Comment thread src/app/devices/general/general.component.ts Outdated
Comment thread src/app/devices/general/general.component.spec.ts Outdated
@nmgaston
nmgaston requested a review from Copilot July 10, 2026 04:09
@nmgaston nmgaston linked an issue Jul 10, 2026 that may be closed by this pull request
4 tasks

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread src/app/devices/general/general.component.ts
@nmgaston
nmgaston force-pushed the noloadSummaryOnFeatureChange branch from 8db13ae to 30ba937 Compare July 10, 2026 04:15
@nmgaston
nmgaston requested a review from Copilot July 10, 2026 04:16

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@nmgaston
nmgaston marked this pull request as ready for review July 10, 2026 04:23
Comment thread src/app/devices/general/general.component.ts Outdated
Comment thread src/app/devices/general/general.component.ts Outdated
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.

Avoid reloading AMT Summary when updating AMT Features

3 participants