Skip to content

feat(gateway): filter List by status and report updated_at_ms - #968

Merged
behinddwalls merged 1 commit into
mainfrom
gateway-list-status
Oct 28, 2026
Merged

behinddwalls merged 1 commit into
mainfrom
gateway-list-status

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Why?

The web UI's queue activity needs to show when each request last changed and to narrow the list to statuses such as landed. RequestSummary carried no update time, and List could only page through every receipt, so a status view would have had to download unfiltered pages until it found enough matches.

What?

  • RequestSummary.updated_at_ms exposes the stored time of the current status; it equals received_at_ms until the status first changes.
  • ListRequest.statuses restricts results to the given current statuses. The controller already reads each receipt's summary, so it skips non-matches and keeps reading until the page fills, the range ends, or 500 receipts have been read. The cursor resumes after the last receipt read, so a filtered page may be short or empty while next_page_token is set.
  • The page token carries the canonical (sorted, deduplicated) filter; a continuation that omits statuses takes the token's, and one that supplies a different set is invalid. Tokens without a filter decode as before, and unfiltered calls make the same single pageSize+1 receipt read as today.
  • No new index: filtering stays a scan over the receipt key range plus get-by-key summary reads.

Test Plan

✅ bazel test //submitqueue/gateway/... //service/submitqueue/gateway/... //submitqueue/client/...
✅ bazel test //test/integration/submitqueue/gateway:go_default_test (filtered paging and updated_at_ms over the wire against MySQL)

Stack

  1. @ feat(gateway): filter List by status and report updated_at_ms #968
  2. feat(web): page, filter, and restyle the SubmitQueue UI #969

🤖 Generated with Claude Code

@behinddwalls
behinddwalls marked this pull request as ready for review October 28, 2026 02:42
@behinddwalls
behinddwalls requested review from a team and sbalabanov as code owners October 28, 2026 02:42
@behinddwalls
behinddwalls added this pull request to stack #970 October 28, 2026 02:43
## Summary

### Why?

The web UI's queue activity needs to show when each request last changed and to narrow the list to statuses such as `landed`. `RequestSummary` carried no update time, and `List` could only page through every receipt, so a status view would have had to download unfiltered pages until it found enough matches.

### What?

- `RequestSummary.updated_at_ms` exposes the stored time of the current status; it equals `received_at_ms` until the status first changes.
- `ListRequest.statuses` restricts results to the given current statuses. The controller already reads each receipt's summary, so it skips non-matches and keeps reading until the page fills, the range ends, or 500 receipts have been read. The cursor resumes after the last receipt read, so a filtered page may be short or empty while `next_page_token` is set.
- The page token carries the canonical (sorted, deduplicated) filter; a continuation that omits `statuses` takes the token's, and one that supplies a different set is invalid. Tokens without a filter decode as before, and unfiltered calls make the same single `pageSize+1` receipt read as today.
- No new index: filtering stays a scan over the receipt key range plus get-by-key summary reads.

## Test Plan

✅ `bazel test //submitqueue/gateway/... //service/submitqueue/gateway/... //submitqueue/client/...`
✅ `bazel test //test/integration/submitqueue/gateway:go_default_test` (filtered paging and `updated_at_ms` over the wire against MySQL)
@behinddwalls
behinddwalls added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 00286d9 Oct 28, 2026
19 checks passed
@behinddwalls
behinddwalls deleted the gateway-list-status branch October 28, 2026 18:04
Tmwakalasya pushed a commit to Tmwakalasya/submitqueue that referenced this pull request Oct 29, 2026
## Summary

### Why?

Queue activity only showed the last 24 hours, so a quiet queue looked
empty even when it had history; paging meant clicking through snapshot
pages, and there was no way to see only requests in a given status or
when each last changed. Queue names also sat at the root of the URL
space, where a queue named `api` or `healthz` would collide with host
routes, and the move to BaseUI (uber#888) had replaced SubmitQueue's
original centered look with full-width defaults that read worse.

### What?

- **Queue activity**: starts at the newest request however old and loads
older pages automatically near the bottom (Load more button, retry on
failure); loaded rows and scroll position survive request visits, and
refreshes update statuses in place behind "Show latest requests".
Stovepipe's infinite-scroll list moves to `web/platform` as
`PagedRequests` / `RequestPagesProvider` and both modules use it.
- **Status filter and Updated column**: a status multi-select restricts
the list through the gateway's `statuses` filter, shareable as repeated
`?status=` parameters; an Updated column and summary fact show
`updated_at_ms`.
- **URLs**: pages live under `/queue/<queue>`,
`/queue/<queue>/request/<sqid>`, and `/queue/<queue>/change/…`.
Continuations read `GET /api/queue/<queue>/requests?status=…&page=…`, a
thin host route over the module's new `queueRequests` entry, which
shares the queue page's authorization, filter canonicalization, and
loader.
- **Look**: header, page, and footer share a centered `min(1200px, 100%
- 48px)` column with an 80px ruled header and dark SQ badge; links use
the theme's `accent500` without underline until hover, change URIs are
monospace, and secondary text is muted. The queue directory is a card
grid. Request history is a two-column timeline with the time since the
previous event. All styling uses BaseUI theme tokens and `withStyle`, so
host themes still apply; Stovepipe is unchanged apart from the shared
list.
- Removed: the read-only labels, the displayed-page search box, and
bullets in the Changes column.

## Test Plan

✅ `bazel test //web/platform/... //web/submitqueue/...
//web/stovepipe/... //web/service/submitqueue:all
//web/service/stovepipe:all //web/test/package/...`
✅ `bazel test //web/test/e2e/submitqueue:web_test` (status filter, JSON
API authentication and filtering, layout, accessibility scans)
✅ Locally: `make local-submitqueue-start`, `make demo-requests
COUNT=1000 WATCH=false`, then open the printed Web UX URL (user `test`),
scroll `/queue/demo-queue`, and filter by status.

## UI
<img width="1307" height="874" alt="Screenshot 2026-10-27 at 7 35 24 PM"
src="https://github.com/user-attachments/assets/9fdc188a-5d3c-42e9-9e13-c6a95325d969"
/>
<img width="1354" height="992" alt="Screenshot 2026-10-27 at 7 35 15 PM"
src="https://github.com/user-attachments/assets/36fbfd37-a432-4065-ba1a-1a3de9cf7edc"
/>
<img width="1298" height="726" alt="Screenshot 2026-10-27 at 7 35 06 PM"
src="https://github.com/user-attachments/assets/4f8e6f34-d119-4971-9952-94b8251f625e"
/>



## Stack
1. uber#968
1. @ uber#969


🤖 Generated with [Claude Code](https://claude.com/claude-code)
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