Skip to content

feat(sandboxes): server-side ordering and state filter for sandbox list#475

Draft
huv1k wants to merge 1 commit into
mainfrom
huv1k/sandbox-list-sort-and-state-filter
Draft

feat(sandboxes): server-side ordering and state filter for sandbox list#475
huv1k wants to merge 1 commit into
mainfrom
huv1k/sandbox-list-sort-and-state-filter

Conversation

@huv1k

@huv1k huv1k commented Jun 26, 2026

Copy link
Copy Markdown
Member

What

Moves the new sandbox list (list2) ordering to the server and adds a running/paused state filter, both pushed to GET /v2/sandboxes so they apply across the whole dataset, not just the pages already loaded into the infinite-scroll list.

Changes

  • Ordering (server-side): derive an order (asc/desc) from the Started At sort header and pass it into listSandboxesPaginated. The table now uses manualSorting and refetches from page 1 on toggle. Default desc matches the SSR prefetch key.
  • State filter: new State entry in the Filters dropdown with Running/Paused multi-select, rendered with the existing status Badges to match the Figma design. Both selected = no filter (server default); selecting one sends state=.... Always keeps at least one selected.
  • Threaded order/states through the tRPC router and sandboxes repository; included state in the empty-state and scroll-reset logic; regenerated infra types for the new order param.

Notes

Test

Open list2 → toggle Started At (watch Network: order=asc|desc), and Filters → State → Running/Paused (state=...). Verify ordering/filtering hold beyond the first 50 rows.

Switch the new sandbox list (list2) to server-side ordering and add a
running/paused state filter, both pushed to GET /v2/sandboxes so they apply
across the whole dataset instead of only the loaded pages.

- Thread an order (asc|desc) param derived from the startedAt sort header into
  the paginated query; the table now uses manualSorting and refetches on toggle.
- Add a State filter (running/paused) to the Filters dropdown, rendered with the
  existing status badges; selecting one sends state=... to the API.
- Wire states/order through the tRPC router and sandboxes repository; regenerate
  infra types for the new order param.
@cla-bot cla-bot Bot added the cla-signed label Jun 26, 2026
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 26, 2026 3:13pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant