Commit Graph
730 Commits
Author SHA1 Message Date
bchanot e22357630f feat(supabase): animals and relations access layer
animals.ts: POST search with species filter and a probe row, read by id with
explicit columns, create with the optional first client in one call, update,
archive. relations.ts: an animal's relations in one select (voided left out),
create, end, dates, void. Kinds duplicate_relation and already_ended added.
2026-10-26 17:11:23 +01:00
bchanot 3c2b503fc9 chore(memory): BDR-078, LRN-085/086, EVAL-040, V1-1.5 journal, TODO, gate contract 2026-10-26 02:31:53 +01:00
bchanot d8e86a4229 docs(docs): V1-1.5 counts after the gate fixes, what the gates found 2026-10-26 02:22:34 +01:00
bchanot 567ad40c80 fix(app): the « Client introuvable » screen focuses its heading too
Every client screen focuses its heading when it opens (contract §11.7); the
not-found screen did not. Unit and Chromium tests now assert the focus.
Found by the V1-1.5 verifier.
2026-10-26 02:11:15 +01:00
bchanot e1c1980949 fix(app): a re-read of the same account keeps its workspace on screen
USER_UPDATED (or a retry) set the workspace back to loading, which unmounted
the client routes and lost an open form's typed values. A ready workspace now
stays until the answer; found by the V1-1.5 security audit.
2026-10-26 02:08:25 +01:00
bchanot ae0bd3f8d8 docs(docs): V1-1.5 clients screens as built, owner choices, tests
Contract §11.7 (U1, U2, animals read-only, first-animal section deferred;
access layer, workspace state, routes, form, page, leave guard, focus,
deviations, counts), FRONTEND_ARCHITECTURE note, design README owners row,
TEST_STRATEGY, SUPABASE.md access layer and DEV note, CLAUDE.md map.
2026-10-26 02:01:55 +01:00
bchanot db81928dfa fix(app): no HTML report for the shell suite, it kept typed passwords
The report's step titles held what the tests typed, the throwaway sandbox
accounts' passwords included, contrary to BROWSER_TESTS.md. The shell suite
keeps the terminal output and failure screenshots; the old report deleted.
2026-10-26 02:00:33 +01:00
bchanot d33a8f6dad test(app): client journeys in Chromium on the isolated stack
Create, search, edit, archive, archived filter, restore; pages of 25;
keyboard only; two accounts; a concurrent edit; a retry after a lost answer
sends the same request id; network failures; the leave guard; a change of
language; FR/EN, desktop and 375 px, axe on every state. signIn shared.
2026-10-26 01:59:26 +01:00
bchanot b38e62770e feat(app): clients list, page, create, edit, archive and restore
Routes /app/clients, /new, /:clientId, /:clientId/edit behind a workspace
gate that remounts per workspace; debounced POST search, archived toggle and
« Afficher plus » pages; form on field-limits (D-R7) with the phone entry
rule and ISO countries; request id per creation intent; conflict shows the
saved values; archive confirmation with the sole-owner preview; animals
read-only; leave guard on in-app links; Clients entry after the dashboard.
2026-10-26 01:59:25 +01:00
bchanot ff028ec071 feat(app): personal workspace in the account store, reset on account change
The store reads the personal workspace with the account (ready, loading,
inactive, unconfirmed, missing, error; never created in the browser). A
change of account drops profile, roles, avatar and workspace at once, and a
late answer for the previous account is ignored. generateUuid gives v4 ids on
the plain-HTTP LAN origin, where crypto.randomUUID is missing.
2026-10-26 01:59:25 +01:00
bchanot a0e069959b feat(supabase): workspaces and clients access layer with closed failures
fetchPersonalWorkspaceId, client search (keyset, one probe row), read by id
with explicit columns, create (request id), update (every field), archive,
client animals and archive preview, species labels; RecordFailure kinds of
contract §9.4 plus session_expired and network; RPC answers checked by Zod.
Unit tests and the same functions against real PostgREST on the sandbox.
2026-10-26 01:34:45 +01:00
bchanot 6251051618 chore(memory): BDR-077, LRN-083/084, EVAL-039, V1-1.4 journal, TODO, gate contract 2026-10-26 01:15:52 +01:00
bchanot bc6a7ddb6f docs(docs): V1-1.4 animals and relations as built, DEV procedure to M3
Contract §8.3 (differences, relation states, caps, lock order across M2 and
M3, concurrency results, migration states, mutations, residuals), helpers
and derived values; SUPABASE.md §3.3 procedure from DEV's current state to
M3 (not run) and §3.5; TEST_STRATEGY, plan note, backend table, CLAUDE.md.
2026-10-26 01:06:24 +01:00
bchanot d7845b7339 chore(ci): check:all names each browser suite PASSED, SKIPPED or NOT RUN
A failing stage prints FAILED with its name and exits non-zero; e2e:shell is
reported NOT RUN (it needs the isolated stack); both suites keep their own
commands.
2026-10-26 01:02:54 +01:00
bchanot ba3a51e1b8 test(app): scope known axe exceptions to their markup and route
Each pre-existing exception (RR-7) now matches the axe rule, the selector,
the element's opening markup and its route; a new screen or element never
inherits one. Failure lines name the route.
2026-10-26 01:02:54 +01:00
bchanot 533a1c497d test(supabase): close the gaps two M3 mutations went through
A client whose only link was voided while current must not count the animal;
B linking its own animal to a client of A must not wait on A's lock. Also a
relation create racing the archive of its animal, and a replay changing the
initial relation's role.
2026-10-26 00:57:38 +01:00
bchanot b54c8e5bd8 feat(supabase): animals and relations M3 with RPCs, history and caps
Species rows (8 + other), animals with the D6b birth model, relations with
composite workspace keys, current/ended/voided states and a partial unique
index; definer RPCs for animals and relations (one lock order, shared write
budget, caps), invoker reads (search_animals, list_client_animals,
client_archive_preview) and search_clients with current_animal_count.
pgTAP 014 (254), parity test, sandbox suite, types from the isolated stack.
2026-10-26 00:52:22 +01:00
bchanot 2dc04bcfba chore(supabase): sandbox upgrade can stop at an intermediate migration
`pnpm db:sandbox up upgrade <version> <then>` applies the migrations before
<then> over the seeded older base, reports the workspaces, then the rest: the
path of a DEV database that took M1 first and M2 + M3 later.
2026-10-26 00:52:21 +01:00
bchanot 0826ecf383 chore(memory): BDR-076, LRN-082, EVAL-038, V1-1.3 journal, TODO, gate contract 2026-10-25 23:47:49 +01:00
bchanot d401cc824f test(app): mask fixture values in refused request URLs too 2026-10-25 23:46:51 +01:00
bchanot 9cd33f1217 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.
2026-10-25 23:37:00 +01:00
bchanot 9b2a4bc6fc chore(ci): run the Chromium UI suite in check:all when installed
pnpm check:all runs pnpm e2e:ui after the node stage when the Chromium of the pinned Playwright is present, and prints a SKIPPED line with the install command otherwise. The shell suite needs the isolated stack and stays a separate run.
2026-10-25 23:37:00 +01:00
bchanot e3a2b3e114 test(app): authenticated shell suite on the isolated stack
pnpm e2e:shell (db-sandbox e2e-shell) builds a Vite server on 127.0.0.1:5192 against a Supabase URL that resolves nowhere and replays its calls on the sandbox. Per-test fictitious accounts through the admin API, a clean avatar seeded: sign-in, dashboard, the photo confirmation with a slow removal, the phone drawer, FR and EN, axe. No trace kept, fixture values masked in reports.
2026-10-25 22:46:19 +01:00
bchanot 8371aa0a2a fix(ui): keep the photo confirmation open until the removal settles
The dialog closed before the request, focus went back to the remove button, then the button vanished and focus fell on the page. The confirmation now closes with the photo gone, Escape and Cancel wait for it, and ModalDialog restores focus after the commit so its fallback sees the opener removed. The sr-only file input leaves the tab order: it was an invisible tab stop.
2026-10-25 22:46:18 +01:00
bchanot 72ee9f9971 test(app): Playwright and axe browser suite on Chromium (D14)
@playwright/test 1.64.1 and @axe-core/playwright 4.14.0, dev only and pinned. pnpm e2e:ui runs a Vite server of its own on 127.0.0.1:5191 with no backend: the Dialog contract on a dev-only test page and the local tool's dialogs, desktop and 375 px, FR and EN, axe at zero serious violation outside one listed pre-existing finding. Requests outside the allowlist are aborted and fail the test.
2026-10-25 22:36:43 +01:00
bchanot 6f885eccb2 feat(ui): modal dialogs on the native dialog element (D13)
ModalDialog wraps showModal(): the page behind is inert and does not scroll, focus starts on the first control and returns to the opener, or to the first control of its nearest container when the opener is gone. Escape and close requests only ask the consumer. Dialog gains aria-labelledby and an optional described message; the confirmations pass theirs. The mobile drawer uses the same primitive and closes at the sidebar breakpoint.
2026-10-25 22:36:31 +01:00
bchanot 57922e0902 fix(supabase): refuse bad sandbox arguments before starting anything
pnpm db:sandbox up with an unknown mode or a missing or malformed upgrade version started four containers and wrote the secrets before refusing. The mode and the version (fourteen digits) are now checked first.
2026-10-25 22:20:55 +01:00
bchanot 5bc6631b6e chore(memory): BDR-075, EVAL-037, V1-1.2 journal, TODO, gate contract 2026-10-25 21:27:29 +01:00
bchanot a945e79131 fix(supabase): keep sandbox secrets off command lines and DEV out of reach
Security gate findings on db-sandbox.sh: containers get secrets from 600 env files, psql and the CLI read PGPASSWORD (no password in --db-url), an incomplete secrets file stops the script before any CLI call, the state folder is refused inside the repository.
2026-10-25 21:27:29 +01:00
bchanot f8bd1b6861 docs(docs): V1-1.2 clients as built, budget windows and lock order
Contract §8.2 (as built, divergent replay, fold, measured search, residual hint), §9 helpers and lock order, §9.4 request_conflict, §10 UTC budget windows. SUPABASE.md §3.4 and the DEV procedure for M1 and M2 pending together (rehearsed). TEST_STRATEGY counts.
2026-10-25 21:11:53 +01:00
bchanot 4adbfcb608 feat(supabase): clients M2 with RPCs, search and per-workspace budget
V1-1.2 (contract V1-1_OWNERS_ANIMALS.md §5, §9, §10). public.clients (person or organization, display name only, optional contact, folded search keys), create/update/set_archived as definer RPCs (identical not_found, idempotent create with divergent-replay refusal, revisions, archive read-only), search_clients invoker with keyset pages and phone search, write budget per workspace in UTC hour/day windows under a row lock, 20 000-client cap, ids-only audit hidden from platform staff (N9), nothing for anon or service_role. pgTAP 013 (130), field-limits parity test, sandbox suite (concurrency, budget races, 20 000-client search), types regenerated.
2026-10-25 21:09:45 +01:00
bchanot 2c0531d638 chore(memory): LRN-080/081, V1-1.2 plan 2026-10-25 20:57:10 +01:00
bchanot 5ed1f01c37 docs(supabase): owner procedure for M1 on DEV and the isolated stack
SUPABASE.md §3.3: target, history, drift, accounts, backup with auth data and its check, migration up without reset, checks after; every command rehearsed on the isolated stack. §5.1: pnpm db:sandbox.
2026-10-25 20:57:09 +01:00
bchanot 08abe42c48 test(supabase): isolated Supabase stack and real-stack suite for M1
scripts/db-sandbox.sh (pnpm db:sandbox): DEV images on an own network, loopback ports distinct from DEV, no volume, secrets generated outside Git; fresh and upgrade modes through the CLI's migration up, test db and gen types with --db-url. packages/supabase/tests/sandbox: M1 sign-up and confirmation, reads and refusals per role, residual GoTrue admin path, correlation cap, concurrent sessions.
2026-10-25 20:57:09 +01:00
bchanot 6bf69787cb chore(memory): BDR-074, EVAL-036, V1-1.1 journal, TODO, gate contract 2026-10-25 20:08:33 +01:00
bchanot 0f8c9833cc docs(docs): V1-1 owner decisions N1-N9 and M1 as built
Contract: N4 voiding instead of deletion, N5 date constraints, N6 write budget per workspace under a lock, N7 effective-privilege wording and residual admin paths, N9 audit metadata limited to ids; M1 as-built notes and isolated-stack results (§8.1). SUPABASE.md §3.3 with the owner procedure to apply M1 on DEV without reset; backend architecture, test strategy, plan and CLAUDE.md lines.
2026-10-25 20:00:06 +01:00
bchanot 7bf4fb6079 feat(supabase): workspaces M1, one personal workspace per account
V1-1.1 (contract V1-1_OWNERS_ANIMALS.md §4, §8, §9). Tables workspaces and workspace_members, created with the profile by trigger through one atomic, idempotent write path; deferred invariant (a personal workspace has exactly its account as holder); backfill of existing profiles; access helpers caller_workspace_ids (active profile, confirmed email) and writable_workspace_ids; RLS select for members only; no privilege for anon or service_role. log_event keeps x-correlation-id only as a short token. pgTAP 012 (85 checks), census and types updated, config test.
2026-10-25 19:53:16 +01:00
bchanot 5d734be512 chore(memory): BDR-073 V1-1 ratification, EVAL-035, V1-1 plan in TODO 2026-10-25 19:15:35 +01:00
bchanot a6346105f1 docs(docs): V1-1 contract approved, technical design for review
Owner ratified the V1-1 business decisions. The contract now records them
as approved, adds the nomenclature, the proposed SQL schema, RLS, RPCs,
technical limits, journeys and test plan, and lists the choices left for
the owner. OPEN_QUESTIONS, plan, DOMAIN_MAP, README and CLAUDE.md follow.
2026-10-25 19:15:35 +01:00
bchanot 5502617193 chore(memory): close P0 in TODO after merge
ci / rust (push) Canceled after 0s
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s
2026-10-25 18:09:42 +01:00
bchanot dae74e00dc Merge chore/p0-doc-realignment into develop
ci / rust (push) Canceled after 0s
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s
2026-10-25 18:09:27 +01:00
bchanot 858d0f37b9 chore(memory): P0 arbitration, BDR-071, BDR-072, EVAL-034
Roadmap principle validated, BDR-041 step number corrected by a new
entry, inventory contradiction with D-R7 recorded, journal, TODO with
the nginx /species/ code debt and the V1-1 ratification gate.
2026-10-25 17:12:43 +01:00
bchanot d4f628f8c8 docs(docs): separate public 0.1.0 from develop in README and DEPLOY
README splits the public 0.1.0, develop, DEV-only features and planned
work. CHANGELOG states nothing under Unreleased is deployed. DEPLOY gets
a status notice (historical, unverified, would-break, security
prerequisites) and marks both CSP examples as not production-ready;
fixes stay with RR-5.
2026-10-25 17:12:38 +01:00
bchanot ac60b24267 docs(docs): realign active docs on develop for P0
Roadmap section and step statuses in the plan, D-R9 Rust services in
place of Edge Functions and a Node worker, platform roles per BDR-026,
equine sheet draft-only, curation-only authoring until Step 17,
OPEN_QUESTIONS statuses and conflict resolutions, dated snapshot
notices on the Step 0 documents.
2026-10-25 17:12:37 +01:00
bchanot c71fafa3c5 docs(docs): add V1-1 clients and animals contract
Functional contract for roadmap item V1-1 with the owner's orientations
of 2026-10-25 recorded as proposals awaiting ratification (D1-D9, D16,
C4-C6), their SQL and permission impact, the sub-choices they leave and
the decisions still open. No migration, table, RPC or component.
2026-10-25 17:12:30 +01:00
bchanot 0c54e4b3c3 chore(memory): functional inventory, roadmap proposal, release readiness track
ci / rust (push) Canceled after 0s
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s
2026-10-25 15:06:37 +01:00
bchanot d6306ff448 chore(memory): R5 merged into develop (9ba2a25), journal
ci / rust (push) Canceled after 0s
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s
2026-10-25 14:45:12 +01:00
bchanot 9ba2a250f4 Merge feature/rust-r5-pipeline-core into develop
ci / rust (push) Canceled after 0s
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s
2026-10-25 14:44:48 +01:00
bchanot 505a837124 docs(docs): R5 merge status, R5.7 follow-ups per owner decision 2026-10-25 14:44:29 +01:00
bchanot 9992f23b26 chore(memory): R5.7 pre-merge, LRN-078, LRN-079, EVAL-033 2026-10-25 13:57:57 +01:00