Skip to content

refactor(list): migrate remaining app-table consumers onto signal-list - #5402

Merged
norman-abramovitz merged 7 commits into
cloudfoundry:developfrom
nabramovitz:refactor/delete-legacy-list-framework
May 31, 2026
Merged

refactor(list): migrate remaining app-table consumers onto signal-list#5402
norman-abramovitz merged 7 commits into
cloudfoundry:developfrom
nabramovitz:refactor/delete-legacy-list-framework

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Workstream T — migrate the remaining <app-table> / TableComponent consumers onto <app-signal-list>

Part of the legacy ngrx list/ framework teardown. This branch frees the lightweight <app-table> / ITableListDataSource table by migrating its last consumers to the signal-list, and restores per-row functionality that the rewrite had dropped. (The only remaining <app-table> in the tree is the kubernetes workload list, which is workstream K — the heavy kubernetes-resource-list <app-list-view> fallback — out of scope here.)

Signal-list framework additions (grounded in v4.9.2, restoring dropped UI)

  • Per-row rowState (SignalListConfig.rowState): row coloring (error/warning/info), a structured-segment message sub-row (text/bold/tone/link/break — declarative, no innerHTML), plus deleting/blocked/busy affordances. This is also the per-row feedback layer future bulk operations need.
  • Tri-state select-all header + per-row onToggle on kind: 'checkbox' columns (restores the v4.9.2 TableHeaderSelectComponent). Framework-level, so both k8s and CF bulk-select consume it.
  • 50/50 signal-list specs pass.

Consumer migrations

  • app-action-monitor — deleted the dead table component (nothing rendered it).
  • helm-release-history-tab — static read-only table → signal-list.
  • backup-endpoints — → signal-list, reusing the checkbox/connection cells as appSignalListCell template cells.
  • kube-config selection — native checkbox + tri-state select-all, signal-native inline name edit (drops TableCellEditComponent), rowState validation messages, reused type/user/cert cells. Also fixes a regression: the Angular 20 signal/strict migration rewrote the file-picker gate !(clusters$ | async) as (clusters$ | async) === false, which never matches (clusters$ is array | null), leaving the picker unreachable so the page could not load a kube config.
  • kube-config import — action/description text columns + a status template cell rendering <app-action-monitor-icon>; per-action error/skip messages ride rowState.
  • manage-users org-roles table — org-select cell reused; the four role columns render <app-cf-role-checkbox> directly (matching the already-migrated space-roles list).

Cleanup

Deleted now-orphaned cells: app-action-monitor table, kube-config name + select cells, kube-config import-status wrapper, and TableCellRoleOrgSpaceComponent; pruned the kubernetes setup module.

Verification

Full gate green locally: lint (no errors), vitest 2465 passed / 3 skipped / 0 failed, production build succeeds, jetstream Go tests pass. Each migration was validated with a production build before commit.

The <app-action-monitor> table component was rendered nowhere (the live
app-action-monitor-icon is a separate component, kept). Drop it and its
module declaration / public-api export ahead of the legacy list teardown.
Restores two affordances dropped in the rewrite (grounded in v4.9.2):

- Per-row rowState: row coloring (error/warning/info), structured message
  segments (bold/tone/link/break, not innerHTML), a __rowMessage template
  hook, plus the deleting bar / blocked dim / busy spinner that gave
  multiline-bulk operations their per-row feedback.
- Tri-state checkbox select-all header (consumer-driven selectableCount/
  onToggle) + per-row onToggle for side effects, restoring the legacy
  TableHeaderSelectComponent. Framework-level: serves CF bulk ops and k8s.

50 specs pass.
Replace the legacy <app-table> + ITableListDataSource with a
signal-list config (static read-only history, toSignal of
fetchReleaseHistory, fixed newest-first order). Drops a TableComponent
consumer.
Replace <app-table> with <app-signal-list>; reuse the checkbox and
connection cells as projected appSignalListCell templates. A refreshTick
signal bumps the endpoints array reference after Select All/None so the
OnPush cells re-render under zoneless change detection.
Migrate kube-config-selection off the legacy <app-table>/TableComponent
(workstream T, T4):
- select column -> signal-list `kind: 'checkbox'` with the restored
  tri-state select-all header + a per-row onToggle that runs the helper
  validity pass; selection mirrors each cluster's `_selected` flag via
  selectedKeys, rebuilt in clustersChanged()
- name -> inline signal-native edit in the host (drops the legacy
  TableCellEditComponent dependency)
- url -> text; type/user/cert reuse the existing cells as
  appSignalListCell template cells
- per-row validation messages/coloring ride config.rowState = row._state

Also restore the file-picker gate: the Angular 20 signal/strict-mode
migration rewrote the v4.9.2 `!(clusters$ | async)` as
`(clusters$ | async) === false`, which never matches (clusters$ is
array|null, filtered to truthy), leaving the picker unreachable so the
page could not load a kube config at all.

Delete the now-orphaned select + name cell components and drop them
from the kubernetes setup module.
Migrate the kube-config import step off the legacy <app-table>
(workstream T, T5):
- action/description -> signal-list text columns
- per-action progress icon -> a `status` template cell rendering
  <app-action-monitor-icon>, fed a per-row-cached actionState observable
  (asObservable() mints a fresh stream per call, so cache by action to
  avoid re-subscribing every change-detection pass)
- per-action skip/error messages ride config.rowState = row.state

Drop the now-orphaned KubeConfigTableImportStatusComponent wrapper (its
cellConfig(row) indirection is no longer needed) and remove it from the
kubernetes setup module. The sequential register/connect processing is
unchanged.
Migrate the manage-users-modify org-roles table off the legacy
<app-table>/TableComponent (workstream T, T4b) — the last <app-table>
consumer outside the kubernetes workload list:
- org select column reuses the existing app-table-cell-select-org cell
  as an appSignalListCell template
- the four role columns (manager/auditor/billing manager/user) render
  app-cf-role-checkbox directly, matching the already-migrated
  space-roles-list-wrapper pattern, instead of going through the
  TableCellRoleOrgSpaceComponent wrapper
- the single-org row + loading feed signal-list via writable signals
  fed from the existing orgConnect$/isTableLoading$ chains

Delete the now-orphaned TableCellRoleOrgSpaceComponent.

@norman-abramovitz norman-abramovitz 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.

The next step in removing ngrx and replacing with angular signals.

@norman-abramovitz norman-abramovitz 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.

One more step to eliminating the ngrx code.

@norman-abramovitz
norman-abramovitz merged commit e987a8c into cloudfoundry:develop May 31, 2026
12 checks passed
@nabramovitz
nabramovitz deleted the refactor/delete-legacy-list-framework branch June 17, 2026 08:12
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.

2 participants