Skip to content

refactor: remove the legacy ngrx list framework - #5405

Merged
norman-abramovitz merged 21 commits into
cloudfoundry:developfrom
nabramovitz:refactor/list-framework-extract
Jun 1, 2026
Merged

refactor: remove the legacy ngrx list framework#5405
norman-abramovitz merged 21 commits into
cloudfoundry:developfrom
nabramovitz:refactor/list-framework-extract

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Summary

Removes the legacy ngrx list/ framework (the core and cloud-foundry shared/components/list/ trees plus cf-list-data-source.ts) now that all consumers render via the signal-native <app-signal-list>. Live code still living inside the framework is relocated into permanent signal-native homes first, then the framework is deleted outright.

What changed

Relocate live code out of list/:

  • The cf-service-card cluster is converted off ngrx (Store / EntityServiceFactory removed; CfOrgSpaceLabelService now sources the CF name from EndpointsSignalService) and moved to shared/components/cards/cf-service-card/.
  • The confirm/select cells move into the manage-users feature beside their consumers.
  • The page-size helpers, the IListAction family, and the endpoint cluster (cards/cells + EndpointListHelper, with the unused Store parameter dropped from the endpointListActions entity-catalog contract) move into shared/components/signal-list/ and a new shared/components/endpoint-list/.

Delete the framework:

  • SharedModule is unwired from the framework; both list/ trees, cf-list-data-source.ts, and the dead Kubernetes/Helm list cells are deleted.
  • A few barrel-exported survivors (TableCellStatusDirective, extractActualListEntity, ISimpleListConfig) are relocated into signal-list/ and remain exported from @stratosui/core, so consumers are unchanged.

Testing

make check gate is green — lint, 2324 unit tests (0 failures), the production build, and the Go tests all pass.

… list framework

Source CfOrgSpaceLabelService's CF name from EndpointsSignalService
instead of store.select(selectEntity(...)); its public observable API is
unchanged so CfOrgSpaceLinksComponent is untouched. Org/space resolve
empty, matching the live breadcrumb path (which passes only cfGuid).

Drop the ngrx Store from all four callers (cf-service-card,
service-cf-breadcrumbs, and the dead card-app / TableCellAppCfOrgSpaceBase
cells) plus the vestigial EntityServiceFactory provider on the card.

Relocate the live cf-service-card cluster (card + 6 table-cell-service-*
cells) out of components/list/list-types/cf-services into
shared/components/cards/cf-service-card so workstream D can delete the
list framework. Repoint select-service and the spaces table-cell-service
consumer.
Move the three live, ngrx-free table cells out of
shared/components/list/list-types into the manage-users feature beside
their sole consumers, so workstream D can delete the list framework:

  cf-confirm-roles/table-cell-confirm-org-space   -> manage-users-confirm/
  cf-confirm-roles/table-cell-confirm-role-add-rem -> manage-users-confirm/
  cf-users-org-space-roles/table-cell-select-org  -> manage-users-modify/

The cells already import TableCellCustom from the signal-list home and
sit at the same tree depth, so only the two consumer import paths change.
Lift the page-size sentinel + helpers (PAGE_SIZE_ALL, PageSizeSentinel,
isPageSizeSentinel, resolvePageSize, getPageSizeLabel, and the default
page-size option arrays) out of the legacy list.component.types into
shared/components/signal-list/page-size.types so they survive deletion
of the list framework. Repoint the live app-paginator + public-api at
the new home; the dead list.component / list.component.types keep using
them via the new import until D deletes them.
Lift the list-action contract interfaces (IBaseListAction, IListAction,
IOptionalAction, IMultiListAction, IGlobalListAction) out of the legacy
list.component.types into shared/components/signal-list/list-action.types
so they survive deletion of the list framework, and export them from
public-api. Repoint the live consumers (store entity-catalog.types, helm
endpoint generator) + the dead-until-D consumers (list.component,
table-cell-actions) at the new home; base-cf-list-config resolves via the
@stratosui/core barrel. Drop the now-orphaned ActionState import.
The endpointListActions entity-catalog hook passed an ngrx Store to each
endpoint type's action builder, but the sole implementor (helm) never
used it — it refreshes via EndpointsDataService. Drop the param from the
contract (entity-catalog.types), the helm implementation, and the caller
EndpointListHelper, which no longer injects Store. Behavior-preserving;
removes the last ngrx coupling from the endpoint cluster ahead of its
relocation out of the list framework.
Move the live, now-ngrx-free endpoint cells + helper (endpoint-card,
table-cell-endpoint-address/name/status, endpoint-list.helpers incl. the
public-API EndpointListDetailsComponent base) from
shared/components/list/list-types/endpoint into a dedicated
shared/components/endpoint-list so workstream D can delete the list
framework. Repoint TableCellCustom/CardCell at signal-list/cell-base,
drop the vestigial listCards self-registration, and update public-api,
SharedModule, and the core/kube/git/metrics consumers. The dead
table-cell-endpoint-details + endpoint-data-source.helpers stay behind
for deletion in D.
Remove SharedModule's imports/exports/providers of the legacy list
framework (ListComponent, ListViewComponent, EntityListViewComponent,
TableComponent, listCardComponents, listTableComponents,
MaxListMessageComponent, ListHostDirective, TableCellStatusDirective,
the empty table-cell-request-monitor-icon/side-panel imports, and the
vestigial ListConfig provider). Nothing live consumes them — the table
and list-view consumers were migrated in workstreams T and K. The
endpoint cluster references are kept (already repointed to
endpoint-list/). Clears the way for D to delete the list/ trees.
Delete both list/ trees (core + cloud-foundry), cf-list-data-source.ts,
and the 17 confirmed-dead kubernetes/helm list cells. Strip the now-dead
list/ re-export lines from the core and cloud-foundry public APIs.

