5.5 KiB
CONTRACT: V1-1.3 UI foundations + V1-1.2 closure, owner brief 2026-10-25 « Validation V1-1.2 et autorisation V1-1.3 Socle UI »
- branch
feature/v1-1-clients-animals, base5bc6631(V1-1.2 validated); commits57922e0(sandbox fix),6f885ec(dialog),72ee9f9(Playwright UI suite),8371aa0(photo confirmation focus),e3a2b3e(shell suite),9b2a4bc(check:all),9cd33f1(docs) - diff under review:
git diff 5bc6631..9cd33f1 -- apps scripts package.json pnpm-lock.yaml .gitignore docs CLAUDE.md - functional contract
docs/development/V1-1_OWNERS_ANIMALS.md§11.5, §11.6 (as built), §12.5, §13.3;docs/development/BROWSER_TESTS.md - owner choices of 2026-10-25 (asked during the run): e2e backend = isolated stack (not DEV); public commands
pnpm e2e:ui+pnpm e2e:shell; MobileDrawer on the same modal mechanism; check:all runs e2e:ui when the pinned Chromium is installed, else SKIPPED - isolated stack:
pnpm db:sandboxis UP (fresh). Allowed:pnpm db:sandbox test-db,pnpm db:sandbox types --check,pnpm db:sandbox test,pnpm e2e:shell,echo "<read-only SQL>" | pnpm db:sandbox sql.pnpm check:allmay be running in the background and owns port 5191 while it does: do not runpnpm e2e:uiunlessss -ltn | grep 5191is empty. The DEV stack (supabase_*_faunosteo) must not be touched exceptpnpm supabase migration list --local(read-only). Neverpnpm dev.
Clauses
C1. Scope. No migration, no M3 object, no client or animal screen or route, no change under crates/, supabase/migrations,
supabase/tests; no V1-1.4 work; no tab bar; mockups under docs/design/ unchanged; no new runtime dependency (only dev
dependencies of apps/app); no merge, main / develop / release/0.2.0 untouched.
C2. Sandbox final check (V1-1.2 closure). scripts/db-sandbox.sh: an unknown up mode, a missing or malformed upgrade
version (not 14 digits) is refused before any container or secret exists; the new e2e-shell command and the refactored test
command pass the endpoints and keys through the environment (no secret on any argv), call load_secrets first (missing or
incomplete secrets refused), and reach only sandbox URLs; ports stay on 127.0.0.1; no volume; cleanup by literal names unchanged.
C3. ModalDialog (D13). apps/app/src/components/ui/ModalDialog.tsx uses the native <dialog> + showModal() (no focus-trap
library, no hand-written Tab loop); never closes itself: Escape keydown cancelled (preventDefault) and turned into onClose,
cancel cancelled and turned into onClose, a platform-forced close reported to onClose only when the dialog is really closed;
initial focus on the first tabbable control; focus restored after the commit to the opener, else to the first tabbable control of
the opener's nearest surviving container; StrictMode remount does not steal focus or close the dialog; IME composition ignored.
C4. Consumers. Dialog named by aria-labelledby (its h2), optional description → aria-describedby; visual output of the
existing dialogs unchanged (same classes, same spacing); the four confirmations (AvatarSection, ReplaceSessionDialog,
HeldSessionPanel, DisclaimerDialog) pass their message as description; MobileDrawer on ModalDialog, named « Navigation principale »,
closes at the lg breakpoint; AvatarSection keeps its confirmation open while the removal is in flight (Escape, Cancel, backdrop
refused) and closes when it settles; its sr-only file input is out of the tab order; the page does not scroll behind a modal
(html:has(dialog:modal) in styles/index.css).
C5. Dependencies (D14). @playwright/test 1.64.1 and @axe-core/playwright 4.14.0 exact, devDependencies of apps/app
only; lockfile adds exactly @playwright/test, playwright, playwright-core, @axe-core/playwright, axe-core (licenses Apache-2.0 /
MPL-2.0); no install script added to the repo; no sudo, no --with-deps.
C6. Browser suites. apps/app/e2e: two configs, dev servers on 127.0.0.1:5191 / 5192 with --strictPort and
reuseExistingServer: false; the UI server has an empty Supabase connection; the shell server uses the .invalid fake origin and
the sandbox anon key; an automatic request guard aborts every request outside the allowlist and fails the test; fixture values
checked against request URLs and masked in reports; the shell suite keeps no trace; the test page e2e/harness/dialog.html is not
part of the production build (vite build input is index.html only); accounts fictitious, random, sandbox only.
C7. Tests prove the brief §9 list in Chromium. Open, initial focus, Tab and Shift+Tab, containment (never the page; one browser
UI step at the wrap is the platform's), Escape allowed, Escape refused twice, close button, restore, vanished opener (test page and
real shell with a slow removal), background inert (focus, click, scroll), name and description, long content, 375 px, no horizontal
overflow, axe zero serious/critical outside the three listed pre-existing nodes, FR and EN, a representative test in the real
/app shell. Vitest suites green; existing suites unchanged in behaviour.
C8. Gates and docs. pnpm typecheck, pnpm test:run, pnpm lint, pnpm e2e:ui, pnpm e2e:shell, pnpm check:all green
(check:all includes rust-check.sh); docs updated: contract §11.6 (D13 final, D14 as built, D11 three-way comparison with
consequences for Clients and Animaux), §12.5 deviation, BROWSER_TESTS.md (prerequisites, commands, limits incl. WebKit/Safari),
TEST_STRATEGY, SUPABASE §5.1, CLAUDE.md. Pre-existing axe findings named in TODO RR-7.