Skip to content

Migrate to Angular 21 with zoneless change detection#67

Open
ErykKul wants to merge 5 commits intomainfrom
feature/angular-21-zoneless
Open

Migrate to Angular 21 with zoneless change detection#67
ErykKul wants to merge 5 commits intomainfrom
feature/angular-21-zoneless

Conversation

@ErykKul
Copy link
Contributor

@ErykKul ErykKul commented Feb 6, 2026

  • Upgrade to Angular 21 and remove zone.js dependency
  • Convert components to use signals for reactive state management
  • Replace deep cloning with refreshTrigger pattern for UI updates
  • Fix compare page refresh button to properly restart polling loop
  • Add tree-utils.ts with centralized tree operations
  • Update all tests for zoneless change detection patterns

Key changes:

  • All components now use OnPush change detection with signals
  • Removed polyfills.ts (zone.js no longer needed)
  • provideZonelessChangeDetection in main.ts
  • Consistent refreshTrigger pattern across download/connect components

@AI-Tool: Copilot

Summary

AI Provenance (required for AI-assisted changes)

  • Prompt:
  • Model:
  • Date:
  • Author:
  • Role: provider|deployer

Compliance checklist

  • No secrets/PII
  • Transparency notice updated (if user-facing)
  • Agent logging enabled (actions/decisions logged)
  • Kill-switch / feature flag present for AI features
  • No prohibited practices under EU AI Act
  • Human oversight retained (required if high-risk or agent mode)
  • Risk classification: limited|high
  • Personal data: yes|no
  • DPIA: <link or N/A>
  • Automated decision-making: yes|no
  • Agent mode used: yes|no
  • GPAI obligations: <link or N/A> (if Role: provider)
  • Vendor GPAI compliance reviewed: <link or N/A> (if Role: deployer)
  • License/IP attestation
  • Attribution: <link or N/A>
  • Oversight plan: (required if high-risk/ADM)

Tip: comment '/gov' to run checks + Copilot review, and '/gov links' to preview suggested links.

Change-type specifics

  • Security review: or check: [ ] Security review requested (required if auth/permissions/etc.)
  • Media assets changed:
    • AI content labeled
    • C2PA: <link or N/A>
  • UI changed:
    • Accessibility review (EN 301 549/WCAG)
    • Accessibility statement: <link or N/A>
  • Deploy/infra changed:
    • Privacy notice:
    • Lawful basis: <e.g., public task/consent/contract or N/A>
    • Retention schedule: <link or N/A>
    • NIS2 applicability: yes|no|N/A
    • Incident response plan:
  • Backend/API changed:
    • ASVS: or check [ ] OWASP ASVS review
  • Log retention policy: <link or N/A>
  • Data paths changed:
    • TDM: yes|no|N/A
    • TDM compliance:

Tests & Risk

  • Unit/integration tests added/updated
  • Security scan passed
  • Rollback plan:
  • Smoke test:
  • Docs updated (if needed)

- Upgrade to Angular 21 and remove zone.js dependency
- Convert components to use signals for reactive state management
- Replace deep cloning with refreshTrigger pattern for UI updates
- Fix compare page refresh button to properly restart polling loop
- Add tree-utils.ts with centralized tree operations
- Update all tests for zoneless change detection patterns

Key changes:
- All components now use OnPush change detection with signals
- Removed polyfills.ts (zone.js no longer needed)
- provideExperimentalZonelessChangeDetection in main.ts
- Consistent refreshTrigger pattern across download/connect components
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Code Review Agent (Python)\n

No Python files changed. Skipping analysis.

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

AI Governance checks failed

Please fix the following before re-running checks:

  • Ensure PR body includes provenance fields:
    • Prompt
    • Model
    • Date
    • Author
    • No secrets/PII (checkbox)
  • Complete compliance checklist items required for your change type (transparency notice, DPIA, logging, kill-switch, risk classification, human oversight, security review, vendor GPAI review).
  • Add a rollback note if the change is risky (authz, data export, evaluation logic, etc.).

Helpful links:

After edits, push updates or re-run the workflow to validate.

Copy link
Contributor

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 migrates the frontend to Angular 21 with a zoneless, signal-based change detection approach, updating components/services/tests accordingly and removing the app’s Zone.js runtime dependency.

Changes:

  • Upgraded Angular/PrimeNG deps and switched the app bootstrap to zoneless change detection.
  • Refactored multiple components/services to use signals (signal, computed, input, output) with OnPush.
  • Introduced centralized tree helpers (tree-utils) and adjusted repo options APIs to support hierarchical responses.

Reviewed changes

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

