Skip to content

docs(web): design gateway-backed web library - #749

Draft
behinddwalls wants to merge 8 commits into
mainfrom
preetam/web-rfc
Draft

behinddwalls wants to merge 8 commits into
mainfrom
preetam/web-rfc

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Why?

SubmitQueue needs a reusable, read-only browser UX with clear ownership boundaries: the library supplies presentation and gateway helpers, while deployers own the application host.

What?

Define the library/reference-host architecture, queue-first readable URLs, request summary and lifecycle history, logical-change submission history, gateway-backed queue discovery, refresh behavior, and acceptance criteria. Include the queue, request, event-history, and change-history mockups. Document Bazel tooling and demo-host responsibilities without changing gateway or storage wire contracts.

Stack

  1. @ docs(web): design gateway-backed web library #749
  2. build(web): add Bazel workspace and generated gateway API #786
  3. feat(web): add framework-independent presentation library core #787
  4. feat(web): add authenticated Next.js demo host #788
  5. feat(web): add queue directory and live request list #789
  6. feat(web): add request summary and lifecycle history pages #790
  7. feat(web): add readable change submission history pages #791
  8. test(web): wire local demo and real-stack browser checks #792
  9. feat(web): discover configured queues through the gateway #793

behinddwalls and others added 8 commits October 6, 2026 13:48
## Summary

### Why?

SubmitQueue has gateway APIs and a terminal client but no reusable browser UX. Shipping one fixed Next application would couple the UI to a deployment's authentication, telemetry, routing, and process policy, forcing other deployers to fork it.

### What?

Define a gateway-backed web package analogous to `submitqueue/client`: generated Connect clients, server-only gateway helpers, presentation models, components, and link helpers live in a pnpm workspace under `web/`, while host-owned Next applications provide routes, authorization, telemetry, configuration, transport, and deployment.

The RFC specifies the Node/server boundary, Next 16 packaging and security constraints, TypeScript proto generation, additive gateway prerequisites, status and error compatibility, telemetry ownership, testing, CI isolation from Go/Bazel, a read-only first phase, and the promotion path for additional domain UX packages.

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	doc/rfc/index.md

# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# interactive rebase in progress; onto 6916596
# Last command done (1 command done):
#    pick ff32728 # docs(web): design gateway-backed web library
# Next commands to do (4 remaining commands):
#    pick a1afdc2 # docs(web): refocus web library RFC on design boundaries
#    pick d05545e # docs(web): tighten web library transport and link contracts
# You are currently rebasing branch 'preetam/web-rfc' on '69165965'.
#
# Changes to be committed:
#	modified:   doc/rfc/index.md
#	new file:   doc/rfc/web-library.md
#
# Untracked files:
#	web/
#
## Summary

### Why?

The RFC had grown into an implementation guide, with migration steps, build targets, file-by-file host instructions, and code samples, which buried the design decisions reviewers need to evaluate.

### What?

Recast the RFC around package, gateway, host-composition, wire, and error boundaries plus ownership invariants. Library components are synchronous and props-only, polling uses `router.refresh()`, multi-gateway queue collisions fail at startup, and server actions are covered by an authorization lint. Adds a layered UX testing strategy covering contracts, components, browser UX and accessibility, host authorization, and end-to-end flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary

### Why?

Review found contracts that would mis-route requests, emit phishing links, or fail to build as published packages: sqids contain a slash, the gateway speaks native gRPC, speculation runs sibling builds, and helpers cannot install interceptors on an already-created client.

### What?

Require percent-encoding of path segments, a scheme-and-authority allowlist, history-only build URLs, `createGrpcTransport` with TLS by default, an exported tracing interceptor, one `@submitqueue/api` package, RSC export invariants, a structural `Logger`, a Node-owned Compose end-to-end check, and a `pnpm pack` test against an external Next app.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary

### Why?

The RFC restated the same host and library boundaries and specified phase-one machinery the host already owns or that a read-only release does not need.

### What?

State each boundary once. Keep phase one read-only, with queue names configured by the host. Record proxy-safe base64url paths, request-time rendering, stable list windows, and polling limits, and move build and test detail into acceptance criteria.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary

### Why?

The RFC still described deferred telemetry, link, transport, and test-matrix capabilities as shipped prerequisites and acceptance criteria.

### What?

Limit the host/library contract and acceptance section to the implemented diagnostic, polling, package, and h2c E2E coverage. Record trusted links, typed build URLs, OpenTelemetry, TLS E2E, shared status fixtures, and broader browser/version matrices as deferred work.
## Summary

### Why?

Queue-first URLs make request links easy to construct without coupling the UI to the request identifier format.

### What?

Document /<queue> as the queue landing page and /<queue>/request/<full-request-id> as the detail route. Update the pagination and route-test descriptions to match the implementation.
## Summary

### Why?

Reviewers need a concise visual reference for the queue, request, and change-submission experience and its library/host boundary.

### What?

Add four illustrated UX mocks and readable queue-scoped URL examples. Document queue discovery, pinned versus across-version submissions, and the bounded demo lookup. Keep UX descriptions concise and Next.js integration host-owned. Allow only the four versioned RFC images through the binary-file linter.

## Test Plan

Visually checked mockup images and passed git diff --check. Passed the binary-linter unit tests and lint-binary with all four images staged; repository formatting, lint, tidy, and Gazelle checks passed before splitting the commits.
## Summary

### Why?

The URL reference should reflect seamless refresh behavior rather than timestamp-pinned list navigation.

### What?

Document clean rolling-window URLs, opaque pagination snapshots, and git change navigation with fake-provider hints kept out of the browser URL.

## Test Plan

Passed git diff --check and the repository pre-commit formatting, lint, tidy, and Gazelle checks before splitting the commits.

This branch has not been deployed

No deployments
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.

1 participant