fix: Add service-qa skill for local Supabase CLI integration checks, improve merge queue UI - #247
fix: Add service-qa skill for local Supabase CLI integration checks, improve merge queue UI#247Ziinc wants to merge 16 commits into
Conversation
There was a problem hiding this comment.
Mirrors app-qa/SKILL.md structure (when-to-use, subagent delegation, steps 1–7, keep-specs-around) so agents already fluent in app-qa can run service-qa without relearning the ritual.
- Explicit split: app-qa keeps mocking Supabase; this skill owns the real CLI stack
- Proactive trigger paths match the files that actually change Auth/RPC/Edge contracts
There was a problem hiding this comment.
Separate Vitest config (node env, own setup) so npm test stays runnable without Docker — same isolation pattern as vitest.screenshot.config.ts.
- Health gate in
test/setup.service-qa.tsfails the suite withservice-qa:upinstructions instead of skipping silently fileParallelism: falseavoids Auth Admin races when specs create users in parallel
There was a problem hiding this comment.
Exercises the same RPC names/args as useMergeQueueEnabled / useSetMergeQueueEnabled against a seeded github_app_installations + github_repositories pair.
- Asserts the migration contract that “no config row ⇒ false”, then toggle + unlinked-repo error
- Keeps GitHub API out of scope — only the Postgres/RLS path the desktop toggle needs
There was a problem hiding this comment.
recordOutcome is the service-side twin of app-qa’s captureDocument expectations — Vitest asserts prove the contract; the JSON checklist is what the agent re-reads in step 5.
- Cap of 3 expectations matches the app-qa ast-grep discipline (enforced here in code since these specs aren’t under the screenshot lint path)
- Lives under
scripts/service-qa/.generated/(gitignored) so runs don’t dirty the tree
There was a problem hiding this comment.
start was listed in .PHONY and called by restart, but had no recipe — make restart was broken. Added supabase start and fixed the garbled db.ßdiff phony name while touching the file.
There was a problem hiding this comment.
Worked example for the desktop handoff useAuth.exchangeToken depends on: create_desktop_token RPC → functions/v1/exchange-desktop-token → setSession.
- Covers happy path, single-use rejection, and missing-body 400 — the three failure modes the Edge Function actually returns
- Hits the live local function runtime; no
vi.mockofsrc/lib/supabase
There was a problem hiding this comment.
Local CLI migrations run as postgres, whose default privileges only granted Dxtm to service_role/authenticated — not SELECT/INSERT. That broke seeding and Edge Functions that use the service role.
- Restores DML grants + default privileges for future migrations
- Required for real service-qa (and for local Edge to read
desktop_auth_tokens)
There was a problem hiding this comment.
service-qa forces emailSignup: true even when package.json has it off for the shipped app/web UI.
- Specs must use Auth email/password (
signUp/signInWithPassword) — never OAuth createTestUserthrows if this override is somehow false
There was a problem hiding this comment.
Setup/teardown fixture for merge-queue specs: email/password session + linked GitHub repo, always deleted in finally.
enableQueue/seedQueuedEntryhit real PostgREST (no stubs)- Teardown deletes the installation (cascades repos/queues) then Auth
deleteUser
There was a problem hiding this comment.
Lives under the screenshot harness (not scripts/service-qa/specs/) so Chromium can rasterize the DOM, but deliberately does not mock src/lib/supabase.
- Seeds via service-qa email/password +
linkGithubRepo, thensupabase.auth.setSessionon the app singleton so Settings/GitHubPanel RPCs use a real JWT - Stubs only the Pro gate (
useAuth.subscription) andghlist helpers — Stripe FDW and GitHub CLI are out of scope for proving PostgREST - Asserts round-trip with live
get_merge_queue_enabled/ seededget_repo_branch_queue_statusesbefore capture so a green PNG can’t come from a mock
There was a problem hiding this comment.
No row seeding. Three workspaces enter via HMAC pull_request labeled webhooks; CI via check_suite; merges via worker + MERGE_QUEUE_GITHUB_STUB.
- Captures filled (Testing/Queued) then drained (all Merged) against live
get_repo_branch_queue_statuses - React Query invalidated between phases so the tab reflects PostgREST, not stale cache
There was a problem hiding this comment.
Local supautils rejects DELETE without a WHERE clause, so every queue.drive failed before lanes could start.
- Migration replaces the temp-table clear with
DELETE … WHERE trueandpg_temp.qualification - Unblocks the webhook → worker → CI → merge path used by service-qa
|
Added |
Mirror app-qa with a node/vitest harness that hits real local Auth, RPCs, and Edge Functions (no mocked supabase-js), plus a post-edit hook and worked-example specs for desktop token exchange and merge-queue RPCs. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
…ication - Override emailSignup for service-qa; sign up/in via Auth email/password only - Add withMergeQueueFixture setup/teardown for full merge-queue RPC coverage - Fix public table GRANTs (008) so service_role/PostgREST can seed and Edge can run - Bundle @supabase/supabase-js for offline Edge worker boot; scripts/service-qa/up.sh - Verified 9/9 service-qa tests against local supabase start Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
… bundle Edge Functions import @supabase/supabase-js via deno.json → local node_modules (installed by service-qa:up). Remove the esbuild bundle from git; gitignore functions/node_modules. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Prove Settings › Integrations and the GitHub Merge Queue tab drive real RPCs/RLS (email/password session on the app singleton) instead of mocked supabase-js or terminal/outcome stand-ins. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Drive the Merge Queue tab through labeled webhooks and check_suite completions (with MERGE_QUEUE_GITHUB_STUB) instead of seeding entries. Fix reserve_next_merge_queue_lane DELETE for local supautils. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Add a shared topology and webhook/UI drain specs that enqueue a two-stack, an independent PR, a three-level stack, and a mid-tier sibling, then CI/merge until every queue is drained. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Rename testing chip to "Running checks", drop per-entry remove inside stacks (outline Remove on the stack header only), and align the stack accent border under the Layers icon. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Default view lists only the live queue; fully merged stacks move below the target-branch terminator when Show merged is on (paginated Load more). Partially merged stacks stay active with the bottom PR labelled Merged until the whole stack finishes. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Each queue stack is a bordered card with Layers header and per-PR +/- diff stats (shared DiffBar). Stats come from entry fields or local workspace commit enrichment. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
One list-level rail paints through card backgrounds and gaps so every PR node stays linked down to the target branch terminator. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Render stacks tip-first so the next-to-merge PR sits above the target branch terminator. Move Show merged into a toolbar under the Merge Queue tab, matching the Issues/PRs filter bar. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Show default-branch tip commit/PR on the terminator; use outline Remove for singles; replace Show merged switch with a Merged checkmark control; move status under the queue number; put stack help in a docs tooltip. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Place the default-branch tip short SHA on the right of the terminator row with a ghost copy button that copies the full commit id. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Style the default-branch tip as a label with the landed PR title on the same line. Return pr_title from get_repo_branch_queue_statuses. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Extract presentational merge-queue pieces under 500 lines, merge react-query imports, drop test inline comment, apply biome. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
0339e3d to
85075de
Compare
Conflict resolution during rebase onto main dropped conflict markers into settings.json; keep app-qa, docs-writing, and service-qa hooks. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Summary
Merge Queue UX polish plus service-qa skill work on this branch.
Rebase
main..claude/settings.jsonto keep bothpost-edit-docs-writing.sh(from main) andpost-edit-service-qa.sh(this branch), alongsidepost-edit-app-qa.sh.Lint / format
npm run format(Biome) andnpm run lint(oxlint + eslint + ast-grep).MergeQueueTabpresentational pieces intomerge-queue-parts.tsxto satisfymax-lines.@tanstack/react-queryimports.github-panelintegration test.Merge Queue UX
[main]label + landed PR title; SHA right-aligned with ghost copy.Test plan
mainwith conflict resolutionnpm run format/npm run lint/npm run check(pre-rebase)