Three symbols the framework still exported turned out to be live and are
relocated into the signal-list module (re-exported from @stratosui/core
so consumers are unchanged):
  - TableCellStatusDirective  (used by card-app-usage)
  - extractActualListEntity   (used by cf.helpers)
  - ISimpleListConfig         (opaque holder type for the kubernetes
                               UI/list ConfigHolder registries)

Also fix a latent RC bug the production build surfaced: cf-org-space-label
imported APIResource from cf-api.types (which only re-imports it) instead
of @stratosui/store. Drop add-route-stepper's obsolete ListConfig
leak-guard test (the type it guarded no longer exists).

Full `make check gate` green: 2324 tests pass, production build + go
tests pass. The legacy list framework is gone.
@nabramovitz

Copy link
Copy Markdown
Contributor Author

Reviewer guide

Most of this PR is mechanical (file moves + import-path recomputation + ~200 deletions) that the gate and a local smoke already cover. Here's where reviewer judgment adds the most value, in priority order.

1. Behavior-preserving ngrx conversions (highest value)

The only places behavior could subtly change:

  • cloud-foundry/src/shared/services/cf-org-space-label.service.ts (commit "convert cf-service-card cluster off ngrx"). The CF name now comes from EndpointsSignalService; org$/space$ are hardcoded of(null). This preserves the live breadcrumb path, which only ever passes cfGuid (so org/space were always empty there); the callers that did pass org/space were the now-deleted legacy app cells. The public observable API is unchanged so CfOrgSpaceLinksComponent is untouched.
  • The endpointListActions contract change ("drop the unused Store param from endpointListActions"): store/.../entity-catalog/entity-catalog.types.ts drops the Store param; the implementor is kubernetes/.../helm/helm-entity-generator.ts; the caller is core/.../endpoint-list/endpoint-list.helpers.ts. Premise: helm was the sole implementor and never used store (it refreshes via EndpointsDataService). Worth a sanity grep.

2. One deliberate type-weakening

  • core/.../shared/components/signal-list/simple-list-config.types.ts. ISimpleListConfig<T> is redefined as Record<string, any> (its previous Omit<IListConfig<T>, 'getDataSource'> definition's dependencies are deleted). The two Kubernetes ConfigHolder registries use it purely as an opaque <any> holder, so nothing structural is lost — but it is a fidelity reduction. Flag here if a stricter shape is preferred.

3. Deletion scope

  • core/src/shared/shared.module.ts ("unwire the dead list framework") — confirm only dead-framework imports/declarations/exports/providers were removed and the four endpoint refs were kept/repointed.
  • The 17 deleted Kubernetes/Helm list cells (final delete commit) — if you know that area, sanity-check the dead list (especially helm-release-card and the kubernetes-service-cardkubernetes-service-ports chain). Their tabs are signal-native with inline columns now.

How to navigate

Review commit-by-commit, not the squashed diff — each commit is atomic and self-describing, ordered: RC → confirm/select cells → page-size / IListAction / endpoint-cluster relocations → unwire SharedModule → delete. The ~200-file deletion is the last commit and is almost entirely git rm.

Safe to skim: the relocation commits — pure moves; import correctness is covered by a file-existence resolution sweep and the green build/CI.

Verification done

  • Full make check gate green locally (lint, 2324 unit tests / 0 fail, production build, Go tests) and all CI checks green here.
  • Live smoke on a local console (0 console errors): endpoints page + actions menu (Edit/Unregister), the Create-Service → Select-Service cf-service-card (full card + the EndpointsSignalService-sourced CF breadcrumb), apps wall, marketplace, home favorites.

Pre-existing, unrelated (not introduced here)

CI/test logs show unhandled errors in kubedash-configuration, space-quota-definition, and kubernetes-summary specs (EndpointsDataService.waitFor('anything') and a reducer undefined). These predate this PR; the affected files still pass.

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

Did the review

@norman-abramovitz
norman-abramovitz merged commit b45e88d into cloudfoundry:develop Jun 1, 2026
12 checks passed
@nabramovitz
nabramovitz deleted the refactor/list-framework-extract branch June 1, 2026 14:20
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