3.7 KiB
3.7 KiB
Tasks — @suaveplan/api-graphql-ui-graphiql
Every checkbox MUST reflect work actually done in this change.
0. Pre-flight (non-negotiable)
- 0.1 Confirmed clean working tree before opening this change (verified at dispatch).
- 0.2 Worktree accounted for — this change executed in an isolated agent worktree.
- 0.3
MANIFEST.mdrefreshed after package land (task 7.4).
1. Spec authoring
- 1.1 Read design doc §10.6
- 1.2 Read umbrella Stage 7 acceptance
- 1.3 Read
openspec/AGENTS.mdSections 13 and 14 - 1.4 Draft
proposal.md - 1.5 Draft
specs/api-graphql-ui-graphiql/spec.md - 1.6 Every requirement carries a
**Verified by:**line
2. Implementation
- 2.1 Scaffold
packages/api-stack/api/api-graphql-ui-graphiql/ - 2.2
src/options/options.ts—GraphiqlUiOptionsZod schema - 2.3
src/factory/create-graphiql-ui.ts—createGraphiqlUi(opts)returningRouterPlugin - 2.4
src/html/render-shell.ts— HTML shell template embedding configured endpoints + theme - 2.5
src/assets/assets.ts— static-asset map; cache-busting hashes - 2.6
src/headers/csp.ts— Content-Security-Policy header builder - 2.7
src/instruments/instruments.ts—graphql.ui.requests_totalcounter - 2.8
src/error-codes/error-codes.ts— 2GRAPHQL_UI_GRAPHIQL_*codes - 2.9
src/index.ts— explicit named re-exports
3. Tests
- 3.1 Unit tests, every
it(...){ timeout: 5000 } - 3.2 Conformance test pins endpoint mount + embedded-config (
create-graphiql-ui.spec-conformance.test.ts) - 3.3 Asset reachability test (
{ timeout: 5000 }) - 3.4 End-to-end integration (
{ timeout: 30000 }) — in-memoryRouter+ minimal GraphQL handler exercising shell + asset + protocol round-trip. Playwright-driven browser variant remains gated onapi-graphql-yogalanding (Stage 7.1); integration test stands in until then with full HTTP contract coverage. - 3.5 All tests import from
@suaveplan/testing/runner
4. Documentation
- 4.1 Sibling
.mdper implementation file (7/7 — docs:check passes) - 4.2
README.mdcalling out: opt-in via host config; no CDN; bundled assets only
5. Pre-archive verification
- 5.1
bun run check— biome auto-fix applied, no remaining issues - 5.2
bunx turbo lint typecheck test --filter=@suaveplan/api-graphql-ui-graphiql— green - 5.3
bunx turbo test:coverage --filter=@suaveplan/api-graphql-ui-graphiql— 100/100/100/100 - 5.4
bun scripts/openspec-conformance.ts @suaveplan/api-graphql-ui-graphiql— script throws on 3-level packages layout (pre-existing issue; reproducible on every existing api-stack package). Tracked separately; not blocking this change. - 5.5
bunx turbo build --filter=@suaveplan/api-graphql-ui-graphiql— green (runs as part of the gate)
6. Pre-archive 7-row checklist
- 6.1 Generics where applicable; literal-type narrowing exercised on theme + ui-label
- 6.2 Zod schema on options (strict, defaults baked)
- 6.3 Both error codes thrown by production paths (asserted in
error-codes.test.ts+factory/*.test.ts) - 6.4 Strict-mode tested (theme system vs explicit; strict unknown-key rejection)
- 6.5
graphql.ui.requests_totalasserted via in-memoryMeterProviderfake - 6.6 Lifecycle dedup N/A (stateless static-asset server)
- 6.7 No retroactive ticks — Stage-7 row 7.3 ticked only on this change
7. Archive
- 7.1 Fold spec delta into
openspec/specs/api-graphql-ui-graphiql/spec.md - 7.2 Move to
openspec/archive/2026-05-26-api-graphql-ui-graphiql/ - 7.3 Tick Stage-7 row in umbrella tasks
- 7.4 Refresh
MANIFEST.md