CF endpoint service: retire ngrx + extend counts handlers with org/space filters#5341
Merged
norman-abramovitz merged 5 commits intoMay 18, 2026
Conversation
CfOrgCardComponent was the V2 ngrx-era card for the org list, but no module declaration or list-config references it anymore — the per-CF Organizations tab is signal-list driven via cf-orgs-signal-config.service. The only remaining references were the component's own files and historical comments in sibling cards. Removes one ngrx survivor file (the component imports Store + cfEntityCatalog) and the only real caller of CloudFoundryEndpointService.deleteOrg, which lets A.cloudfoundry#1's later deleteOrg cleanup drop the V2 cfEntityCatalog dispatch entirely. Part of A.cloudfoundry#1 (cloudfoundry-endpoint.service ngrx retirement).
A.cloudfoundry#1 retires CloudFoundryEndpointService.fetchAppCount and fetchRouteCount — the V2 ngrx-pagination helpers that scoped counts by orgGuid / spaceGuid client-side. The native handlers' ?return=counts branches were cnsi-wide by design (home-page card, endpoint totals) and rejected filter forwarding as dead code. A.cloudfoundry#1 makes that filter forwarding a live consumer: the per-org Apps and Routes summary cards need an org-scoped count without paying for a full apps/routes drain. Both getNativeApps and getNativeRouteCount counts branches now honor organization_guids and space_guids using the same comma-split convention as the existing list-path filters. Updates the TestGetNativeRouteCount_SpaceGuidsFilter assertion that explicitly pinned the old cnsi-wide-by-design behavior, and adds parallel coverage for the apps handler.
A.cloudfoundry#1 closeout. CloudFoundryEndpointService no longer dispatches V2 ngrx pagination actions for app/route counts; the static fetchAppCount and fetchRouteCount helpers (which took Store + PaginationMonitorFactory + ngrx action classes) become instance methods that hit /pp/v1/cf/{apps,routes}/{cnsi}?return=counts directly with the new organization_guids / space_guids filters. Drops dead code: fetchDomains and deleteOrg had zero callers once cf-org-card was removed; they retained the cfEntityCatalog import surface alone, so deleting them eliminates the last catalog-dispatch reference on this service. Sibling services (CloudFoundryOrganizationService, CloudFoundrySpaceService) and the cf-space-card list cell are updated to call the instance methods. PaginationMonitorFactory drops out of cf-space-card entirely. Store stays in the sibling services for now — fetchServiceInstancesCount keeps the V2 dispatch alive there, and that's A.cloudfoundry#9 territory. New spec pins the URL shape of the count helpers and the 0-on-error degradation path so a transient CAPI hiccup never turns a count cell red.
|
The component has CloudFoundryOrganizationService in its own component-level providers array, which overrides the test's mockOrgService and runs the real org service against the mocked CloudFoundryEndpointService. Real org service calls this.cfEndpointService.fetchRouteCount(...) in initialiseObservables (added in this PR), which TypeError'd because the mock didn't expose the new instance method. Stub fetchAppCount and fetchRouteCount on the mock to return of(0) — they're not what this spec asserts on (it only checks component truthy-creation).
norman-abramovitz
approved these changes
May 18, 2026
04876c1
into
cloudfoundry:develop
11 of 12 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Track A workstream #1 (CF endpoint service ngrx retirement). Three atomic
commits, safe to revert individually:
Remove orphan
cf-org-cardcomponent. No module declaration orlist-config referenced it anymore — the per-CF Organizations tab is
signal-list driven via
cf-orgs-signal-config.service. Removes theonly real consumer of
CloudFoundryEndpointService.deleteOrg.Backend:
?return=countsbranches honororganization_guids+space_guidsfilters.getNativeAppsandgetNativeRouteCountwerecnsi-wide on the counts tier by design — comment said adding filter
forwarding would be dead code. A.Integrating helion-ui-framework #1 makes that filter forwarding live:
the per-org Apps and Routes summary cards need an org-scoped count
without paying for a full apps/routes drain. Uses the same comma-split
convention as the list-path filters. Updates the
TestGetNativeRouteCount_SpaceGuidsFilterassertion that pinned theold cnsi-wide-by-design behavior and adds parallel coverage for the
apps handler.
CF endpoint service: retire ngrx, swap counts to native. Static
fetchAppCountandfetchRouteCount(which tookStore+PaginationMonitorFactory+ ngrx action classes) become instancemethods that hit the native handlers directly. Dead methods (
deleteOrg,fetchDomains— both had zero callers after step 1) deleted, whicheliminates the last
cfEntityCatalogreference on this service. Siblingservices (
CloudFoundryOrganizationService,CloudFoundrySpaceService)and
cf-space-cardupdated to call the instance methods.Storestaysin the sibling services for now —
fetchServiceInstancesCountkeepsthe V2 dispatch alive there, and that's A.Installing JavaScript libraries #9 territory.
After this PR,
cloudfoundry-endpoint.service.tshas zero@ngrx/*imports.
Test plan
make check gategreen on the full branchbackwards-compat for unfiltered counts)
0-on-error degradation)
summary card counts match what the legacy ngrx-pagination helper
returned