Skip to content

refactor: hold template state in signals - #3630

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

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

Conversation

@rsdmike

@rsdmike rsdmike commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Moves the remaining template-bound fields that change after the first render into signals: page titles, error lists, edit flags and password-visibility toggles on the detail forms, the table data sources and page state on the list pages, the dashboard stats, the login state in the app shell and toolbar, and the text direction.

The proxy config list now decides its empty state and paginator from totalCount, as the other list pages do. The enterprise add-device dialog copies the tag list on change and no longer edits the array of the device it was opened with.

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 )

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 migration is internally consistent, preserves existing behavior, and includes corresponding template and test updates.

0 open findings

What changed in this PR

Migrates mutable template state to Angular signals in preparation for Angular 22 and OnPush change detection.

Changes:

  • Converts list, detail-form, authentication, dashboard, and direction state to signals.
  • Updates templates and unit tests to read and mutate signal values.
  • Aligns proxy pagination with totalCount and prevents enterprise tag-array mutation.
File Description
src/​app/​wireless/​wireless.component.ts Converts table and pagination state to signals.
src/​app/​wireless/​wireless.component.html Reads wireless list signals.
src/​app/​wireless/​wireless-detail/​wireless-detail.component.ts Converts detail-form UI state to signals.
src/​app/​wireless/​wireless-detail/​wireless-detail.component.spec.ts Updates signal-based assertions.
src/​app/​wireless/​wireless-detail/​wireless-detail.component.html Reads wireless detail signals.
src/​app/​shared/​add-device-enterprise/​add-device-enterprise.component.ts Uses immutable signal updates for tags.
src/​app/​shared/​add-device-enterprise/​add-device-enterprise.component.html Reads tag signal.
src/​app/​proxy-configs/​proxy-configs.component.ts Signals pagination and uses total count for empty state.
src/​app/​proxy-configs/​proxy-configs.component.spec.ts Tests total-count empty-state behavior.
src/​app/​proxy-configs/​proxy-configs.component.html Updates paginator and visibility bindings.
src/​app/​proxy-configs/​proxy-config-detail/​proxy-config-detail.component.ts Converts detail state to signals.
src/​app/​proxy-configs/​proxy-config-detail/​proxy-config-detail.component.spec.ts Updates detail signal assertions.
src/​app/​proxy-configs/​proxy-config-detail/​proxy-config-detail.component.html Reads proxy detail signals.
src/​app/​profiles/​profiles.component.ts Converts profile table and pagination state.
src/​app/​profiles/​profiles.component.html Reads profile list signals.
src/​app/​login/​login.component.ts Signals password visibility state.
src/​app/​login/​login.component.spec.ts Updates password visibility assertions.
src/​app/​login/​login.component.html Reads password visibility signal.
src/​app/​ieee8021x/​ieee8021x.component.ts Converts table and pagination state.
src/​app/​ieee8021x/​ieee8021x.component.html Reads IEEE 802.1X list signals.
src/​app/​ieee8021x/​ieee8021x-detail/​ieee8021x-detail.component.ts Converts detail and protocol state.
src/​app/​ieee8021x/​ieee8021x-detail/​ieee8021x-detail.component.spec.ts Updates edit-state setup.
src/​app/​ieee8021x/​ieee8021x-detail/​ieee8021x-detail.component.html Reads IEEE 802.1X detail signals.
src/​app/​domains/​domains.component.ts Converts domain table and pagination state.
src/​app/​domains/​domains.component.spec.ts Updates table signal access.
src/​app/​domains/​domains.component.html Reads domain list signals.
src/​app/​domains/​domain-detail/​domain-detail.component.ts Converts detail and password state.
src/​app/​domains/​domain-detail/​domain-detail.component.spec.ts Updates domain signal assertions.
src/​app/​domains/​domain-detail/​domain-detail.component.html Reads domain detail signals.
src/​app/​dashboard/​dashboard.component.ts Stores device statistics in a signal.
src/​app/​dashboard/​dashboard.component.html Reads statistics signal.
src/​app/​core/​toolbar/​toolbar.component.ts Signals authentication state.
src/​app/​core/​toolbar/​toolbar.component.spec.ts Updates authentication assertion.
src/​app/​core/​toolbar/​toolbar.component.html Reads toolbar login signal.
src/​app/​core/​about/​about.component.ts Signals persisted notice preference.
src/​app/​configs/​configs.component.ts Converts CIRA table and pagination state.
src/​app/​configs/​configs.component.html Reads CIRA list signals.
src/​app/​configs/​config-detail/​config-detail.component.ts Converts title and error state.
src/​app/​configs/​config-detail/​config-detail.component.spec.ts Updates title signal assertion.
src/​app/​configs/​config-detail/​config-detail.component.html Reads configuration detail signals.
src/​app/​app.component.ts Signals login and text-direction state.
src/​app/​app.component.spec.ts Updates login-state assertion.
src/​app/​app.component.html Reads application-shell signals.

🧠 Review effort: Balanced


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

Base automatically changed from refactor/devices-template-signals to main October 13, 2026 15:29
Move the remaining template-bound fields that change after the first
render into signals: page titles, error lists, edit flags and
password-visibility toggles on the detail forms, the table data
sources and page state on the list pages, the dashboard stats, the
login state in the app shell and toolbar, and the text direction.

The proxy config list now decides its empty state and paginator from
totalCount, as the other list pages do. The enterprise add-device
dialog copies the tag list on change and no longer edits the array of
the device it was opened with.
@rsdmike
rsdmike force-pushed the refactor/template-state-signals branch from 68911d8 to 8e7a137 Compare October 13, 2026 15:29
@rsdmike
rsdmike merged commit e063061 into main Oct 13, 2026
10 checks passed
@rsdmike
rsdmike deleted the refactor/template-state-signals branch October 13, 2026 15:36
@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 📦🚀

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.

4 participants