Skip to content

refactor(devices): hold template state in signals - #3629

Merged
rsdmike merged 1 commit into
mainfrom
refactor/devices-template-signals
Oct 13, 2026
Merged

rsdmike merged 1 commit into
mainfrom
refactor/devices-template-signals

Conversation

@rsdmike

@rsdmike rsdmike commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Fields that device pages render and that change after the first render (loaded data, connection flags, the selected disk image, KVM displays, the event log page) are now signals, so the views update under OnPush without relying on a global change detection pass.

The add-certificate dialog no longer calls ChangeDetectorRef.detectChanges(); its certificate and trusted flag are signals. The event log holds its rows in a signal in place of a MatTableDataSource.

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 )

Fields that device pages render and that change after the first
render (loaded data, connection flags, the selected disk image, KVM
displays, the event log page) are now signals, so the views update
under OnPush without relying on a global change detection pass.

The add-certificate dialog no longer calls
ChangeDetectorRef.detectChanges(); its certificate and trusted flag
are signals. The event log holds its rows in a signal in place of a
MatTableDataSource.

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.

🟢 Approval recommended

The signal conversions are consistent across component logic, templates, and corresponding unit tests.

0 open findings

What changed in this PR

Refactors device-page template state to Angular signals, preparing the application for OnPush change detection and the Angular 22 upgrade.

Changes:

  • Converts asynchronously updated device, connection, display, log, and form state to signals.
  • Updates templates to read signal values.
  • Adapts unit tests to the signal APIs.
File Description
src/​app/​devices/​tls/​tls.component.ts Stores TLS data in a signal.
src/​app/​devices/​tls/​tls.component.spec.ts Updates TLS signal assertions.
src/​app/​devices/​tls/​tls.component.html Reads TLS data from the signal.
src/​app/​devices/​sol/​sol.component.ts Converts SOL readiness and disconnect state.
src/​app/​devices/​sol/​sol.component.spec.ts Updates SOL signal tests.
src/​app/​devices/​sol/​sol.component.html Reads SOL state signals.
src/​app/​devices/​kvm/​kvm.component.ts Signals KVM readiness, disk, and displays.
src/​app/​devices/​kvm/​kvm.component.spec.ts Updates KVM signal tests.
src/​app/​devices/​kvm/​kvm.component.html Reads KVM state signals.
src/​app/​devices/​ider/​ider.component.ts Stores the selected disk in a signal.
src/​app/​devices/​ider/​ider.component.spec.ts Updates disk-image assertions.
src/​app/​devices/​ider/​ider.component.html Reads the disk-image signal.
src/​app/​devices/​hardware-information/​hardware-information.component.ts Signals loaded hardware and disk data.
src/​app/​devices/​hardware-information/​hardware-information.component.spec.ts Updates hardware signal setup.
src/​app/​devices/​hardware-information/​hardware-information.component.html Reads hardware information signals.
src/​app/​devices/​general/​general.component.ts Signals AMT details and feature form state.
src/​app/​devices/​general/​general.component.spec.ts Updates feature-form signal access.
src/​app/​devices/​general/​general.component.html Reads general-page signals.
src/​app/​devices/​explorer/​explorer.component.ts Signals XML output and filtered options.
src/​app/​devices/​explorer/​explorer.component.spec.ts Updates explorer signal assertions.
src/​app/​devices/​explorer/​explorer.component.html Reads explorer signals.
src/​app/​devices/​event-log/​event-log.component.ts Replaces table data source and pagination state with signals.
src/​app/​devices/​event-log/​event-log.component.spec.ts Updates event-log signal tests.
src/​app/​devices/​event-log/​event-log.component.html Binds the table and pagination to signals.
src/​app/​devices/​device-toolbar/​device-toolbar.component.ts Stores the loaded device in a signal.
src/​app/​devices/​device-toolbar/​device-toolbar.component.html Reads device details from the signal.
src/​app/​devices/​device-detail/​device-detail.component.ts Signals route and sidenav state.
src/​app/​devices/​device-detail/​device-detail.component.spec.ts Updates current-view assertions.
src/​app/​devices/​device-detail/​device-detail.component.html Reads detail-page state signals.
src/​app/​devices/​certificates/​add-cert-dialog/​add-cert-dialog.component.ts Signals certificate and trust state.
src/​app/​devices/​certificates/​add-cert-dialog/​add-cert-dialog.component.spec.ts Updates certificate signal tests.
src/​app/​devices/​certificates/​add-cert-dialog/​add-cert-dialog.component.html Binds dialog controls to signals.
src/​app/​devices/​audit-log/​audit-log.component.ts Stores audit-log response in a signal.
src/​app/​devices/​audit-log/​audit-log.component.html Reads audit-log data from the signal.

🧠 Review effort: Balanced


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

@rsdmike
rsdmike merged commit 9c4cd17 into main Oct 13, 2026
14 checks passed
@rsdmike
rsdmike deleted the refactor/devices-template-signals branch October 13, 2026 15:29
@RosieAMT

Copy link
Copy Markdown

🎉 This PR is included in version 3.70.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@RosieAMT

Copy link
Copy Markdown

🎉 This PR is included in version 3.70.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@graikhel-intel graikhel-intel linked an issue Oct 22, 2026 that may be closed by this pull request
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade sample-web-ui from Angular 21 to Angular 22

4 participants