docs(docs): V1-1.3 dialogs, browser tests and the D11 comparison

Contract §11.6: D13 final behaviour of the native modal dialog, D14 as built against the isolated stack, the three mobile navigation sources and their consequences for Clients and Animaux. BROWSER_TESTS.md: suites, prerequisites, guarantees, failures, limits. TEST_STRATEGY, SUPABASE §5.1, FRONTEND snapshot note, CLAUDE.md.
This commit is contained in:
bchanot committed 2026-10-25 23:37:00 +01:00
1 parent 9b2a4bc6fc
commit 9cd33f1217
6 files changed
+196 -16

No files matched your search

+16 -5
View File
@@ -50,8 +50,9 @@ Product roadmap (owner, 2026-10-25): P0 docs, then V1-1 clients and animals, V1-
V1-3 cloud bilans, V1-4 stored PDF and sharing, V1-5 mobile and accessibility pass
(`docs/development/IMPLEMENTATION_PLAN.md` §0; V1-1 contract `docs/development/V1-1_OWNERS_ANIMALS.md`:
business decisions ratified 2026-10-25, BDR-073; architecture and N1-N9 validated, BDR-074; on
`feature/v1-1-clients-animals` V1-1.1 (validated) and V1-1.2 are built: migrations `20261025100000_workspaces.sql` and
`20261025110000_clients.sql`, tested on PGlite and the isolated stack `pnpm db:sandbox`, not applied to Supabase DEV).
`feature/v1-1-clients-animals` V1-1.1 and V1-1.2 (validated) and V1-1.3 are built: migrations `20261025100000_workspaces.sql` and
`20261025110000_clients.sql`, tested on PGlite and the isolated stack `pnpm db:sandbox`, not applied to Supabase DEV; V1-1.3 the
native modal dialog (D13) and the Playwright + axe suites (D14, `docs/development/BROWSER_TESTS.md`)).
---
@@ -71,6 +72,7 @@ business decisions ratified 2026-10-25, BDR-073; architecture and N1-N9 validate
| SVG raster | native Image/canvas (no dependency) | — |
| Animation | motion | 11 |
| Tests | vitest + happy-dom + @testing-library/react | 3.x |
| Browser tests | @playwright/test (Chromium 1248) + @axe-core/playwright, pinned dev deps of apps/app (`docs/development/BROWSER_TESTS.md`) | 1.64.1 / 4.14.0 |
| Backend | Supabase (PostgreSQL 17, GoTrue, PostgREST) — CLI pinned as root devDependency | CLI 2.120 |
| DB client | @supabase/supabase-js (packages/supabase) | 2.x |
| SQL tests | pgTAP under supabase/tests, run by `supabase test db` and by PGlite (Dockerless) | PGlite 0.3 |
@@ -123,7 +125,7 @@ pnpm db:reset # replay from zero
pnpm db:test # pgTAP on the real stack
pnpm db:types # regenerate packages/supabase/src/database.types.ts
pnpm db:types:check # CI diff
pnpm db:sandbox up fresh|up upgrade <version>|test-db|types [--check]|test|down # throwaway stack (SUPABASE.md §5.1): migrations tested without touching DEV
pnpm db:sandbox up fresh|up upgrade <version>|test-db|types [--check]|test|e2e-shell|down # throwaway stack (SUPABASE.md §5.1): migrations tested without touching DEV
# Reference sheet in the app: the dev server bundles the curated draft; a build does not
pnpm build:preview # SHEET_BUNDLE=draft build (manual validation, preview deployments)
@@ -178,8 +180,15 @@ or call `corepack pnpm <cmd>`. Root scripts resolve `node_modules/.bin/pnpm`.
```bash
pnpm test:run # vitest run — all tests, single pass, CI-safe
pnpm test # vitest watch — dev loop
pnpm e2e:ui # Playwright Chromium, no backend: Dialog test page + local tool dialogs, desktop + 375 px, axe (in check:all when the pinned Chromium is installed)
pnpm e2e:shell # Playwright Chromium against `pnpm db:sandbox` (must be up): sign-in, dashboard, photo confirmation, phone drawer; never DEV
```
Browser suites (`apps/app/e2e`, `docs/development/BROWSER_TESTS.md`): Chromium only until V1-5,
`pnpm --filter @faunosteo/app exec playwright install chromium` once (no sudo, never `--with-deps`);
loopback dev servers of their own (5191, 5192, `--strictPort`, never reused); every request outside the
suite's allowlist is aborted and fails the test; the shell suite keeps no trace (session tokens).
Test files live in `apps/app/tests/unit/*.test.ts(x)`; golden fixtures in
`apps/app/tests/fixtures/`. The 612 legacy catalog leaves run through the v2 → v3 migration
in the core (`crates/core/tests/curation_leaves.rs`, against the draft document) and the app (sheet index + PDF roundtrip). Setup: `apps/app/tests/setup.ts` imports
@@ -235,7 +244,7 @@ faunosteo/
│ │ └─ practitionerCache.ts ← localStorage prefill
│ ├─ anatomy/drawing.ts ← the core's composed view (`view.canvas`) → DOMParser → importNode (R3; no sanitiser here)
│ ├─ components/
│ │ ├─ ui/{Button,ButtonLink,Card,Dialog,Input,Label,Select,Textarea,Badge,Chip,Icon,FormField,Notice}.tsx
│ │ ├─ ui/{Button,ButtonLink,Card,Dialog,ModalDialog,Input,Label,Select,Textarea,Badge,Chip,Icon,FormField,Notice}.tsx ← ModalDialog: native <dialog> showModal (D13), Dialog and MobileDrawer on it
│ │ ├─ canvas/{AnatomyCanvas,DetailModal}.tsx
│ │ ├─ observation/{ObservationList,ObservationCard,ObservationPickers,FindingsTreePicker,
│ │ │ VertebraPicker,SeveritySelector,LateralityPicker,
@@ -256,6 +265,7 @@ faunosteo/
├─ tests/
│ ├─ setup.ts
│ └─ unit/*.test.ts
├─ e2e/ ← Playwright (V1-1.3): playwright.{ui,shell}.config.ts, support/{browser,sandbox}.ts, ui/*.spec.ts, shell/*.spec.ts, harness/dialog.{html,tsx} (dev server only, never built)
├─ docker/
│ ├─ entrypoint.sh ← injects env.js at container start
│ └─ nginx.conf ← SPA fallback + PORT envsubst
@@ -476,7 +486,8 @@ Database (Supabase)
### Environments and LAN access (docs/development/ENVIRONMENTS.md)
- The owner tests from other devices of the private network, never on the Ubuntu machine: every test surface
(app, Supabase API, Mailpit, Studio) is addressed by the DEV origin (`scripts/dev-env.sh`, `FAUNOSTEO_DEV_HOST`),
never by `127.0.0.1` / `localhost`, never hard-coded in a source. The Supabase CLI runs only through
never by `127.0.0.1` / `localhost`, never hard-coded in a source (the automated browser suites are not a
surface for other devices: their dev servers and the sandbox stay on 127.0.0.1). The Supabase CLI runs only through
`scripts/supabase.sh` (`pnpm db:*`, `pnpm supabase`): config.toml reads the origin with `env()`.
- Exposure (least privilege, `pnpm dev:net-check`): LAN gets Vite 5173, the Supabase API 54321 and Mailpit
behind basic auth through the DEV gateway (`pnpm dev:gateway`, nginx, `faunosteo_dev_gateway`, 54325). The CLI