chore(memory): BDR-076, LRN-082, EVAL-038, V1-1.3 journal, TODO, gate contract
This commit is contained in:
1 parent
d401cc824f
commit
0826ecf383
6 files changed
+93
-2
No files matched your search
+13
-2
@@ -416,7 +416,18 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
|
||||
- Acceptance: gates green; e2e green on the local stack; measurement written in the contract
|
||||
- Security: constraint and parse errors caught inside RPCs; text parameters parsed in the body; search through POST; definer census
|
||||
- Stop if: `unaccent` cannot load on PGlite or the CLI stack; the measurement is above 100 ms p95 (index decision for the owner); a CHECK cannot be mirrored in TypeScript
|
||||
- [ ] V1-1.3 UI foundations
|
||||
- [ ] V1-1.3 UI foundations (owner brief 2026-10-25 « Validation V1-1.2 et autorisation V1-1.3 Socle UI »; no M3, no client/animal screen, DEV untouched, stop at checkpoint)
|
||||
- [x] V1-1.2 closure: db:sandbox final check (fresh, upgrade, types, argv scan, negative cases, DEV fingerprint); defect `up` bad args started containers → fixed 57922e0, rerun green
|
||||
- [x] owner choices 2026-10-25: e2e backend = isolated stack (Playwright routes Supabase calls to `pnpm db:sandbox`); scripts `pnpm e2e:ui` (no backend) + `pnpm e2e:shell` (sandbox); MobileDrawer on the same modal mechanism; check:all runs e2e:ui when the pinned Chromium is installed, else an explicit SKIPPED line
|
||||
- [x] `ModalDialog` primitive on native `<dialog>` + `showModal()` (platform inertness, Escape via keydown/cancel → onClose, consumer decides, opener restore + nearest-container fallback, scroll lock CSS); `Dialog` on it (aria-labelledby title, optional `description` → aria-describedby); confirmation consumers pass their message as description; `MobileDrawer` on it (closes at lg)
|
||||
- [x] unit tests (happy-dom: wiring only): Escape/cancel/close/backdrop → onClose, never self-close, name + description, restore + fallback; existing suites green
|
||||
- [x] Playwright + axe dev deps pinned (license, transitive census), Chromium download (no sudo); configs `e2e/playwright.{ui,shell}.config.ts`, Vite on 127.0.0.1 dedicated ports, request allowlist (anything else aborted and fails the test)
|
||||
- [x] e2e:ui: harness page `e2e/harness/dialog.html` (dev server only, not in the build): open, initial focus, Tab/Shift+Tab, containment, Escape allowed/refused (twice), close button, restore, opener gone, background inert + no scroll, name/description, long content, 375 px, no horizontal overflow, axe FR/EN; local tool dialogs (disclaimer, edit infos) desktop + 375
|
||||
- [x] e2e:shell: fictitious account through the sandbox admin API, clean avatar seeded; login → dashboard, drawer at 375 (containment, Escape, restore), avatar remove dialog (name, description, Escape, confirm → opener gone → fallback), FR/EN, axe, request URLs free of fixture values
|
||||
- [x] defect found by the shell suite: the photo confirmation closed before the removal, focus fell on the page once the button vanished → confirmation open until settled, deferred restore, sr-only file input out of the tab order (8371aa0); mutation-checked with a slowed RPC
|
||||
- Deviation: contract §12.5 said DEV origin; suites run on loopback servers against the isolated stack (owner choice); TODO line "users through the admin API, DEV origin, service key from env" superseded
|
||||
- [x] check:all stage; docs (contract D13/D14 final + D11 note, TEST_STRATEGY, browser tests doc, SUPABASE §5.1 e2e-shell, CLAUDE.md map + commands); D11 three-way comparison
|
||||
- [x] gates: typecheck, test:run, lint, e2e:ui, e2e:shell, rust:check, check:all; fresh verifier + security audit; commits pushed; checkpoint report (verifier CONFORME 8/8, security PASS, check:all green 23:41:29; refused URLs masked after audit LOW)
|
||||
- Objective: real-browser harness and accessible dialogs before the first screens
|
||||
- Depends: D13, D14 approved
|
||||
- Files: `apps/app/package.json` + `pnpm-lock.yaml` (`@playwright/test`, `@axe-core/playwright`, dev only); `apps/app/playwright.config.ts` (Chromium desktop + 375×667); `apps/app/e2e/` (fixtures: users through the admin API, DEV origin, service key from env never committed); `apps/app/src/components/ui/Dialog.tsx` (`inert` + restore to opener) + tests; root script (name to confirm)
|
||||
@@ -462,7 +473,7 @@ Inventory: `.claude/audits/2026-10-25-functional-inventory.md`. Each item: treat
|
||||
- [ ] RR-4 API trust boundaries: direct export API trusted for what it declares (RUST.md §11.22), `export_from_envelope` L6, RPC surface review (authenticated 17, service_role 9, anon 0), worker service key readable by the docker group (DEPLOY.md)
|
||||
- [ ] RR-5 production configuration: CSP example in DEPLOY.md lacks `'wasm-unsafe-eval'` and the Supabase `connect-src`; compose publishes 8080 on all interfaces while DEPLOY says 127.0.0.1 (rootful Docker bypasses UFW); stale no-backend DEPLOY sections; Q2 hosting; production SMTP, FR auth email templates, captcha, OAuth ids; DEV hardening (demo keys, 54321 on LAN)
|
||||
- [ ] RR-6 dependencies and images: base images by tag only (pin digests), cosign, workflow actions by tag, CI never run (BDR-047), release-images never executed
|
||||
- [ ] RR-7 accessibility: WCAG target to set; dialog focus trap/restore, close button 24 px, canvas zones keyboard-unreachable, no axe test, D2/D5 Context7 items (RUST.md §10.14)
|
||||
- [ ] RR-7 accessibility: WCAG target to set; dialog focus trap/restore (done V1-1.3, native modal dialog), close button 24 px, canvas zones keyboard-unreachable, axe test (done V1-1.3: e2e:ui, e2e:shell), D2/D5 Context7 items (RUST.md §10.14). Pre-existing serious axe findings let through by exact node in `apps/app/e2e/support/browser.ts` KNOWN_VIOLATIONS: LanguageSwitcher label-in-name (« FR » shown, « Passer en français » announced), top bar account link label-in-name (display name shown, « Mon compte » announced), DashboardRoute `dl` with a status row lacking dt/dd. Seen outside the scanned states: ObservationCard header `nested-interactive` + label-in-name (editor with an observation); moderate: duplicate `main` landmarks (App + routes), no h1 on Home
|
||||
- [ ] RR-8 mobile and end-to-end: real-browser e2e for sign-up, login, account, avatar, full editor flow, export, locale, mobile drawer (TEST_STRATEGY §1 `apps/app/e2e`); per-check device results (J1/J2 recorded as a whole)
|
||||
- [ ] RR-9 release 0.2.0 fate (Steps 3–6 on TS engines, 341 commits behind develop): ship, supersede, or rebase; sheet bundle default `none`
|
||||
- [ ] RR-10 census tools maintenance (LOW `#[ignore]` positions) and controlled oracle evolution on a new anatomical changeset
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
# 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`, base 5bc6631 (V1-1.2 validated); commits 57922e0 (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:sandbox` is 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:all` may be running in the
|
||||
background and owns port 5191 while it does: do not run `pnpm e2e:ui` unless `ss -ltn | grep 5191` is empty. The DEV stack
|
||||
(`supabase_*_faunosteo`) must not be touched except `pnpm supabase migration list --local` (read-only). Never `pnpm 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.
|
||||
Reference in new issue
Block a user