Show a summary per file
File Description
tsconfig.spec.json Removes polyfills.ts from test TS compilation inputs.
tsconfig.app.json Removes polyfills.ts from app TS compilation inputs.
src/test.ts Drops explicit zone.js/testing import (handled via test polyfills config).
src/polyfills.ts Deletes Zone-based polyfills entrypoint.
src/main.ts Switches bootstrap providers to zoneless change detection and updates theming imports.
src/app/submitted-file/submitted-file.component.ts Migrates to OnPush + computed signals for derived UI state.
src/app/submitted-file/submitted-file.component.spec.ts Updates tests for signal-based APIs and renamed computed getters.
src/app/submitted-file/submitted-file.component.html Updates template bindings to signal/computed accessors.
src/app/submit/submit.component.ts Converts local state to signals/computeds and adjusts transfer tracking.
src/app/submit/submit.component.html Updates template bindings for signals and callback inputs.
src/app/submit.service.ts Reads credentials via signal-based getters instead of mutable object.
src/app/submit.service.spec.ts Updates mock credentials service to provide signal-style API.
src/app/shared/tree-utils.ts Adds shared helpers to create/convert hierarchical tree structures.
src/app/shared/tree-utils.spec.ts Adds unit tests for the new tree utilities.
src/app/shared/transfer-progress-card/transfer-progress-card.component.ts Refactors inputs/outputs/state to signals; updates polling logic and refresh behavior.
src/app/shared/transfer-progress-card/transfer-progress-card.component.html Updates template bindings to signal/computed accessors.
src/app/repo.lookup.service.ts Changes options API return type to hierarchical select items.
src/app/plugin.service.ts Makes plugin config reactive via signals/computeds and introduces defaults.
src/app/models/hierarchical-select-item.ts Adds a typed hierarchical select item model for tree responses.
src/app/metadatafield/metadatafield.component.ts Converts to signals/computeds; introduces changed output + refresh trigger pattern.
src/app/metadatafield/metadatafield.component.spec.ts Updates tests for new signal/computed API and changed output.
src/app/metadatafield/metadatafield.component.html Updates bindings to new computed accessors.
src/app/metadata-selector/metadata-selector.component.ts Refactors to signals and effects; adjusts metadata loading/building pipeline.
src/app/metadata-selector/metadata-selector.component.spec.ts Updates tests for signal-based state and submit behavior.
src/app/metadata-selector/metadata-selector.component.html Updates tree table bindings and adds refresh trigger + changed event wiring.
src/app/metadata-selector/metadata-selector-styling.spec.ts Updates styling test to use new hostStyle() API.
src/app/executablefile/executablefile.component.ts Migrates to OnPush + signals for compute queue selection and UI state.
src/app/executablefile/executablefile.component.spec.ts Updates tests for signal state and computed accessors.
src/app/executablefile/executablefile.component.html Updates bindings for signal-driven form controls.
src/app/downloadablefile/downladablefile.component.ts Migrates to signals/computeds; adds changed output and trigger input.
src/app/downloadablefile/downladablefile.component.spec.ts Updates tests for new action/style APIs and changed output.
src/app/downloadablefile/downladablefile.component.html Updates bindings to computed accessors.
src/app/download/download.component.html Updates dialog/forms bindings to signals for zoneless compatibility.
src/app/ddi-cdi/ddi-cdi.component.html Updates form and conditional bindings to signals.
src/app/dataset.service.ts Renames request field collectionIdcollection.
src/app/dataset.service.spec.ts Updates test to assert the renamed request field.
src/app/datafile/datafile.component.ts Converts to signals/computeds; adds trigger + changed output; refactors icons.
src/app/datafile/datafile.component.spec.ts Updates tests to use setInput and new computed APIs.
src/app/datafile/datafile.component.html Updates bindings to computed icons/colors and action accessor.
src/app/datafile/datafile-styling.spec.ts Updates styling test to use new hostStyle() API.
src/app/data.updates.service.ts Reads dataverse token via credentials signal getter.
src/app/data.updates.service.spec.ts Updates tests to use new credentials service mutation API.
src/app/data.state.service.ts Replaces BehaviorSubject state with signal-based state API.
src/app/data.state.service.spec.ts Updates tests to use state$() instead of getCurrentValue().
src/app/data.service.ts Reads all request fields via credentials signal getters.
src/app/data.service.spec.ts Updates tests to use setCredentials() API.
src/app/credentials.service.ts Replaces mutable credentials with a signal + computed property getters.
src/app/connect/connect.component.spec.ts Updates connect tests for signals + plugin service signal stubs.
src/app/connect/connect.component.config.spec.ts Updates config tests for signal-based component API.
src/app/connect/connect.component.behavior.spec.ts Updates behavior tests for signals and removes noop-animations provider usage.
src/app/connect/connect.component.advanced.spec.ts Updates advanced tests for signals and revised selection semantics.
src/app/connect/connect-compare.integration.spec.ts Updates integration test stubs to include signal-based APIs.
src/app/compute/compute.component.ts Migrates compute page state to signals/computeds and updates async flows.
src/app/compute/compute.component.spec.ts Updates compute tests for new signals and plugin service signal stubs.
src/app/compute/compute.component.html Updates bindings to signal-based state.
src/app/compare/compare.component.ts Refactors compare page state/filters to signals/computeds and updates polling/refresh.
src/app/compare/compare.component.html Updates bindings for signals, filtering selection, and child refresh trigger wiring.
src/app/app.component.ts Sets OnPush strategy to align with signal/zoneless patterns.
src/app/app.component.spec.ts Adds/updates tests around redirect loop detection and navigation fallback flows.
package.json Upgrades Angular/PrimeNG ecosystem deps; removes Zone.js from runtime deps and keeps it for dev/test.
karma.conf.js Minor quoting/style adjustment for CHROME_BIN assignment.
angular.json Removes app polyfills file; adjusts build/test polyfills for localize + test Zone setup.
Makefile Removes test-watch; updates CI target to call lint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Auto-detect Chrome/Chromium binary path across distros instead of
hardcoding /usr/bin/chromium (Arch only). Checks common paths:
chromium, chromium-browser, google-chrome-stable, google-chrome.
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Code Review Agent (Python)\n

