fix(inbounds): keep Detach Clients responsive on large inbounds (#7332)

Replace the unbounded Detach Clients modal with server-paged candidate loading, debounced search and a virtualized list. Preserve explicit-ID selection and add frozen all-matching scopes with exclusions so selection remains stable across pages and searches without sending an N-sized client list from the browser.

Execute large detach requests as idempotent background jobs. Revalidate source-inbound membership in bounded batches, atomically apply membership deltas, preserve ClientRecords and traffic, and queue reconciliation for remote nodes. Keep the legacy email-based bulkDetach API compatible.

Add PostgreSQL/SQLite regression coverage for concurrent membership changes, stale scopes, exclusions, retries, rollback and legacy callers, plus real master/node coverage for offline-node reconciliation. Regenerate and validate the API contract and OpenAPI artifacts.
This commit is contained in:
Hamed
2026-12-03 14:24:47 +03:30
committed by GitHub
parent 45f6596663
commit c483882e56
36 changed files with 2851 additions and 175 deletions
+6
View File
@@ -258,6 +258,12 @@ jobs:
exit 1
fi
- name: PostgreSQL scoped detach regressions
run: |
set -o pipefail
go test ./internal/web/service -run '^TestScopedDetach' -count=1 -v | tee /tmp/postgres-scoped-detach.log
test "$(grep -c -- '^--- PASS: TestScopedDetach' /tmp/postgres-scoped-detach.log)" -eq 3
- name: PostgreSQL depletion query regressions
run: |
set -o pipefail