Skip to content

feat(pagination): add server-side pagination and label filters (RHOAIENG-98858) - #122

Merged
Gkrumbach07 merged 2 commits into
mainfrom
98858/server-side-pagination-type-label-filter
Oct 22, 2026
Merged

Gkrumbach07 merged 2 commits into
mainfrom
98858/server-side-pagination-type-label-filter

Conversation

@danreed-rh

@danreed-rh danreed-rh commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add cursor-backed pagination for workspace-scoped and platform sandbox lists and workspace lists, with label selectors forwarded to the gateway.
  • Add an execution-environment type-label filter and page-aware selection in the UI.
  • Preserve the legacy array response when pageSize is absent; paged requests return items and nextPageToken.
  • Limit workspace draft-summary reads to visible sandbox names on paged lists.

Ticket: RHOAIENG-98858

The ticket describes limit and offset, but the pinned OpenShell Go SDK exposes PageSize and opaque PageToken in ListOptions. This PR uses that upstream cursor contract rather than inventing an offset layer.

Verification

  • Frontend lint and Prettier check: passed
  • Frontend typecheck: passed
  • Frontend Jest: 115 suites, 2,058 tests passed
  • Stubbed Cypress UI suite: 6 specs, 46 tests passed in Chrome
  • Go vet and go test ./...: passed
  • git diff --check: passed

The local gateway compatibility suite was not run because the Docker daemon is unavailable in this environment. CI should verify the real gateway contract. The make lint target reached its Go lint step, but golangci-lint is not installed locally; go vet ./... passed.

@danreed-rh
danreed-rh force-pushed the 98858/server-side-pagination-type-label-filter branch 2 times, most recently from 58f352f to 16e8445 Compare October 19, 2026 15:32
@danreed-rh danreed-rh changed the title feat(pagination): add server-side pagination and label filters feat(pagination): add server-side pagination and label filters (RHOAIENG-98858) Oct 20, 2026
@Gkrumbach07

Copy link
Copy Markdown
Contributor

Nice — pagination is genuinely server-side and stays relay-only (forwards the SDK Pager / opaque PageToken, and keeps the legacy array when pageSize is absent). Two things required before merge:

  1. Rebase onto main and move to the 0.1.5 SDK. The branch is on the pre-0.1.5 SDK and conflicts with fix: move to OpenShell 0.1.5 #118. The Create mocks here still use the removed CreateOptions struct / positional labels, so a straight conflict resolution won't compile — take main's functional CreateOption signatures and layer your listPageFn changes on top (your List additions themselves aren't affected by the Create break).
  2. Re-run CI after the rebase. The current green checks were built on the pre-0.1.5 base, so they don't prove 0.1.5 compatibility — please confirm build, check-backend, and compat (-count=1) are green on the rebased branch.

No rush on timing — this is tracked for 3.7 (RHOAIENG-98858), so it doesn't need to beat the 3.6 freeze.

@danreed-rh
danreed-rh force-pushed the 98858/server-side-pagination-type-label-filter branch from 0d99e32 to 7aafa70 Compare October 22, 2026 15:53
danreed-rh and others added 2 commits October 22, 2026 17:22
Signed-off-by: Daniel Reed <dareed@redhat.com>
#124 added a second NewSandboxService parameter (SandboxRawExec). The
pagination tests still made the one-argument call, so the handlers test
package stopped compiling after the rebase onto main. Pass nil, as the
other handler tests do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gkrumbach07
Gkrumbach07 force-pushed the 98858/server-side-pagination-type-label-filter branch from 7aafa70 to 5b95b7f Compare October 22, 2026 22:25
@Gkrumbach07

Copy link
Copy Markdown
Contributor

Heads-up: I rebased this branch onto main (now with #124 and the e2e CI fix) and force-pushed it (7aafa70 → 5b95b7f).

  • The only conflict was the import block in frontend/src/api/sandboxes.ts; I kept both sides.
  • Add live logs streaming #124 added a second parameter to services.NewSandboxService, so list_pagination_test.go stopped compiling. I added a one-line fix commit (5b95b7f) that passes nil, like the other handler tests.
  • Build, vet, Go tests, typecheck, lint and Jest pass locally.

Before you push again, reset your local branch:

git fetch origin && git reset --hard origin/98858/server-side-pagination-type-label-filter

@Gkrumbach07
Gkrumbach07 merged commit 61e2590 into main Oct 22, 2026
14 checks passed
Gkrumbach07 added a commit that referenced this pull request Oct 22, 2026
Since server-side pagination (#122) the sandbox list has a third filter and
a pager above it, and at CI's 1280x720 viewport its second row starts below
the fold of the page's scrolling content area. Cypress counts a row its
scroll container clips as not visible, so "displays sandbox list with
different phases" failed on main's push runs for 61e2590 and 70afb39 ("its
content is being clipped by one of its parent elements, which has a CSS
property of overflow"). Each row is now scrolled to before it is checked.

The workspace draft-summary stub also matched only a bare path, while the
paged list asks with ?sandbox=..., so those requests fell through to a BFF
that is not running and answered 500. The stub now matches with a query.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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