No Python files changed. Skipping analysis.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

AI Governance checks failed

Please fix the following before re-running checks:

  • Ensure PR body includes provenance fields:
    • Prompt
    • Model
    • Date
    • Author
    • No secrets/PII (checkbox)
  • Complete compliance checklist items required for your change type (transparency notice, DPIA, logging, kill-switch, risk classification, human oversight, security review, vendor GPAI review).
  • Add a rollback note if the change is risky (authz, data export, evaluation logic, etc.).

Helpful links:

After edits, push updates or re-run the workflow to validate.

…fig.json: set module to ES2022, lib to [ES2022, dom],\n enable useDefineForClassFields for spec compliance\n- navigation.service.ts: modernize DI from constructor @Inject to\n  field-level inject(DOCUMENT)\n- compare.component.ts: move side effects from computed() into\n  effect() to avoid non-idempotent computed signals\n- Subscription tracking: add ngOnDestroy cleanup with subscription\n  Set in ddi-cdi, compute, metadata-selector, download components\n- Fix TDZ errors from useDefineForClassFields: change const to let\n  with separate declaration/assignment for all subscription variables\n  that self-reference in synchronous callbacks\n- Add optional chaining (?.) to all .unsubscribe() calls to handle\n  synchronous emission edge case where subscription variable is\n  still undefined when the callback fires\n\nAll 543 tests pass.
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Code Review Agent (Python)\n

No Python files changed. Skipping analysis.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

AI Governance checks failed

Please fix the following before re-running checks:

  • Ensure PR body includes provenance fields:
    • Prompt
    • Model
    • Date
    • Author
    • No secrets/PII (checkbox)
  • Complete compliance checklist items required for your change type (transparency notice, DPIA, logging, kill-switch, risk classification, human oversight, security review, vendor GPAI review).
  • Add a rollback note if the change is risky (authz, data export, evaluation logic, etc.).

Helpful links:

After edits, push updates or re-run the workflow to validate.

- Updated subscription declarations in multiple components to avoid temporal dead zone (TDZ) issues by splitting declaration and assignment.
- Added eslint-disable comments for clarity on the changes made.
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

AI Governance checks failed

Please fix the following before re-running checks:

  • Ensure PR body includes provenance fields:
    • Prompt
    • Model
    • Date
    • Author
    • No secrets/PII (checkbox)
  • Complete compliance checklist items required for your change type (transparency notice, DPIA, logging, kill-switch, risk classification, human oversight, security review, vendor GPAI review).
  • Add a rollback note if the change is risky (authz, data export, evaluation logic, etc.).

Helpful links:

After edits, push updates or re-run the workflow to validate.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Code Review Agent (Python)\n

No Python files changed. Skipping analysis.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

AI Governance checks failed

Please fix the following before re-running checks:

  • Ensure PR body includes provenance fields:
    • Prompt
    • Model
    • Date
    • Author
    • No secrets/PII (checkbox)
  • Complete compliance checklist items required for your change type (transparency notice, DPIA, logging, kill-switch, risk classification, human oversight, security review, vendor GPAI review).
  • Add a rollback note if the change is risky (authz, data export, evaluation logic, etc.).

Helpful links:

After edits, push updates or re-run the workflow to validate.

@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Code Review Agent (Python)\n

No Python files changed. Skipping analysis.

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.

1 participant