Repository navigation
test(e2e): full-stack feature journeys, plus the bugs they found - #67
Conversation
Since the 2026-08-19 hardening revoked INSERT on user_settings, the client's upsert was always denied, so language, output language, theme, model choices, and the custom system prompt never left the browser. The hardening grant also omitted output_language. Update the provisioned row instead and grant the missing column. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sonner's mobile toaster overflowed by its left offset, the Library grid let a source row's min-content width stretch the card, and the Flowchart toolbar did not wrap. Each widened the phone layout viewport and pushed controls off-screen. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add full-stack browser journeys that sign in through the real demo-code flow and exercise Auth, RLS, quota, every Edge Function, streaming, and persistence against local Supabase. Only OpenRouter is replaced, by a strict fake container reached through the new OPENROUTER_API_URL override. The case-generation test fails against the pre-#66 client, which silently dropped oversized requests. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Also warm the admin and announcements functions before the browser run. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedNext included review available in 15 minutes. View limit detailsLimit details: You’ve used the included review currently available. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (29)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds a local full-stack browser test gate with a fake OpenRouter provider and tests for account, AI, practice, admin, and public journeys. It also changes settings persistence and permissions, and adjusts responsive layouts. ChangesFull-stack browser tests
Responsive layout adjustments
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Playwright
participant Vite
participant SupabaseFunctions
participant FakeOpenRouter
Playwright->>Vite: Drive an AI feature journey
Vite->>SupabaseFunctions: Send an AI request
SupabaseFunctions->>FakeOpenRouter: Send chat-completions request
FakeOpenRouter-->>SupabaseFunctions: Return deterministic response or configured failure
SupabaseFunctions-->>Vite: Return response or stream
Vite-->>Playwright: Render feature result
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing. Comment |
Both database-tests attempts on this PR failed while pulling Supabase images from ghcr.io with toomanyrequests, before any test ran. Retry the start up to three times and stop a partially started stack between attempts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@coderabbitai review |
|
|
@coderabbitai review |
|
Why
Case generation broke in production and nobody knew until users reported it. The existing browser tests mock the Supabase session and the
aiEdge Function, so they can't see failures between the browser, Auth, and the functions.What this adds
New Playwright journeys in
e2e/full-stack/, run by./.superset/db-gate.sh(the CIdatabase-testsjob) on desktop and mobile Chromium.demo-code-loginfunction.e2e/full-stack/fake-openrouter.mjs) that rejects prompts it doesn't recognize and records what the functions sent upstream. The functions reach it through a newOPENROUTER_API_URLoverride. It is unset in production, and the default stayshttps://openrouter.ai/api.Coverage:
Proof that it catches the case-generation bug
With the pre-#66 client (
653aeac^versions ofclient.ts,streaming.ts, andAskPage.tsx) the grounded case-generation test fails: no case appears. On current code it passes. I could not reproduce the #65 auth-relock hang locally. I tried an expired token, a tab visibility change, generating right after login, and a second tab, all against pre-#65 code. This suite does not claim to cover #65.Bugs the new tests found (fixed here)
Settings never reached the account. The 2026-08-19 hardening revoked INSERT on
user_settings. The client saved withupsert, which needs INSERT, so every save failed withpermission denied, and the failure was only a console warning. Affected: UI language, AI output language, theme, per-feature model choices, and the custom system prompt. The hardening grant also left outoutput_language. Fix: the client now updates the row the auth trigger provisions, and migration20260923190000grantsUPDATE (output_language). Includes a pgTAP privileges test.Mobile pages widened past the screen.
Each problem pushed controls off-screen; the Flowchart one also made the save dialog's button untappable.
Verification (local, commit 8bace5b)
./.superset/db-gate.sh: pgTAP (10 files, 299 tests) and 43 browser tests passed. 1 skip is pre-existing (mobile, workspace spec).npm run docs:check,lint,typecheck: pass.npm test -- --coverage: 1033 passed.test:collaboration: 30 passed.test:edge: 238 passed.buildandtest:sw: pass.test:e2e: 226 passed, 6 skipped (unchanged).Not covered
Live provider output, web research (no search key locally), Jev decisions (the fake returns 503 and callers use their fallbacks), Stripe, Google export, and deploy drift between
mainand production.Release notes
20260923190000_user_settings_output_language_grant.sqlis forward-only. Rollback:REVOKE UPDATE (output_language) ON public.user_settings FROM authenticated. Apply it before the frontend deploy.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Safe to merge.
Summary
This update makes the local database gate more resilient to transient container-registry failures by retrying Supabase startup with cleanup and bounded backoff. No outstanding issues were identified.
Reviews (2) · Last reviewed commit: "ci(db-gate): retry supabase start after ..."