Skip to content

Bulk route delete/unmap + bulk Manage Roles, single-call per-row Unmap - #5444

Merged
norman-abramovitz merged 4 commits into
cloudfoundry:developfrom
nabramovitz:feature/bulk-actions-cascade-delete
Jun 13, 2026
Merged

Bulk route delete/unmap + bulk Manage Roles, single-call per-row Unmap#5444
norman-abramovitz merged 4 commits into
cloudfoundry:developfrom
nabramovitz:feature/bulk-actions-cascade-delete

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Summary

Restores the V2-era bulk (multi-select) list actions lost in the signal-native migration, on the Routes and Users tabs. Architecture: Option B (backend controls fan-out). Builds on the now-shipped signal-list checkbox-column + bulk-action-bar framework slot.

Backend — bulk fan-out infrastructure

  • bulkFanout helper: bounded (concurrency 6), input-order results, per-item failures never cancel siblings; BulkResult/BulkItemResult envelope (per-item COMPLETE/FAILED/PENDING).
  • POST /pp/v1/cf/routes/{cnsi}/bulk/delete — N route DELETEs, each through the existing RunFastPath job contract.
  • POST /pp/v1/cf/routes/{cnsi}/bulk/unmap — atomic PATCH destinations:[] per route.
  • POST /pp/v1/cf/routes/{cnsi}/{route}/unmap_all — single-route atomic unmap (backs the per-row optimization).
  • Validates empty / >100 guids → 400. Wire-level tests: happy path, partial failure, unmap bodies, validation.

Frontend — Routes tabs (CF + Space)

  • Checkbox column with tri-state select-all across the filtered set; bulk bar with Unmap (disabled unless a selected route has bindings) and Delete, count-aware confirms, partial-failure snackbars.
  • Per-row Unmap optimization (folded in): unmapAllAppsFromRoute now issues one atomic unmap_all PATCH instead of N per-app DELETEs.

Frontend — Users tabs (CF + Org + Space)

  • Checkbox column + bulk Manage Roles, navigating to the manage-users wizard via ?users=g1,g2,g3 — the multi-user URL the wizard already parsed (single ?user= fallback intact). Navigation-only, no ngrx. Bulk Remove intentionally omitted (verified never existed in V2; net-new affordance, deferred).

Verification

  • Backend plugin suite green; frontend tsc clean; 162 cloud-foundry route+user specs green.
  • Live-verified against real CF (e2e sandbox): bulk delete (3 routes deleted, others untouched), bulk unmap (route survives unmapped, app survives route-less — atomic destinations:[]), Unmap disabled/enabled logic both directions, bulk Manage Roles loaded both selected users into the wizard.
  • Also re-verified the app cascade-delete wizard (routes + service-instance unbind + app delete) end-to-end while in here — works; earlier suspected regression was a test-harness artifact.

Deferred per plan: the eight V3 bulk-add surfaces (quota→orgs, iso-seg→orgs, etc.) and bulk Remove on Users.

Option-B bulk model (backend controls fan-out): a bounded bulkFanout
helper (sem-channel, concurrency 6, input-order results, per-item
failures never cancel siblings) + a BulkResult/BulkItemResult envelope.
Three handlers on the routes resource:
  POST /cf/routes/{cnsi}/bulk/delete  — N DELETEs, each via the
    existing RunFastPath job contract (COMPLETE/FAILED/PENDING per item)
  POST /cf/routes/{cnsi}/bulk/unmap   — atomic PATCH destinations:[] per
    route
  POST /cf/routes/{cnsi}/{route}/unmap_all — single-route atomic unmap
    (backs the per-row Unmap optimization)
Validates empty / >100 guids → 400. Wire-level tests cover happy path,
partial failure, unmap bodies, and validation.
CF and Space Routes tabs gain a checkbox column (with tri-state
select-all across the filtered set) and a bulk-action bar: Unmap
(disabled unless a selected route has bindings) and Delete, each with
a count-aware confirm and partial-failure snackbar reporting. Bulk ops
call the new /bulk/{delete,unmap} endpoints; selection clears after.

Per-row Unmap (unmapAllAppsFromRoute) now issues one atomic
/{route}/unmap_all PATCH instead of fanning out N per-app DELETEs.
Exports SignalListBulkAction from core public-api for consumers.
Each Users tab gains a checkbox column (tri-state select-all across the
filtered set) and a bulk Manage Roles action that navigates to the
manage-users wizard with ?users=g1,g2,g3 — the multi-user URL the
wizard already parses (with single ?user= fallback). Navigation-only,
no ngrx dispatch; selection clears on navigate. Scope-correct manage
URLs (cf / org / space segments). Specs updated for the leading
checkbox column header.

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

LGTM

@norman-abramovitz
norman-abramovitz merged commit 59df363 into cloudfoundry:develop Jun 13, 2026
12 checks passed
@nabramovitz
nabramovitz deleted the feature/bulk-actions-cascade-delete branch June 13, 2026 17:01
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