Skip to content

test: web component tests, opt-in e2e, and OpenAPI drift guard#4

Merged
nicholasadamou merged 1 commit into
mainfrom
feat/quality-dx
Jun 15, 2026
Merged

test: web component tests, opt-in e2e, and OpenAPI drift guard#4
nicholasadamou merged 1 commit into
mainfrom
feat/quality-dx

Conversation

@nicholasadamou

@nicholasadamou nicholasadamou commented Jun 15, 2026

Copy link
Copy Markdown
Member

Final follow-up PR — the Quality & DX batch (#13–#15). Completes all four improvement batches.

Web component/integration tests (#13)

  • App — auth gate (dashboard vs login on 401), launch flow, and the pull-images action, with a mocked client (real AirlockApiError preserved for instanceof).
  • SessionList — open/extend/terminate handlers, in-progress button states, live countdown, and copy-to-clipboard.
  • SessionViewer — stream embed, per-session password surfacing, back/reload behavior.
  • Fixed a latent leak: CopyLinkButton now clears its reset timer on unmount.

Opt-in real-container e2e (#14)

apps/api/src/__tests__/e2e.docker.test.ts drives a real Docker engine through ping → create → list → extend → stop. Gated on AIRLOCK_E2E=1, so normal CI skips it (verified: 2 skipped). Documented in development.md (the first run pulls a large Kasm image; point AIRLOCK_IMAGE_CHROMIUM at a pre-pulled tag to skip).

OpenAPI drift guard (#15)

openapi-sync.test.ts asserts docs/openapi.yaml stays in sync with the code's browser catalog (BROWSER_KINDS), TTL bounds (TTL_MIN/MAX_SECONDS), and route table — so the spec can't silently drift. (A lighter, dependency-free guard than full zod→OpenAPI generation; noted as the pragmatic choice.)

Verification

  • make check green: format, lint, typecheck, 112 tests (84 api + 2 skipped e2e, 28 web), build.
  • No React act warnings; e2e skipped in CI.

With this, all four batches from the improvement review (Security & isolation, Reliability/ops, Features & UX, Quality & DX) are delivered.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Quality & DX batch:
- web: tests for App (auth gate, launch, pull), SessionList (open/extend/
  copy/terminate/countdown), and SessionViewer (stream, password, reload);
  CopyLinkButton now clears its reset timer on unmount
- api: opt-in real-engine e2e (e2e.docker.test.ts, gated on AIRLOCK_E2E=1 so
  CI skips it) covering ping → create → list → extend → stop
- api: openapi-sync.test.ts guards docs/openapi.yaml against drift in the
  browser catalog, TTL bounds, and route table
- docs: development.md describes the e2e and drift guard
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@nicholasadamou, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 14 minutes and 3 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a8ea049c-daa0-4744-873e-373b9a29d5e5

📥 Commits

Reviewing files that changed from the base of the PR and between 6d09dff and 060d499.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • apps/api/package.json
  • apps/api/src/__tests__/e2e.docker.test.ts
  • apps/api/src/__tests__/openapi-sync.test.ts
  • apps/web/src/App.test.tsx
  • apps/web/src/components/SessionList.test.tsx
  • apps/web/src/components/SessionList.tsx
  • apps/web/src/components/SessionViewer.test.tsx
  • docs/development.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/quality-dx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nicholasadamou nicholasadamou self-assigned this Jun 15, 2026
@nicholasadamou nicholasadamou merged commit 2768a64 into main Jun 15, 2026
5 checks passed
@nicholasadamou nicholasadamou deleted the feat/quality-dx branch June 15, 2026 20:41
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