Skip to content

feat(admin): paginate + search /api/admin/networks/{id}/members#69

Merged
TeoSlayer merged 1 commit into
mainfrom
feat/members-pagination
Jun 9, 2026
Merged

feat(admin): paginate + search /api/admin/networks/{id}/members#69
TeoSlayer merged 1 commit into
mainfrom
feat/members-pagination

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Backbone has 218k members; returning the full list was a 30 MB payload that froze the dashboard. Adds limit/offset/q params with safe defaults (200, hard-cap 5000). Filters case-insensitive on hostname OR node_id. Response gains total / filtered_total so the UI can render pagination state. No regression for callers that don't use the new params — they get a fast 200-row first page.

Production backbone has 218k members. Returning the full list as one
JSON payload was ~30 MB and would freeze the dashboard.

Three query params:
  ?limit=N    cap on rows returned. Default 200, max 5000.
  ?offset=N   skip the first N (page through).
  ?q=...      case-insensitive substring filter against hostname OR
              stringified node_id. Applied BEFORE limit/offset so
              "first 200 matches for 'pilot-0001'" works as expected.

Response gains three fields so the UI can render pagination state:
  total           true total in the network
  filtered_total  rows after q (== total when q is empty)
  offset          echoed back
  limit           echoed back (after server cap)

Behaviour for non-paginated callers is unchanged: with no query params
they get the first 200 members and the count + filtered_total tell
them how much more is available.
@TeoSlayer TeoSlayer merged commit 5d0de96 into main Jun 9, 2026
1 check passed
@TeoSlayer TeoSlayer deleted the feat/members-pagination branch June 9, 2026 10:48
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