docs(docs): V1-2.6 UX owner ratification recorded, independent checks

This commit is contained in:
bchanot committed 2026-11-05 19:06:48 +01:00
1 parent e10f167a6d
commit bd444d6906
6 files changed
+713 -273

No files matched your search

+211 -116
View File
@@ -1,15 +1,16 @@
# V1-2.6 UX redesign: technical implementation plan
Status: PROPOSAL for the owner, 2026-11-05. Nothing in this file authorises code. No application, Rust, SQL or
worker change is made before the owner approves this plan and the blocking decisions of
`V1-2-6_UX_DECISIONS.md`. Branch `feature/v1-2-anatomical-sheets`, worktree `/home/bchanot/Documents/faunosteo-v1-2`,
audited at `f58cf23`.
Status: PROPOSAL for the owner, 2026-11-05, revised the same day with the owner's answers to T2/T3, T4, T5, T9/T10,
T11, T12 and T16 (brief « V1-2.6 UX — Ratification des décisions techniques », recorded in
`V1-2-6_UX_DECISIONS.md`). Nothing in this file authorises code. No application, Rust, SQL or worker change is made
before the owner authorises U0 and then each sub-step explicitly. Branch `feature/v1-2-anatomical-sheets`, worktree
`/home/bchanot/Documents/faunosteo-v1-2`, audited at `f58cf23`.
Companion files:
| File | Content |
|---|---|
| `V1-2-6_UX_PLAN.md` | This plan: inventory, sensitive points A to I, sub-steps U0 to U9 |
| `V1-2-6_UX_PLAN.md` | This plan: inventory, sensitive points A to I, sub-steps U0 to U8, curves lot (ex-U9) |
| `V1-2-6_UX_COMPATIBILITY.md` | Old / new schema matrix: core, SQL, worker, PDF, snapshots, N-1, oracles, rollback |
| `V1-2-6_UX_TESTS.md` | Test matrix per sub-step |
| `V1-2-6_UX_RISKS.md` | Risks, dependencies, blocking points |
@@ -74,7 +75,7 @@ Page-only, each ending in `sheet.edit` and judged by the core on commit (`issues
header undo and redo; the references side panel; sidebar collapse; point move; point size slider (the page reads
the radii present in the view, the core still refuses `marker_too_small`); polygon vertex drag; « + » on a segment;
« − » on a vertex; zone move (mouse direct, touch mode); zone redraw keeping the old shape until validation; the
rectangle gesture that sets a detail view's `view_box`; « replace by a specific SVG » without remap; per-annotation
rectangle gesture that sets a detail view's `view_box`; the « replace by a specific SVG » dialog (page work; its offer comes from a new core call, U5, T9); per-annotation
colour shown only when set, with « back to the category colour » (an `update` with `color: null`); keyboard
alternatives; 44 px touch handles; the `pointerId` guard; a multi-tab notice if the owner wants one (T14).
@@ -85,7 +86,7 @@ alternatives; 44 px touch handles; the `pointerId` guard; a multi-tab notice if
| `sheet.annotations_in_rect` | name proposal of a detail view (choice 6), automatic access only without overlap | `PreviewSheet` op | 80-150 lines, 1.5-4 KB gzip |
| `sheet.remap_view` | a crop view receiving a re-based drawing (point E) | `PreviewSheet` op returning `sheet.edit` commands | 120-250 lines, 2-5 KB |
| per-view minimum visible radius | the red « minimum touchable » mark of the size slider (choice 3) | value in `PreviewState` | 20-40 lines, < 0.5 KB |
| `sheet.path_points` | curve handles (point D, U9, deferral proposed) | free op | 250-400 lines, 4-8 KB |
| `sheet.path_points` | curve handles (point D, curves lot, T16) | free op | 250-400 lines, 4-8 KB |
| `sheet.path_move_points` | move anchors and controls without simplifying | free op | 300-500 lines, 5-10 KB |
| `sheet.path_translate` | move a curved zone whole | free op | 60-120 lines, 1-3 KB |
| fixed-category rules + opacity in the layer | choices 4 and 5 | schema + `edit.rs` + `sheet_report` issues + `layer.rs` | 1-3 KB |
@@ -111,9 +112,10 @@ study). Facts that govern it:
- The fingerprint and the snapshot gate also require no validation **error** (`fingerprint.rs:262-265`,
`snapshot_rules.rs:334-340`). A new unconditional `validate.rs` error (for example « three roles required ») would
strip the fingerprint of every existing document and reject old PDF snapshots. Fixed-category rules must live in
`edit.rs` (editor refusals) and in a verdict-only tier relative to the base (precedent `GEOMETRY_MISSING`,
`core/domain/sheet/report.rs:17-19`, `54-55`), never as an unconditional `validate.rs` error.
- Doctrine conflict to settle (decision T2): `.claude/rules/schemas.md:9-11` says additive optional fields keep the
`edit.rs` (editor refusals) and in a verdict-only tier (precedent `GEOMETRY_MISSING`,
`core/domain/sheet/report.rs:17-19`, `54-55`), never as an unconditional `validate.rs` error. (The first version
of this plan made the verdict tier relative to the base; withdrawn by T4, see §2 A.)
- Doctrine conflict, settled by the owner under T2 (route A, ratified with conditions): `.claude/rules/schemas.md:9-11` says additive optional fields keep the
contract; `.claude/rules/sheet-model.md` says a document schema change bumps `SHEET_DOCUMENT_SCHEMA_VERSION`, with
no bump during V1-2 (BLK-008); BDR-068 says `v1` freezes the construction and the validation. Route B (schema v3)
is excluded by the contract during V1-2 (`docs/development/V1-2_ANATOMICAL_SHEETS.md:1779-1781`) and would need a
@@ -126,14 +128,15 @@ study). Facts that govern it:
Measured on the shipped build (`packages/core-wasm/pkg/faunosteo_wasm_bg.wasm`, built 2026-11-04 after the last
core change of 2026-11-02): 1 569 864 B raw, **592 143 B** with Node `gzipSync` level 9, which is what the gate
measures (`packages/core-wasm/tests/size.test.ts:12-25`). Budget 600 000 B (D-R13), **margin 7 857 B**. GNU `gzip -9`
gives 583 126 B; the earlier study's « about 17 KB left » used that figure. Without the curve operations (U9,
deferral proposed) the new core code is estimated at about 4.5 to 13.5 KB: it may fit or exceed the margin, so the
plan measures after each op and holds a fallback ready (decision T1). With U9 the total reaches 14 to 31 KB and a
gives 583 126 B; the earlier study's « about 17 KB left » used that figure. Without the curve operations (curves lot,
out of V1-2.6) the new core code is estimated at about 4.5 to 13.5 KB: it may fit or exceed the margin, so the
plan measures after each op and holds a fallback ready (decision T1). With the curves lot the total reaches 14 to 31 KB and a
lever is certain. Documented levers, none applied: `wasm-opt -Oz` (never measured; `wasm-opt` is not installed,
`RUST.md:4054`, so it is a new pinned build tool), a lighter URL check (about 23 KB), the PDF writer, reader and
inflater in a lazily loaded second module (about 55-60 KB, `RUST.md:4050-4054`; touches the R4 paths, the import
worker, the CSP proof and trap recovery, and the readers of user data that need an explicit owner ask). Raising the
budget is an owner decision (D-R13).
budget is an owner decision (D-R13), never silent. Every figure in this plan is taken with the gate's exact call,
Node `gzipSync(bytes, { level: 9 })` on the `pkg` build, re-measured on 2026-11-05 at 592 143 B (LRN-118).
### 1.7 Corrections to the earlier study
@@ -166,9 +169,10 @@ budget is an owner decision (D-R13).
- App and worker images are built from one `GIT_SHA` by `.gitea/workflows/release-images.yml:103-120` (prepared,
never run). The sandbox reuses `faunosteo_worker:dev` without checking it matches the checkout
(`scripts/db-sandbox.sh:335-347`): every model step rebuilds it explicitly.
- The only SQL the redesign needs is the round-withdrawal migration the contract requires when the integrity rules
or the SVG reader change (`V1-2_ANATOMICAL_SHEETS.md:945-949`): U6 (verdict-tier rules, decision T4) and U9 (path
reader). References are in the document; own drawings use the existing upload path, capped at
- The only SQL the redesign needs is the U6 migration (decision T4): the round withdrawal the contract requires
when the integrity rules change (`V1-2_ANATOMICAL_SHEETS.md:945-949`), the core gate, the rules epoch, the
declared publication check and, if confirmed, the save non-regression check. The curves lot will need its own
withdrawal (path reader). References are in the document; own drawings use the existing upload path, capped at
4 drawings per sheet, 2 MiB each, 6 MiB in all (`core/domain/archive/snapshot.rs:21-28`).
### 1.9 Concurrency, multi-tab, recovery
@@ -199,27 +203,35 @@ budget is an owner decision (D-R13).
### A. Non-destructive migration for fixed categories and opacity
- Route A: `role` (`bone` | `joint` | `vertebra`) and `fill_opacity` (integer percent, decision T3) on
`AnnotationCategory`, both `Option` + `#[serde(default)]` + `js::present` (an explicit `null` refused, one canonical
form) + `skip_serializing_if = "Option::is_none"` + `ts(optional)`, the `LocalizedOptionalText` pattern. No
`SHEET_DOCUMENT_SCHEMA_VERSION` bump, no SQL schema change, no data migration (decision T2).
- Existing documents carry neither key: they read, write and fingerprint as today. Proven by tests, never assumed:
equine fingerprint `12d78872…` and alias `27c7383c…` recomputed equal, every seed review digest pinned and equal,
R4 app-path digests unchanged (`V1-2-6_UX_TESTS.md` U6).
- Route A, ratified in principle with conditions (T2, T3): `role` (`bone` | `joint` | `vertebra`) and
`fill_opacity` (integer percent 10 to 100) on `AnnotationCategory`, both `Option` + `#[serde(default)]` +
`js::present` (an explicit `null` refused, one canonical form) + `skip_serializing_if = "Option::is_none"` +
`ts(optional)`, the `LocalizedOptionalText` pattern; never serialised as `null`; an absent key never defaulted in
the fingerprinted document. No `SHEET_DOCUMENT_SCHEMA_VERSION` bump, no SQL schema change, no data migration. The
owner's conditions are the proof list of `V1-2-6_UX_COMPATIBILITY.md` §8, green before any key is written.
- One-way compatibility, never called full backward compatibility: existing documents carry neither key and read,
write and fingerprint as today (proven by the pins: equine fingerprint `12d78872…`, alias `27c7383c…`, every seed
review digest, R4 app-path digests, `V1-2-6_UX_TESTS.md` U6); a document carrying a key cannot be read by any
earlier application, worker or core, so the first such write is a point of no return (COMPATIBILITY §0, §7).
- New sheets: `sheet.empty` creates the three fixed categories with roles, core-chosen ids (precedent `view-main`,
`core/domain/sheet/create.rs:9`, `28`), fixed names and default colours (decision T5).
- Rules in two tiers, never as an unconditional `validate.rs` error (that would strip fingerprints and reject old
snapshots): `edit.rs` refuses removing a role-bearing category, changing or clearing its role, a duplicate role,
and renaming a role-bearing category; `sheet_report` issues, relative to the base when there is one, report a role
of the base that disappeared and any duplicate role. They map to the existing `verification.validation.rules`
(`verdict.rs:277-296`): no new verdict code (decision T4).
- Residual gap, stated: a sheet's first version has no base, so a direct `save_sheet_draft` (or « Garder ma
version » from a tab still running an older bundle) can strip the three roles before the first publication; the
edit refusals do not see it. It shows in the review of the `general` group, where every group of a first version
must be covered. Decision T4 records whether this residual is accepted.
- No expand-then-write split: every environment where U6 runs is a throwaway sandbox, and `sheet.empty` writes the
keys from the first new sheet, so a split would not protect anything. The rollback limit is stated instead
(`V1-2-6_UX_COMPATIBILITY.md` §7) and recorded as a release-readiness item.
`core/domain/sheet/create.rs:9`, `28`), fixed names and default colours (T5; ids, EN names and colours still to
ratify).
- Fixed-category checks, no residual gap (T4), never as a `validate.rs` error (that would strip fingerprints and
reject old snapshots):
- core, verdict tier: `sheet_report` on the draft gives error issues for a missing role, a duplicate role or a
wrong name on a role-bearing category, with no base needed, so a first version is judged like any other; they
map to the existing `verification.validation.rules` (`verdict.rs:277-296`), no new verdict code;
- core, editor tier: `edit.rs` refuses removing a role-bearing category, changing or clearing its role, a duplicate
role, a rename away from the fixed names and any `navigation` assignment; giving a role writes the fixed names
in the same update; repair commands insert a missing fixed category, restore the fixed names and clear a
duplicate role (DECISIONS T4);
- server: the U6 migration withdraws the rounds of draft versions in flight, adds a core gate at
`complete_sheet_verification` that refuses a passed verdict from a pre-U6 core, and adds a declared SQL check
of the fixed model at approval and publication (O22 amended at U0); recommended, to confirm: a non-regression
check at `save_sheet_draft` (no role removed, duplicated or renamed away; role-less drafts still save).
- Functional write lock instead of an expand-then-write split: the U6 migration exposes a rules epoch and the
application writes no key and creates no new-model sheet before it reads it; SQL first is mandatory, the only
order that fails closed (COMPATIBILITY §7). U6 runs on the sandbox only until the owner decides otherwise.
### B. Historical equine sheet and published documents
@@ -230,6 +242,10 @@ budget is an owner decision (D-R13).
- Category ids never change (`id_changed`, `edit.rs:486-489`). Converting the equine working copy (roles on
`os`, `articulations`, `zone-colonne`, the renaming of `zone-colonne`, the three own colours) is V1-2.8 content
work, a reviewed edit of its draft, after decision T6. Nothing in V1-2.6 converts it.
- Historical preservation is mandatory (T5): the historical versions keep their category ids, names, colours, the
three own colours, every annotation and their fingerprints. Roles go on a working copy only; U6 proves on an
in-memory copy of the seed that a conversion leaves the originals' bytes, fingerprint, alias and review digests
unchanged. Under T4 the working copy cannot pass verification until V1-2.8 converts it.
### C. Proof of compatibility: N-1, PDF snapshots, worker, old drafts
@@ -243,8 +259,10 @@ budget is an owner decision (D-R13).
- Worker: the image is rebuilt from the same commit, checked against `git rev-parse HEAD` before the run (U1 adds
that guard), and `verify-e2e` runs a New-absent and a New-present draft.
- Old drafts and recovery copies are plain document texts read by the same strict reader.
- The readers of user data widen (`assert_snapshot`, used by `archive/read.rs`, accepts the keys): CLAUDE.md asks for
the owner's agreement before such a change; it is part of decision T2.
- The readers of user data widen (`assert_snapshot`, used by `archive/read.rs`, accepts the keys): the owner agreed to
a controlled widening (T2). It accepts exactly the two keys with the document reader's types and range; any other
unknown key, `null`, unknown role or out-of-range opacity still rejects the snapshot (report kept); no version is
dropped; the frozen N-1 copies are never edited.
### D. Editing and translating curves without geometric degradation
@@ -254,8 +272,14 @@ a path (the seed has 22 circles, 6 polygons, 0 paths), and no product path can c
and polygons only (`creation.ts:93-97`), package import and zones from the drawing's shapes stay deferred
(`V1-2_ANATOMICAL_SHEETS.md:1330-1338`). Board 05 labels its curve card « exemple d'une autre fiche ».
Handle editing of curves (anchors, controls, translation) is therefore U9, proposed for deferral to the lot that
first lets a path enter a document (decision T16). Its specification is kept so it can start without a new study:
Handle editing of curves (anchors, controls, translation) is deferred out of V1-2.6 to the curves lot (ex-U9,
decision T16). The owner made the deferral conditional on an audit: it confirms that no tracked document holds a
path and no product journey needs one changed; the database contents of DEV and the sandbox were not queried, so a
read-only count runs before U6 or U8 reaches any environment beyond the throwaway sandbox (DECISIONS T16). Until the curves lot, a stored path keeps its
`d` text byte for byte, no operation converts it, and every operation that would change it is refused with the
document unchanged; « Remplacer par un polygone » (contract §8.3) stays the one, explicit, undoable way a path
leaves a document. The curves lot precedes any feature that lets a path enter a document. Its specification is kept
so it can start without a new study:
- Built on the existing reader (`path.rs`), extended to keep each number's byte span and a segment model (command,
absolute or relative, origin, anchor, explicit controls).
@@ -270,29 +294,36 @@ first lets a path enter a document (decision T16). Its specification is kept so
- Preview during a drag: page-side transform of the drawn path element (an SVG `transform` on the preview only), one
core call on pointer-up (BDR-050), never a core call per move.
- Implicit S/T controls are listed as non-editable; a control outside the frame is never judged on its own.
- Remap of a crop view holding a path is refused with a closed code until U9.
- Remap of a crop view holding a path is refused with a closed code until the curves lot.
### E. Annotations when a crop view receives its own SVG
- Today the attach keeps the old `view_box` and changes only `svg_asset_id` (`drawingUpload.ts:185-192`): the frame
stays the crop rectangle R, read in the new drawing's space. For a drawing cut from the same master (the seed
head drawing has exactly the crop's `viewBox`), this is already right and annotations stay on their anatomy.
- For a re-based drawing (another export with a different `viewBox`), positions must be transposed. The editor
therefore offers an explicit choice when the new drawing's `viewBox` V differs from R: « Même repère : garder les
positions » or « Dessin recadré : transposer les annotations ». V equal to R: no question, positions kept
(decision T9 on wording and default).
- `sheet.remap_view {view_id, asset_id}` on the preview handle returns a batch of `sheet.edit` commands (the view
update and one `update` per remapped annotation), committed by the existing `commitBatch` as one undo entry under
the geometry accept (`editorEdit.ts:45-61`). The core reads R and V itself; the page supplies no number. Mapping:
one uniform scale and translation (`xMidYMid meet`, the composer's default); circles move their centre and scale
`r`; polygons every point; numbers on the 0.01 grid of the page; every remapped annotation `to_confirm` (by the
`update` rule, `edit.rs:495-509`).
- For a re-based drawing (another export with a different `viewBox`), positions must be transposed. The owner
ratified an explicit choice on every replacement, with no approximate automatic transformation (T9). The dialog
opens before the upload, no action preselected. Two core calls (DECISIONS T9): an offer computed before the
upload from the document and the cleaned candidate text (the core reads V from the candidate root), then the
batch, after the drawing is registered and held, from the view id and the asset id. R is the crop rectangle, V
the candidate's `viewBox`; both actions rest on a premise the dialog states and both fail closed:
- « Conserver les positions »: only when V equals R (« ce dessin utilise le repère de la vue parente »);
- « Repositionner les annotations »: only when V differs from R with the same aspect ratio on the 0.01 grid, no
path, no descendant crop, numbers in range (« ce dessin montre exactement la zone de la vue »);
- « Annuler »: always; nothing uploaded, document and history untouched.
An unavailable action stays visible, disabled, with its reason; a candidate without `viewBox` gets « Annuler »
only, stricter than today's attach.
- `sheet.remap_view` (the batch call) returns the `sheet.edit` commands (the view update and one `update` per
remapped annotation), committed by the existing `commitBatch` as one undo entry under the geometry accept
(`editorEdit.ts:45-61`); a refusal there leaves the document unchanged and an unreferenced registered drawing.
The core reads R and V itself; the page supplies no number. Mapping: one scale and one translation (a different
ratio is refused, `remap.aspect`, never centred); circles move their centre and scale `r`; polygons every point;
numbers on the 0.01 grid of the page, and a point pushed out of the frame by the rounding refuses the whole remap; every remapped annotation `to_confirm` (by the `update` rule, `edit.rs:495-509`).
- Scope: the view's own annotations, including the detail triggers drawn in it. Descendant views with their own
drawing are untouched. Refused as a whole, with closed codes: a descendant crop view without its own drawing
(`remap.descendant_crop`; no sheet has one), a path in the view (`remap.path`, until U9), `unknown_view`,
`no_frame`, `out_of_range`. A refusal or a remap whose end state fails the geometry accept leaves the document
unchanged and the uploaded drawing held, with a message; the editor can then attach with « garder les positions »
or abandon.
drawing are untouched. Refused as a whole, with closed codes: a different aspect ratio (`remap.aspect`), a
descendant crop view without its own drawing (`remap.descendant_crop`; no sheet has one), a path in the view
(`remap.path`, until the curves lot), `unknown_view`, `no_frame`, `out_of_range`. A keep or a repositioning whose
end state fails the geometry accept leaves the document unchanged, with a message.
- Fixed user-unit sizes (twin offset 12, floor 2, strokes) do not scale, so `too_small` can change after a downscale;
the geometry accept and the repair dialog judge the end state.
@@ -308,10 +339,16 @@ first lets a path enter a document (decision T16). Its specification is kept so
- Name proposal (page, display formatting from the core's list): FR and EN names of the `inside` annotations, in
document order, joined by the locale's list format, the first three then « … »; none inside → « Vue détaillée n »
/ « Detail view n », n = number of detail views + 1. Both fields stay editable.
- Access: the view and its access are inserted in one batch. The access is created automatically, with the drawn
rectangle as its polygon in the parent view, only when the overlap list is empty and the sheet has a category for
it (decision T10). Otherwise the box is unchecked with the reason stated, and the access is placed explicitly from
the view's menu (« Ajouter un accès »), which replaces the « Accès à une vue détaillée » toolbar tool (choice 6).
- Access category (T10, principle ratified): a navigation access is never put in Os, Articulations or Vertèbres by
the system. The navigation type exists (`detail_trigger`, `schema.rs:439-462`) but requires an existing category
(`schema.rs:449`, `validate.rs:287-292`), and snapshots carry triggers to N-1 (`snapshot_rules.rs:141-165`).
Recommended, pending the owner's confirmation: one internal category `cat-access`, role `navigation`, created by
the core, absent from every visible panel and picker (DECISIONS T10 option B).
- Access: automatic creation needs that role, so it lands in U6, not U5. Then the view, its access (the drawn
rectangle as its polygon in the parent view) and, if missing, the navigation category are inserted in one batch,
only when the overlap list is empty. Otherwise the box is unchecked with the reason stated, and the access is
placed explicitly from the view's menu (« Ajouter un accès »), which replaces the « Accès à une vue détaillée »
toolbar tool (choice 6). Before U6, « Ajouter un accès » asks the editor for the category, as level 1 does.
Until an access exists the view is `view.unreachable`, an error in the validation panel that blocks submission,
not saving; the creation flow says so and links to the placement.
@@ -352,17 +389,19 @@ seed untouched, axe, keyboard and touch journeys, sandbox and worker runs.
### I. Decisions that block before any code
Each sub-step lists the decisions it consumes; the single table is in `V1-2-6_UX_DECISIONS.md`. Before U1: T11.
Before U5: T9, T10 (and T1 if the measure exceeds the budget). Before U6: T2, T3, T4, T5, T17. Before U7: T12.
Before U9: T16.
Each sub-step lists the decisions it consumes; the single table is in `V1-2-6_UX_DECISIONS.md` and the blocking
criteria in `V1-2-6_UX_RISKS.md`. Answered 2026-11-05: T2/T3 (with conditions), T4, T5 (history), T9, T10
(principle), T11, T12 (principle), T16. Still open: before U1, T15; before U5, T1 only if a measure exceeds the
budget; before U6, the two T4 SQL checks, the T5 new-sheet defaults, T10 option B, T17; before U7, the T12 text;
at V1-2.8, T6.
---
## 3. Sub-steps
Order: U0, U1, then U2 to U4 (frontend), U5 (first core queries, consumer-driven), U6 (model), U7 (common text,
when its wording exists), U8 (closure). U9 (curves) is proposed for deferral. Each sub-step ends at an owner
checkpoint; the next starts after the owner accepts it.
when its wording exists), U8 (closure). Curves are deferred to the curves lot (ex-U9, T16). Each sub-step ends at
an owner checkpoint; the next starts only on a new explicit owner authorisation.
Common rules for every sub-step that touches code:
@@ -395,8 +434,8 @@ Common rules for every sub-step that touches code:
C32, C33, C40); `docs/design/README.md` (v1-2-6 boards replace V1-2.4 boards 04 and 05 for the editor, BDR-096);
`.claude/rules/sheet-model.md` (optional keys under T2; rules may also live in `edit.rs` and `sheet_report`) and
`schemas.md`; the implementer decisions (T7, T8, handle cap, branch policy); `.claude/memory/decisions.md` via
`memory.sh`.
- Dependencies: owner answers.
`memory.sh`. §7.4 records T12 without any normative wording; §8.3 records the curves lot (T16).
- Dependencies: owner answers (recorded 2026-11-05, BDR-100) and the owner's authorisation to start U0.
- Rust ops: none. Tests: a fresh verifier checks the amendments against the answers.
- Acceptance: each decision recorded once and cited where it applies; no contradiction left between the contract,
the level-1 criteria and the boards.
@@ -414,7 +453,8 @@ Common rules for every sub-step that touches code:
`app/editor/verification.ts:64-131`, `PropertiesPanel.tsx:169`, `components/shell/AppLayout.tsx:72-123`,
`ToolColumn.tsx`, i18n; `scripts/db-sandbox.sh` (image check, demo sheet), `crates/worker/Dockerfile` (commit
label).
- Dependencies: U0, T11.
- Dependencies: U0, T11 (ratified: level-1 trial stopped, level 1 not declared validated, residuals tracked), T15
(header undo accessible name).
- Rust ops: none.
- Tests: `V1-2-6_UX_TESTS.md` U1.
- Acceptance: four tabs at 1 024 px and wider; every existing editor journey green on the new shell; narrow-width
@@ -426,7 +466,7 @@ Common rules for every sub-step that touches code:
### U2 · Direct manipulation of points and polygons
- Objective: boards 02 to 06 and 13 for points and polygons (curve handles excluded, U9): point move and size
- Objective: boards 02 to 06 and 13 for points and polygons (curve handles excluded, curves lot): point move and size
slider snapping to the radii of the view with the red minimum mark; vertex drag; « + » per segment; « − » on the
chosen vertex; zone drag directly with the mouse once selected, explicit « Déplacer la zone » mode by touch; redraw
keeping the old shape until accepted; 44 px touch handles; pointer rules and keyboard of §2 G; the toast;
@@ -467,8 +507,9 @@ Common rules for every sub-step that touches code:
### U4 · Detail view by rectangle (manual)
- Objective: « Créer une vue détaillée » draws a rectangle on the parent drawing (handles, keyboard resize) and sets
the new view's `view_box`; names typed; the access placed from the view's menu (« Ajouter un accès »); the toolbar
tool « Accès à une vue détaillée » and the numeric crop editor leave the normal journey.
the new view's `view_box`; names typed; the access placed from the view's menu (« Ajouter un accès »), which asks
the editor for the category until U6 (T10); the toolbar tool « Accès à une vue détaillée » and the numeric crop
editor leave the normal journey.
- Files: `CropCanvas.tsx`, `DetailViewForm.tsx`, `CropEditor.tsx`, `DetailViewRow.tsx`, `ToolColumn.tsx`,
`app/editor/viewBox.ts`, `viewUpdate.ts`, i18n.
- Dependencies: U2.
@@ -480,55 +521,68 @@ Common rules for every sub-step that touches code:
- Rollback: revert.
- Checkpoint: owner.
### U5 · Detail view assisted: `annotations_in_rect`, `remap_view`, name, access, specific SVG
### U5 · Detail view assisted: `annotations_in_rect`, `remap_view`, name, specific SVG
- Objective: the two core queries, consumed in the same sub-step: proposed FR/EN name, automatic access only
without overlap, explicit placement otherwise; « Remplacer par un SVG spécifique » with the explicit choice of §2 E.
- Objective: the two core queries, consumed in the same sub-step: proposed FR/EN name and the overlap list; explicit
access placement (automatic access moves to U6, T10); « Remplacer par un SVG spécifique » with the three-action
dialog of §2 E (T9).
- Files: core `anatomy/frame.rs` (`from_numbers`, `holds` to `pub(crate)`), new `domain/sheet/rect.rs` and
`domain/sheet/remap.rs`, `ops.rs` (`call_with_preview`), types, `packages/core-wasm/src`, `app/core/*`,
`DetailViewForm.tsx`, `CropCanvas.tsx`, `drawingUpload.ts:184-192`, `ViewDrawing.tsx`, `RepairDialog.tsx`, i18n,
`RUST.md` §12.
- Dependencies: U4; T9, T10; T1 if the measure exceeds the budget.
- Rust ops: `sheet.annotations_in_rect`, `sheet.remap_view` (§2 E, F). Order: `annotations_in_rect` first, size
- Dependencies: U4; T9 (ratified); T1 if the measure exceeds the budget.
- Rust ops: `sheet.annotations_in_rect`, the replacement offer (name fixed at U5, before upload, from the candidate
text) and `sheet.remap_view` (the batch after hold) (§2 E, F; the offer is a small read, inside the U5 size measure). Order: `annotations_in_rect` first, size
measured; then `remap_view`, size measured; a budget excess stops the sub-step for T1.
- Tests: `V1-2-6_UX_TESTS.md` U5.
- Acceptance: board 08; no access ever created over an annotation; « garder les positions » and « transposer » both
proven on fixtures; one undo entry per remap; size within budget or T1 applied.
- Owner demo: board 08 on the demo sheet; attach the seed head drawing to a crop (positions kept, no question);
attach a re-based fixture drawing (transposition offered).
- Acceptance: board 08 with explicit placement; the replacement dialog on every replacement, « Conserver les
positions », « Repositionner les annotations » and « Annuler » each proven on fixtures, a different aspect ratio
refused, « Annuler » sending no request; one undo entry per remap; size within budget or T1 applied.
- Owner demo: board 08 on the demo sheet; attach the seed head drawing to a crop (keep offered); attach a re-based
fixture drawing (reposition offered); cancel a replacement.
- Risk: size; bounds over-report. Rollback: revert (documents written are plain v2).
- Checkpoint: owner.
### U6 · Category model: fixed categories, fill opacity, vertebral regions from the category
- Objective: route A (§2 A); `sheet.empty` creates the three categories; edit refusals and report issues; the layer
applies `fill_opacity` (decision T3); snapshot and export gate strip both keys; the panel locks the fixed
categories (no delete, name read-only, role badge, « Couleur d'origine » from T5) and gains the opacity slider and
field; board 09: regions open from the vertebra-role category, the region picker of a zone filtered to the
vertebra-role category's annotations (page filter, no rule), staged « Appliquer » with the error count; fallback
per T17 when no category has the role (the equine copy before V1-2.8). `docs/ANNOTATION-RENDERING.md` amended
first; round-withdrawal migration (contract `945-949`) if T4 adds report issues.
- Files: core `domain/sheet/schema.rs`, `create.rs`, `edit.rs`, `report.rs`, `anatomy/layer.rs` (`layer()` 85-102,
`Context::point` 242, `zone_visual` 297-304), `domain/archive/snapshot_rules.rs:141-165`,
`pdf/write/input.rs:174-181`, `export.rs:27-37`, types; app `refusal.ts`, the category panel, the regions dialog
(`components/editor/vertebrae/*`), i18n; SQL `supabase/migrations/<timestamp>_sheet_rounds_withdraw_v1_2_6.sql`
(name provisional); docs `ANNOTATION-RENDERING.md`, `ANATOMICAL_SHEET_MODEL.md` (spec table), `RUST.md`,
`DEPLOY.md` (order).
- Dependencies: U3, U5; T2, T3, T4, T5, T17.
- Rust ops: schema fields, edit refusal kinds, report issues, layer reading, snapshot stripping.
- Tests: `V1-2-6_UX_TESTS.md` U6; each row of `V1-2-6_UX_COMPATIBILITY.md` is an acceptance line.
- Acceptance: compatibility matrix proven row by row; oracles, goldens and seed unchanged; N-1 reads New-present
PDFs; worker verdict on both kinds of draft; the contract §16.7 journey on a non-equine sheet with the new UX
reaches `open` after the worker verdict.
- Owner demo: new species sheet with its three categories, custom opacity, regions from Vertèbres, PDF exported and
reopened.
- Deploy order and rollback: `V1-2-6_UX_COMPATIBILITY.md` §7. Rolling back below U6 is impossible once a document
with the keys exists (sandbox only until the owner decides otherwise).
- Objective: route A (§2 A) under the owner's conditions (T2, T3); `sheet.empty` creates the three categories; the
T4 checks (absolute verdict rule, edit refusals with the repair path, the U6 migration with round withdrawal,
core gate, publication check, rules epoch and the save check if confirmed) live before any key is written (write
lock); the layer applies `fill_opacity`; snapshot and export
gate strip both keys; the snapshot reader widened only as bounded in §2 C; the panel locks the fixed categories
(no delete, name read-only, role badge, « Couleur d'origine » from T5) and gains the opacity slider and field;
automatic access with the navigation category if T10 option B is confirmed; board 09: regions open from the
vertebra-role category, the region picker of a zone filtered to the vertebra-role category's annotations (page
filter, no rule), staged « Appliquer » with the error count; fallback per T17 when no category has the role (the
equine copy before V1-2.8). `docs/ANNOTATION-RENDERING.md` amended first.
- Files: core `domain/sheet/schema.rs`, `create.rs`, `edit.rs`, `report.rs`, `verdict.rs` (gate marker in
`verified_with`), `anatomy/layer.rs` (`layer()` 85-102, `Context::point` 242, `zone_visual` 297-304),
`domain/archive/snapshot_rules.rs:141-165`, `pdf/write/input.rs:174-181`, `export.rs:27-37`, types; app
`refusal.ts`, the category panel, the repair action, the regions dialog (`components/editor/vertebrae/*`),
`DetailViewForm.tsx` (automatic access), i18n; SQL `supabase/migrations/<timestamp>_sheet_rounds_withdraw_v1_2_6.sql`
(name provisional: round withdrawal, core gate, rules epoch, publication check, save check if confirmed); docs `ANNOTATION-RENDERING.md`, `ANATOMICAL_SHEET_MODEL.md`
(spec table), `RUST.md`, `DEPLOY.md` (order, write lock).
- Dependencies: U3, U5; T2 and T3 (ratified with conditions), T4 (ratified; the save and publication SQL checks to confirm), T5 (history
ratified; new-sheet defaults to ratify), T10 option B (to confirm, automatic access only), T17.
- Rust ops: schema fields, edit refusal kinds, verdict-tier issues, layer reading, snapshot stripping, verdict
marker.
- Tests: `V1-2-6_UX_TESTS.md` U6; each row of `V1-2-6_UX_COMPATIBILITY.md` is an acceptance line, and §8 lists the
proofs the owner required before the write lock is lifted.
- Acceptance: compatibility matrix proven row by row and §8 green; oracles, goldens and seed unchanged; N-1 reads
New-present PDFs; worker verdict on the three kinds of draft (role-less fails, repaired passes, New-present
passes); the contract §16.7 journey on a non-equine sheet with the new UX reaches `open` after the worker verdict;
a role-stripped draft never reaches a round.
- Owner demo: new species sheet with its three categories, custom opacity, regions from Vertèbres, automatic access,
PDF exported and reopened; a role-stripped direct save refused at save (if confirmed) or at verification.
- Deploy order, write lock and rollback: `V1-2-6_UX_COMPATIBILITY.md` §7. Returning to the old application is
impossible once a document with the keys exists (point of no return; sandbox only until the owner decides
otherwise).
- Checkpoint: owner.
### U7 · Scope and limits: one-time copy of a versioned common text
- Starts only when the owner has supplied the validated wording (T12); no text is written by the implementer.
- Starts only when the owner has supplied the FR and EN text, its source and its validation record (T12); no
normative text is written or invented by the implementer, and tests use a fixture text kept under `tests/`.
- Objective: when both disclaimer fields are empty, « Insérer le texte commun (version n) » copies FR and EN once;
afterwards the fields are free text; a read-only comparison shows the current version; no automatic change ever
reaches a draft or a published version.
@@ -543,22 +597,26 @@ Common rules for every sub-step that touches code:
### U8 · Closure
- Objective: recovery and conflict journeys re-run on the new UX; the contract §16.7 acceptance on the sandbox;
documents and TODO closed; `V1-2-6_OWNER_TRIAL.md` updated.
- Dependencies: U1 to U6 (U7 when its wording exists; U9 per T16).
the level-1 residuals tracked under T11 re-checked one by one (level 1 still not declared validated as a whole);
the T16 path count recorded for any environment beyond the sandbox; documents and TODO closed;
`V1-2-6_OWNER_TRIAL.md` updated.
- Dependencies: U1 to U6 (U7 when its text exists; curves in their own lot, T16).
- Tests: `V1-2-6_UX_TESTS.md` U8.
- Checkpoint: owner trial of the redesigned editor; V1-2.7 stays closed until the owner opens it.
### U9 · Curves (deferral proposed, decision T16)
### Curves lot (ex-U9, deferred out of V1-2.6, decision T16)
- Objective, if the owner keeps it in V1-2.6: board 05 curve handles (§2 D), curved zone move, remap of paths, the
C45 refusal replaced by real correction.
- Out of V1-2.6 by the owner's conditional decision; recorded in TODO.md as a future lot that precedes any feature
letting a path enter a document. Kept here so it can start without a new study.
- Objective: board 05 curve handles (§2 D), curved zone move, remap of paths, the C45 refusal replaced by real
correction (with the path point-correction proposal `.claude/tasks/plans/2026-11-04-v1-2-6-path-repair-core-proposal.md`).
- Files: core `anatomy/path.rs`, `ops.rs`, types, wrappers; app `AnnotationOverlay.tsx`, `useMoveGesture.ts`,
`repair.ts:60-100`; SQL round-withdrawal migration (the path reader feeds the frame and interior verdict rules,
`frame.rs:25`, `interior.rs:23`); `RUST.md`.
- Dependencies: U2, U5; T16, T1 (a lever is certain).
- Dependencies: U2, U5; T1 (a lever is certain); its own owner authorisation.
- Rust ops: `sheet.path_points`, `sheet.path_move_points`, `sheet.path_translate`.
- Tests: `V1-2-6_UX_TESTS.md` U9, including a frozen pre-U9 oracle of `number_list`, `path_bounds` and
`path_outline` on a corpus, compared byte for byte after the change.
- Tests: `V1-2-6_UX_TESTS.md` « Curves lot », including a frozen oracle of `number_list`, `path_bounds` and
`path_outline` on a corpus taken before the change, compared byte for byte after it.
- Acceptance: a path of a fixture sheet (never the seed) edited point by point, saved, reloaded with every untouched
number byte-identical.
- Rollback: revert; paths go back to display only.
@@ -575,10 +633,10 @@ Common rules for every sub-step that touches code:
| U2 | yes | one read-only value | no | no | no |
| U3, U4 | yes | no | no | no | no |
| U5 | yes | two queries | no | no | no (the worker calls neither) |
| U6 | yes | yes | optional keys | round withdrawal (T4) | rebuilt, deployed before the app |
| U6 | yes | yes | optional keys | round withdrawal, core gate, rules epoch, publication check, save check if confirmed (T4) | rebuilt, deployed before the app |
| U7 | yes | no | no | no | no |
| U8 | no | no | no | no | rebuilt for the final run |
| U9 | yes | path ops | no | round withdrawal | rebuilt, deployed before the app |
| Curves lot (out of V1-2.6) | yes | path ops | no | round withdrawal | rebuilt, deployed before the app |
## 5. Out of scope, tracked separately
@@ -587,8 +645,9 @@ Common rules for every sub-step that touches code:
- Full touch editing on the phone (boards 14 to 16 kept as the reference of that future lot); O14 A stays.
- A multi-tab notice (not in the validated boards; the server revision check and the conflict dialog already guard
against lost writes): proposed as a follow-up, decision T14.
- The curves lot (ex-U9, T16), a prerequisite of any feature that lets a path enter a document.
The first three are in `.claude/tasks/TODO.md` (V1-2 section); T14 is added there if the owner keeps it.
All five are in `.claude/tasks/TODO.md` (V1-2 section); T14 stays a follow-up candidate until the owner answers.
## 6. Independent review record (2026-11-05)
@@ -621,3 +680,39 @@ robustness CONCERNS(9), simplicity CONCERNS(6); no BLOCKER. Integrated:
Not adopted: the simplicity lens recommended `edit.rs` refusals only (T4 option a). The plan keeps report issues
because they cost no SQL code once mapped to the existing verdict code and keep the core as the authority (O22);
the owner decides under T4. No second review was run on the corrected version.
## 7. Owner answers recorded (2026-11-05)
Brief « FAUNOSTEO — V1-2.6 UX — Ratification des décisions techniques ». The UX choices are not reopened. Changes
to this plan and its companions:
- T11 approved: level-1 trial stopped, level 1 not declared validated, residuals tracked (DECISIONS T11, TODO.md).
- T16 conditional deferral: audit recorded, path guarantee written, curves lot out of V1-2.6, database count before
U6 or U8 reaches any environment beyond the throwaway sandbox.
- T2/T3 agreement in principle with conditions: proof list (COMPATIBILITY §8), one-way compatibility and point of
no return stated (COMPATIBILITY §0, §7), bounded widening of the snapshot reader, BDR-068 effects.
- T4 without residual gap: absolute verdict-tier rule replaces the base-relative one; repairable editor rules;
core gate, declared publication check and functional write lock added; save non-regression check recommended,
confirmation requested (revised after the second independent review, §8).
- T5 historical preservation: history untouched, conversion tested on a copy; new-sheet defaults still to ratify.
- T9 three explicit actions on every replacement; exact same-aspect repositioning only.
- T10 navigation type: constraints checked; internal navigation category recommended, to confirm; automatic
access moved to U6.
- T12 principle kept; U7 blocked until the text, its source and its validation exist.
- Wasm measuring rule recorded as LRN-118; the decisions as BDR-100.
## 8. Second independent review (2026-11-05, after the owner's answers)
A fresh correctness challenger on the revised docs: CONCERNS(5) MAJOR and 7 MINOR, all integrated: a declared SQL
check of the fixed model at approval and publication (a worker defect can no longer publish); editor rules made
repairable (a role brings its fixed names, repairs for names and duplicate roles, `navigation` never assignable);
a functional write lock (rules epoch read by the application) and the statement that only SQL-first orders fail
closed; T9 split into an offer call before the upload and a batch call after it, keep limited to V equal to R,
premises stated in the dialog, a candidate without `viewBox` refused; withdrawal limited to draft rounds; the
`category.fixed.*` family filtered by the release replay; the flipped suites listed; single-component rollback
rows; the save non-regression variant offered under O22. A fresh verifier on the contract
`.claude/tasks/contracts/2026-11-05-v1-2-6-ux-ratification.md`: ECARTS(2) (tests and cross-references still on the
older T4 scope, BDR-100 superseded on T4 and T9), fixed, then a targeted re-check (ECARTS(2): one U6 test and the deploy-order line still assumed a permissive save and an all-rounds withdrawal), fixed. A third, independent check
before the commit (2026-11-05): ECARTS(2) on K10 and K11 (the R-3 mitigation and the U6 objective still on the
older T4 scope, the write-lock test assuming a stripping save succeeds, two forms of the T16 count scope), fixed,
then a fresh targeted re-check (result in TODO.md).