CTM-436 Upgrade Angular 19 → 20 and remove Clarity Design System#806
CTM-436 Upgrade Angular 19 → 20 and remove Clarity Design System#806
Conversation
- Bump all @angular/* and @angular-devkit/* packages to ^20.0.0 - Remove @clr/angular, @cds/core, @clr/icons (incompatible with Angular 20) - Replace clr-icon/clr-tooltip with mat-icon/matTooltip throughout all templates - Update JobStatusIcon enum to use Material icon names (e.g. check_circle, error, sync) - Remove Clarity CSS/JS from angular.json build config; add Material tooltip styles to styles.scss - Export MatIconModule and MatTooltipModule from SharedModule for test modules - Replace TestBed.get() with TestBed.inject() (Angular 20 breaking change) - Update all spec files to use mat-icon selectors and textContent assertions - All 103 tests pass Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Switch from Node 18 to Node 22 (Angular 20 requires >=20.19.0) - Switch from npm install to yarn install (project uses yarn Berry 3.x) - Enable corepack before yarn commands - Remove npm install -g @angular/cli@14.2.1 (wrong version; use local via yarn) - Replace npm run with yarn for eslint/tsc/test/build steps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Upgrades the UI to Angular 20 while removing the Clarity Design System dependency, migrating icons/tooltips to Angular Material, and updating tests to match Angular 20 API changes.
Changes:
- Bump Angular/framework deps to
^20.0.0and remove Clarity packages/assets. - Replace
clr-icon/clr-tooltipusage across templates withmat-icon/matTooltip, including updatingJobStatusIconvalues. - Update unit tests for Angular 20 (
TestBed.inject) and new icon/toolip DOM expectations.
Reviewed changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated 26 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/styles.scss | Removes Clarity tooltip/icon styling and adds Material tooltip/icon class styling. |
| ui/src/app/sign-in/sign-in-redirect-component.spec.ts | Updates TestBed.get() to TestBed.inject(). |
| ui/src/app/shared/shared.module.ts | Removes Clarity modules; adds/exports Material tooltip/icon modules for app/tests. |
| ui/src/app/shared/filter-header/filter-header.component.spec.ts | Drops Clarity modules from test setup. |
| ui/src/app/shared/filter-header/filter-header.component.html | Migrates filter header icons/tooltips from Clarity to Material. |
| ui/src/app/shared/datetime/datetime.component.html | Replaces Clarity tooltip wrapper with matTooltip. |
| ui/src/app/shared/common.ts | Updates status-to-icon mapping from Clarity shapes to Material icon names. |
| ui/src/app/job-list/table/table.component.spec.ts | Updates test DOM queries/assertions for mat-icon status rendering. |
| ui/src/app/job-list/table/table.component.html | Migrates inline filter/status tooltip UI from Clarity to Material. |
| ui/src/app/job-list/table/bulk-edit/bulk-edit.component.html | Replaces Clarity icon with Material cancel. |
| ui/src/app/job-list/job-list.module.ts | Removes Clarity imports from module. |
| ui/src/app/job-list/job-list.component.spec.ts | Removes Clarity modules and updates TestBed injection API usage. |
| ui/src/app/job-details/tabs/tabs.component.spec.ts | Removes Clarity modules; updates icon assertions and TestBed injection API usage. |
| ui/src/app/job-details/tabs/tabs.component.html | Migrates task/shard status and menu icons/tooltips from Clarity to Material. |
| ui/src/app/job-details/tabs/scattered-attempts/scattered-attempts.component.html | Migrates shard status/cached indicators to Material icons/tooltips. |
| ui/src/app/job-details/panels/panels.component.spec.ts | Adjusts assertions to account for mat-icon text content in headers. |
| ui/src/app/job-details/panels/panels.component.html | Migrates header/status/action icons and tooltips from Clarity to Material. |
| ui/src/app/job-details/job-details.module.ts | Removes Clarity imports from module. |
| ui/src/app/job-details/job-details.component.spec.ts | Removes Clarity modules and updates TestBed injection API usage. |
| ui/src/app/job-details/common/debug-icons/debug-icons.component.spec.ts | Updates selectors/assertions after Clarity icon removal; updates TestBed injection API usage. |
| ui/src/app/job-details/common/debug-icons/debug-icons.component.html | Migrates debug/log/dir/compute icons & tooltips from Clarity to Material. |
| ui/src/app/job-details/common/attempt/attempt.component.html | Migrates attempt row icons/tooltips from Clarity to Material. |
| ui/src/app/dashboard/total-summary/total-summary.component.spec.ts | Drops Clarity modules from test setup. |
| ui/src/app/dashboard/total-summary/total-summary.component.html | Migrates dashboard summary status icons to Material. |
| ui/src/app/dashboard/grouped-summary/grouped-summary.component.spec.ts | Drops Clarity modules from test setup. |
| ui/src/app/dashboard/grouped-summary/grouped-summary.component.html | Migrates grouped summary header/status icons and arrow icon to Material. |
| ui/src/app/dashboard/dashboard.module.ts | Removes Clarity modules; adds Material icon/tooltip modules. |
| ui/src/app/dashboard/dashboard.component.spec.ts | Drops Clarity modules; updates TestBed injection API usage. |
| ui/src/app/app.module.ts | Removes Clarity modules from root module. |
| ui/src/app/app.component.spec.ts | Drops Clarity module; updates TestBed injection API usage. |
| ui/package.json | Bumps Angular packages to ^20.0.0, removes Clarity deps, updates related deps. |
| ui/angular.json | Removes Clarity CSS/JS assets from build configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@angular-eslint/eslint-plugin, @angular-eslint/eslint-plugin-template, and @angular-eslint/template-parser are used by .eslintrc.json but were only transitive deps of @angular-eslint/schematics. Yarn was not resolving them fully, causing 'Cannot find module @angular-eslint/template-parser' in CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Security: - Add rel="noopener noreferrer" to all target="_blank" links in panels, debug-icons components Tooltip placement: - Move matTooltip from nested mat-icon to the outer focusable element (button or anchor) in panels and filter-header components Accessibility: - Add aria-label to all icon-only buttons (abort, close, nav-up, settings, scatter menu, inputs/outputs menus, expand/collapse) - Add aria-label, role="img", tabindex="0" to standalone status mat-icons in table, tabs, attempt, and scattered-attempts components - Add [attr.aria-label] to icon-only sort header columns in grouped-summary - Change message-icon from non-focusable <a> to <button> in debug-icons Other: - Fix JobStatusIcon doc comment (was "clarity icon shapes", now "Material icon names") Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 34 changed files in this pull request and generated 10 comments.
Comments suppressed due to low confidence (1)
.circleci/config.yml:69
- CircleCI caching is still keyed only on
ui/package.json, but dependency resolution is now driven byyarn.lock. Ifyarn.lockchanges withoutpackage.jsonchanging, CI may restore an incompatiblenode_modulescache and produce flaky builds. Includeui/yarn.lockin the cache key checksum (and consider also caching Yarn’s download cache if used) to keep installs deterministic.
cd ui
yarn install
- save_cache:
key: node-modules-{{ .Branch }}--{{ checksum "ui/package.json" }}
paths:
- "ui/node_modules"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CSS files: replace clr-icon/clr-tooltip-content selectors with mat-icon equivalents in table, filter-header, panels, and scattered-attempts components. Remove dead clr-tooltip-content rules throughout. Styles: scope status icon color rules from global mat-icon.<name> to mat-icon.job-status-icon.<name> to avoid unintentionally colouring other mat-icons that happen to share a name like 'error' or 'cancel'. Add class="job-status-icon" to all nine status mat-icon usages across templates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 38 changed files in this pull request and generated 12 comments.
Comments suppressed due to low confidence (1)
ui/src/app/dashboard/total-summary/total-summary.component.spec.ts:46
- This spec no longer imports Clarity modules, but the component template now renders . The TestBed module here does not import MatIconModule (or SharedModule which exports it), so the test will fail template compilation unless MatIconModule/SharedModule is added to the imports.
imports: [
CommonModule,
MatCardModule,
MatTableModule,
RouterTestingModule,
],
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Replace clr-icon with mat-icon (+ font-size) in attempt, tabs, grouped-summary CSS - Remove all stale clr-tooltip-content and Clarity-specific CSS rules - Fix debug-icons CSS: remove Clarity rules, set active icon color (#5C912E), separate disabled rule - Add aria-label to all icon-only controls in debug-icons (message, backend log, directory, compute details) - Fix <a> without href in table.component.html -> <button type="button">; update CSS selector - Fix brittle header text assertion in panels.component.spec.ts to use text node inspection - Add yarn.lock to CircleCI cache key checksums - Use yarn install --immutable in CI for reproducible installs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 42 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@angular/platform-browser": "^20.0.0", | ||
| "@angular/platform-browser-dynamic": "^20.0.0", | ||
| "@angular/router": "^20.0.0", | ||
| "@webcomponents/custom-elements": "^1.5.0", | ||
| "angular-oauth2-oidc": "^14.0.1", | ||
| "angular-oauth2-oidc": "^20.0.0", | ||
| "core-js": "^3.25.0", | ||
| "rxjs": "^7.5.6", |
There was a problem hiding this comment.
The PR description lists Angular/Clarity upgrade steps, but this diff also bumps angular-oauth2-oidc from ^14 to ^20. Since this is a major dependency upgrade that can introduce breaking changes, please either (a) call it out in the PR description/migration notes or (b) justify why it’s required for Angular 20 compatibility and confirm any necessary config changes were made.
There was a problem hiding this comment.
angular-oauth2-oidc follows Angular's major version numbering convention — v14 is compatible with Angular 14, v20 with Angular 20. The bump from ^14 to ^20 is required to satisfy the library's Angular peer dependency; without it, the install would fail with peer dependency conflicts. No configuration changes were needed as the library's API and usage in this project remain unchanged between these versions.
aednichols
left a comment
There was a problem hiding this comment.
Seems reasonable to me – I feel good about getting rid of Clarity as it is somehow also owned by Broadcom, similar to Bitnami.
It looks like we replaced a lot of icons, I'm wondering how much it changes the look of the UI? I don't think change is an issue in and of itself but we should make sure the visuals are decent.
Angular 20 requires Node >=20.19.0; the previous Node 18 base images would fail to install dependencies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Clarity bundled its own icons, so Material Icons font was never loaded explicitly. Now that all icons use mat-icon, the font must be loaded. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
aednichols
left a comment
There was a problem hiding this comment.
Thank you for the visual fixes!
JIRA Ticket: https://broadworkbench.atlassian.net/browse/CTM-401