chore(memory): BDR-104, U1 plan challenge reports, checkpoint contract
This commit is contained in:
1 parent
13dee0908b
commit
7defed1c55
5 files changed
+215
-2
No files matched your search
@@ -0,0 +1,87 @@
|
||||
# U1 plan challenges, original reports (2026-11-06)
|
||||
|
||||
Verbatim final reports of the blind plan challengers run on the first draft of
|
||||
`.claude/tasks/plans/2026-11-06-v1-2-6-ux-u1.md` (three lenses), then of the confirmation pass on the revised plan.
|
||||
Recovered on 2026-11-06 from the session transcripts, which the harness may purge. The resolution of each MAJOR finding is
|
||||
traced in `docs/development/V1-2-6_UX_U1_CHECKPOINT.md` section 3; the plan's own record is its « Challenge record ».
|
||||
|
||||
## Correctness (first draft)
|
||||
|
||||
```text
|
||||
CHALLENGE — LENS: correctness — VERDICT: CONCERNS(6)
|
||||
PLAN: /home/bchanot/Documents/faunosteo-v1-2/.claude/tasks/plans/2026-11-06-v1-2-6-ux-u1.md
|
||||
FINDINGS:
|
||||
1. [MAJOR] The `nextSaveDistance` rule for `saved(sentDistance)` (`distance − sentDistance`) can show a false count after commits made during a save, which is the exact case review focus #3 says it covers. — WHY: The plan's own rules give this sequence. Send at d=3, then undo twice (d=1), then commit three times: the first commit is not negative, so d goes +1 each time and ends at 4. The answer arrives and gives 4−3, shown as « 1 modification non enregistrée ». But the first commit cleared the redo stack (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/editor/state/undo.ts:52-54 via editorEdit.ts:58), so the sent text c3 is in no stack and the real path is 5 changes. The rule "commit → null when negative" only sees negatives against the old saved point, never against the in-flight sent point. The plan's own definition ("along the history") requires null here. — FIX: Verify instead of counting blind. After a save and after every step, keep d only when `d===0 ? documentText===savedText : undo[undo.length-d]?.text===savedText`, else null. A cheaper alternative: track "dropped below sentDistance then committed" during the flight and turn it into null. Add this sequence to the Lot E table.
|
||||
2. [MAJOR] React 19.2 `<Activity>` re-runs every effect on reveal, not only cleanups. §2 audits only the cleanups ("Existing cleanups keep their meaning"), so a focus effect in kept-alive Constats breaks AC12. — WHY: /home/bchanot/Documents/faunosteo-v1-2/apps/app/src/components/editor/findings/FindingTree.tsx:31-33 focuses `focusId` in an effect. /home/bchanot/Documents/faunosteo-v1-2/apps/app/src/components/editor/tabs/FindingsTab.tsx:47,73,90 sets `focusId` on every « Aller à » to a finding and after a deletion, and never clears it. After either one, every later click or arrow onto Constats moves focus from the tab into the tree. That breaks "clicking or arrowing a tab keeps focus on that tab", and the tree's own arrow keys then take over from the tablist walk. Any "focus on open" mount effect in a section h2 or the panel heading would do the same on each tab return. The Lot B "arrows" tests never set up a prior go-to. — FIX: Make `focusId` one-shot (clear it once applied). Add a plan rule that no focus or scroll side effect runs in a mount effect of kept-alive content (focus belongs to `useEditorNavigation`). Add a test: after an « Aller à » to a finding, arrowing onto Constats keeps focus on the tab.
|
||||
3. [MAJOR] Zoom and pan are not kept, contrary to §2 ("Hidden content keeps its state (… framing …)") and §4 ("the canvas state is the one left (kept alive)"). — WHY: /home/bchanot/Documents/faunosteo-v1-2/apps/app/src/catalogue/useFraming.ts:69 `useEffect(() => setFraming(FIT), [resetKey])` re-runs on every Activity reveal. Every return to Annotations and every « Retour au dessin » therefore resets zoom and pan. The Lot B tests only check tool and selection, so this ships unnoticed. The fix sits in `catalogue/useFraming.ts`, which `CatalogueCanvas` shares and which is outside the contract FILE SCOPE (only editor model files, editor/state, components/editor/**, shell, route, i18n). — FIX: Reset only when `resetKey` actually changes (previous-key ref), add `apps/app/src/catalogue/useFraming.ts` to FILE SCOPE, and add a keep-alive test: zoom, go to the views section, come back, framing kept. Otherwise remove "framing" from the claim and tell the owner.
|
||||
4. [MAJOR] Lot B depends on Lot D. Its tests cannot be written as specified, and two level-1 editors are unreachable in the Lot B and C commits. — WHY: The section entries (« Gérer les vues », « Modifier les catégories », « Régions vertébrales ») exist only in `OverviewPanel` (§4, Lot D files), and Lot B limits `EditableAnnotations` to "links only". Yet Lot B removes the Vues and Vertèbres tabs, takes categories out of Général, and tests "the canvas tool and selection survive « Gérer les vues »" and "« Retour au dessin » focuses the entry button". Until Lot D, the categories and regions editors are reachable only through an issue's « Aller à » (views through the unmeasured hint). The plan guarantees "no level-1 function is unreachable at any commit" for References only. Separately, "selection survives « Gérer les vues »" is impossible as written, because the overview holding that entry is "shown … when nothing is selected or pending" (§4). — FIX: Move the three entry buttons (minimal overview entries) into Lot B, or move those tests to Lot D. Rewrite the selection case through a path that can hold a selection (the unmeasured hint or « Aller à »).
|
||||
5. [MAJOR] The LAN trial suite (C47, an existing editor journey) is missing from Lot H and will break silently. — WHY: /home/bchanot/Documents/faunosteo-v1-2/apps/app/e2e/lan/trial-lan.spec.ts:125,148 clicks `getByRole('tab', { name: dict['editor.tab.views'] })`, a tab and key U1 removes. It also reads the save line through `/^Révision \d+/` (:24-29, :145), which the new line replaces with « n modification(s) non enregistrée(s) » and « Enregistré à hh:mm · révision n ». Typecheck will not catch the removed key because `Dict = Record<string,string>` (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/i18n/types.ts). The suite is "never part of check:all" (/home/bchanot/Documents/faunosteo-v1-2/apps/app/e2e/playwright.lan.config.ts header). UX_PLAN U1 acceptance requires "every existing editor journey green on the new shell". — FIX: Add trial-lan.spec.ts to Lot H (views reached through the section, revision read through the new save-line helper). Run it with the Lot I demo, or record it as not run.
|
||||
6. [MAJOR] The history-button spec contradicts itself on typed text, so the Lot E test "disabled buttons + typed text → committed, nothing undone" cannot pass with the stated mechanism. — WHY: Disabled buttons in a read-only mode cannot coexist with typed text, because `historyEnabled` false ⇔ readOnly ⇔ TextField renders ReadOnlyValue (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/components/editor/fields/TextField.tsx:31-40). The only remaining case is an empty stack. There, pressing the aria-disabled button focuses it, the blur commits (TextField.tsx:75-79), and the store update re-renders before the separate `click` event (React flushes the sync update first; RTL wraps each user-event dispatch in act). So "enabled at its last render AND can step" is true and the undo runs. That matches AC5 and contradicts "nothing undone". — FIX: Choose one and tell the owner. (a) Follow AC5 and drop the "nothing undone" test. (b) Capture the enabled state at pointerdown/keydown and say so in §6.
|
||||
7. [MINOR] Lot file lists do not hold. Lot B adds a header « Références » button but lists no header file. Lot C edits `components/editor/HeaderActions.tsx`, which is created only in Lot E (§6, Lot E files). — WHY: Executors read "the files named in its lot". — FIX: List DraftHeader.tsx in Lot B, and either do the HeaderActions split no later than Lot C or have Lot C edit DraftHeader.
|
||||
8. [MINOR] Keying the discard sentence on `copyWritten` can remove an existing copy without saying so (gated precision: "never removing the local copy silently"). — WHY: When a quota failure follows an earlier successful write, `copyWritten` becomes false (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/editor/state/recoveryFlow.ts:125-128), but the failed setItem leaves the older copy in storage (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/state/persistence.ts:50-56). Discard then removes it unconditionally (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/editor/state/editorLoad.ts:200,229). The risk is real: three copies of up to 2 MiB each can exhaust sessionStorage. — FIX: Decide the sentence from `copyExists(userId, versionId)` (recovery.ts:80), read when the dialog opens.
|
||||
9. [MINOR] Review focus #4 ("nothing unmounts that holds typed text" on a width change) is false. — WHY: Several creation forms unmount when read-only: `{!readOnly && <CategoryForm />}` (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/components/editor/general/CategoriesSection.tsx:51), `{doc && !readOnly && <ReferenceForm />}` (tabs/ReferencesTab.tsx:44) and `{pending && !readOnly && …}` (tabs/FindingsTab.tsx:105). Their typed text is lost at 1 024 px, while the §2 documented limit names only the canvas creation forms. — FIX: Widen the documented limit to every creation form, or keep them mounted read-only. Align the Lot D/H assertion with the choice.
|
||||
10. [MINOR] Below 640 px, the not-found focus fallback and the panel label point to an element that may not exist. — WHY: `#editor-tab-<id>` exists only while « Plus » is open (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/components/editor/EditorTabs.tsx:108-127). « Aller à » stays available in read-only mode (verification/IssueList.tsx:44-61). An unresolved finding path goes to Constats, which sits under « Plus » there, so focus stays on a button inside a now-hidden panel and falls to body (AC12). The tabpanel's `aria-labelledby` dangles in the same case. — FIX: Fall back to the « Plus » button (or open the disclosure), and give such panels an `aria-label`.
|
||||
11. [MINOR] « Aller à » to an annotation silently drops a kept-alive pending creation. — WHY: /home/bchanot/Documents/faunosteo-v1-2/apps/app/src/components/editor/annotations/EditableAnnotations.tsx:60-65 dispatches `view` then `select`, and both reset `pending` (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/editor/annotations/uiState.ts:55-64). Keep-alive now lets that typed creation survive the tab change, and the go-to then discards it (precision 1). — FIX: Document it as a limit, or keep the pending creation and focus its panel instead.
|
||||
12. [MINOR] After `draft.unchanged`, the save line can show the time of an old save. — WHY: `applySaved(api, attempt, attempt.expected)` (/home/bchanot/Documents/faunosteo-v1-2/apps/app/src/editor/state/editorSave.ts:105) leads to `readSaveTime`, which finds the earlier `draft_last_save` of that revision (possibly from another day or another user). The line then reads « Enregistré à hh:mm » with no date, while AC7 says "after a save in this page session". — FIX: Skip the time read on draft.unchanged (show « Enregistré · révision n »), or format with the date when it is not today.
|
||||
13. [MINOR] The `saved` rule is ambiguous. — WHY: It is unclear whether "null when either is null" overrides "`unsaved ? … : 0`". If null wins, saving a restored copy with no in-flight change leaves `saveDistance` null, and the commit rule keeps it null until reload. — FIX: State that `!unsaved` → 0 takes precedence.
|
||||
PROOF: read 46 files (plan, contract, AdminSheetDraftRoute, focusRequest, tabs, useViewport, verification, focusTarget, EditorTabs, EditorTabBody, DraftHeader, TextField, DraftField, useCropGroup, editorBase, editorEdit, editorSave, editorLoad, recoveryFlow, recovery, persistence, undo, mode, format, useUndoShortcuts, sheetDocument, EditableAnnotations, AnnotationsTab, AnnotationCanvas, useCanvasBuild, useCanvasGestures, useFraming, uiState, PropertiesPanel, ToolColumn, GeometryGroup, FindingTree, FindingsTab, useSubmission, CategoriesSection, GeneralTab, ReferencesTab, IssueList, AppLayout, MobileDrawer, trial-lan.spec + playwright.lan.config, i18n types, UX_PLAN §2 G and U1, UX_TESTS U1); inspected every useEffect under components/editor, editor/annotations and catalogue for re-run-on-reveal behaviour, every `unsaved` writer, the copy write/remove paths, static ids, `editor.tab.*` key usages including e2e, and React/@types versions (19.2.6 / 19.2.14); checked plan §1, §2, §4, §5, §6, §7, §8, Review focus 1-5, Lots B, C, D, E, H, Edge cases. Read-only throughout; no test, pnpm, docker or supabase command run.
|
||||
```
|
||||
|
||||
## Robustness (first draft)
|
||||
|
||||
```text
|
||||
CHALLENGE — LENS: robustness — VERDICT: CONCERNS(5)
|
||||
PLAN: /home/bchanot/Documents/faunosteo-v1-2/.claude/tasks/plans/2026-11-06-v1-2-6-ux-u1.md
|
||||
FINDINGS:
|
||||
1. [MAJOR] The references panel, positioned as §5 says, covers the header controls that the plan says stay usable. — WHY: §5 puts the panel "fixed to the right below the sticky top bar" at `min(27rem, 100vw)`. Its top is therefore the AppLayout `sticky top-0 h-14` header, so at the top of the page it sits over the right end of DraftHeader (Références, save line, Abandonner, Enregistrer) and over HistoryButtons at the right of the tab row (§3, §6). Board 11 starts both the panel and the scrim below the tab row (maquettes.html:623, `top:162px`). With the plan's position, a click on Enregistrer or Annuler lands on the panel, and keyboard Tab reaches those buttons while they are hidden behind it (focus obscured, which axe does not flag). The Lot C happy-dom test "header usable" has no layout, so it passes anyway. — FIX: anchor the panel top to the bottom of the tab row, either with a sticky header plus tab row and a measured top, or with a positioned container that starts after the tab row. Add a Playwright check that Enregistrer and Annuler are clickable (not intercepted) with the panel open at 1 024 and 1 280 px.
|
||||
2. [MAJOR] The view fallback can keep a pending creation and silently write it on the main view. — WHY: §4 says the canvas "falls back to the main view and clears the selection", and names nothing else. CreationPanel gets `viewId={scene.viewId}` (EditableAnnotations.tsx:227) and the insert uses it (creationAttempt.ts:38 `annotationOf(id, input.viewId, …)`). If the fallback is derived and only `selectedId` is cleared, this sequence writes a wrong annotation: place a point on a detail view, then a header undo removes that view. Once the main frame is built, « Créer » inserts the point on the main view with the old view's coordinates. Today the same path renders no canvas (`if (!view) return null`, :179) and the core refuses the unknown view. Keeping the drawing alive and adding a header undo on every tab makes this path common. — FIX: when the current view is missing, dispatch the full reset `{ type: 'view', viewId: main }` (initialUi clears pending, tracing, selection and hint). Pin it in Lot B with a pending point and with an active tracing.
|
||||
3. [MAJOR] `nextSaveDistance` gives a false count for edits made during a save, and it misses trims done by undo and redo. — WHY: §6 defines `saved(sentDistance) → unsaved ? distance − sentDistance : 0`. Take a save sent at distance 3, then one undo (distance 2) and one commit (allowed because 2 is not negative) while it is in flight. The commit cleared the redo stack that held the sent text, yet the answer computes 3 − 3 = 0 with `unsaved` true. The next commit then shows « 1 modification non enregistrée » although the saved text is no longer anywhere in the history. Separately, the trim check runs "after any commit" only, but `stepBack` and `stepForward` also call `bounded()` (undo.ts). Near the 8 MiB bound an undo or redo can drop the saved entry and the count stays a number. With the 300 KB equine document.json the bound is reached after about 27 entries, so this is not rare. Review focus 3 says both cases are pinned, but a table written from this formula pins the wrong values. — FIX: derive the distance instead of accumulating it. After every history event and on `saved`, find the saved text (`attempt.sentText` / `savedText`, exact string) by index in the undo and redo stacks, and use null when it is absent. Keep the event table only as a test oracle.
|
||||
4. [MAJOR] The discard confirmation can delete an existing local copy without saying so. — WHY: §6 adds « La copie locale temporaire … sera aussi supprimée » only when `copyWritten` is true. That flag means "the last write succeeded" (recoveryFlow.ts `syncCopy`), which differs from "a copy exists". On a quota refusal, `setItem` throws, the previous copy stays in sessionStorage (persistence.ts:50-56), and `copyWritten` becomes false. `discardChanges` then calls `removeCopy` without any condition (editorLoad.ts:229, and :200 through the staleBase reload). The older copy is deleted with no sentence, which the owner precision "never removing the local copy silently" forbids. — FIX: show the sentence when the copy exists (`copyExists(userId, versionId)` read when the dialog opens). Add the case "quota refusal after an earlier successful write" to the Lot E discard test.
|
||||
5. [MAJOR] Once places stay mounted, the test-isolation premise no longer holds. — WHY: the Edge cases section says "Testing Library ignores it by role; tests that look for hidden text use { hidden: true }". That is true for *ByRole only. getByLabelText, getByText and getByTestId, and Playwright getByLabel, getByText and locator(), all match `display:none` elements, and Playwright strict mode counts them. A concrete clash: « Nom (FR) » labels the sheet name (fr.ts:1332), every region name (:1368) and the annotation name (:1525). After Général, Régions and an annotation selection have been visited, these page-wide queries match several elements: editor-equine.spec.ts:113 and editor-geometry.spec.ts:375 (`getByLabel(name_fr)`), and editor-tabs-general.test.tsx:42. They either throw on multiple matches or act on a hidden copy and pass falsely. Review focus 1's mitigation ("locators scoped to the visible tab panel") still includes the hidden sections, because they sit inside the Annotations tab panel. LRN-115 records the same class of failure. — FIX: wrap each Activity child with a stable hook, and make `activePanel` and the unit helpers return the visible place (drawing, section or panel). Use getByRole or `filter({ visible: true })` for label and text queries, and state in the plan that non-role queries are never page-wide.
|
||||
6. [MINOR] Review focus 4 says "nothing unmounts that holds typed text" on a width change, but every creation form renders only while editable. — WHY: `!readOnly &&` guards CategoriesSection.tsx:52, ReferencesTab.tsx:47, ViewsTab.tsx:65, VertebraeTab.tsx:49 and FindingsTab.tsx:105. Crossing below 1 024 px drops their DraftField text, as it does today. §2's documented limit names only the canvas forms. Keeping these forms mounted in narrow mode would break owner precision 5 (read-only on every moved form), so an executor will either fail the Lot D/H test or bend it. — FIX: extend the §2 limit to these forms and reword Review focus 4.
|
||||
7. [MINOR] AC5 relies on the browser moving focus away from the field when the header button is pressed. — WHY: §6 says "pressing the header button blurs the field first". Chromium and user-event do this. Safari does not focus a button on click, and on iPadOS a tap on a button reportedly does not blur a focused input (uncertain, not verified here). Tablets from 1 024 px are edit devices (AC11, board 13). Without the blur, the undo reverts the previous commit; if that commit was the same field, TextField's `seen !== value` reset (TextField.tsx:58-61) overwrites the typed text. — FIX: on pointerdown of HistoryButtons, blur `document.activeElement` when it is a text control, before stepping.
|
||||
8. [MINOR] Two rules for typed text contradict each other. — WHY: §6 says the click acts only if the button "was enabled at its last render", and also says "when the buttons are disabled the blur still commits and nothing is undone". With an empty stack, the mousedown blur commits and React re-renders before `click`, so the button is enabled and the undo reverts that commit (what AC5 wants). The Lot E test "disabled + typed text → nothing undone" either fails or forces a pointerdown-time snapshot, which makes mouse and keyboard behave differently. — FIX: keep "nothing undone" for read-only modes only, or name the snapshot point.
|
||||
9. [MINOR] « Aller à » on a reference can miss its card when a search is active. — WHY: §5 says the panel opens "unfiltered with the search cleared and focuses that reference's card". The search lives in the kept-alive panel, so clearing it and focusing in the same `apply` runs before the card re-renders. `focusRow` finds nothing and falls back to the heading. The Lot C test never sets a prior search. — FIX: reset the filter and search first, focus after the next commit, and add a test where a search hides the target.
|
||||
10. [MINOR] `readSaveTime` must not lengthen the save outcome. — WHY: §6 does not say whether `saveWith` awaits the admin read. ConflictDialog awaits `keepMine` (ConflictDialog.tsx:131) and stays pending until it resolves, and unit tests that mock a single rpc answer would see an extra call. — FIX: call it with `void` after `applySaved`.
|
||||
11. [MINOR] The drawer can stay open as a modal over a page that shows the sidebar. — WHY: Lot F keeps the rule "close on a media `change` event" (MobileDrawer.tsx:31-32). Open the drawer at 1 180 px in the editor, then navigate back with no unsaved changes to a non-editor page at the same width. No change event fires, `closesFrom` becomes 64rem, which already matches, and the page stays inert behind the drawer. — FIX: close at effect setup when `query.matches` is already true, with `closesFrom` in the effect's deps.
|
||||
12. [MINOR] The save line becomes a chatty live region. — WHY: it stays `<p role="status">` (DraftHeader.tsx:130). Today its text changes once when `unsaved` flips. With a count, it changes on every blur commit, undo and redo, and each change is announced, competing with the new navigation live region. — FIX: announce state transitions only, and keep the running count out of the live text.
|
||||
13. [MINOR] Below 640 px the visible tab panel can lose its accessible name. — WHY: §3 sets `aria-labelledby="editor-tab-<tab>"`. Général and Constats live in the « Plus » list, which is rendered only while open (EditorTabs.tsx `open &&`), and `pick` closes it. So with Général or Constats selected, the visible panel has no name; today the panel carries an aria-label. axe reports this as "needs review", so the Lot H scan stays green. — FIX: keep an aria-label on each tab panel.
|
||||
14. [MINOR] Hidden places re-render on every commit. — WHY: DraftEditor subscribes to `previewState` (AdminSheetDraftRoute.tsx:95) and rebuilds `goTo` on each render (:86). If `navigate` is not memoised, every hidden Activity child re-renders at low priority on each commit. Each one re-parses the 300 KB document through its own `useSheetDocument`, and FindingsTab rebuilds its items. — FIX: make `navigate` stable (useCallback over dispatch) and keep the other place props stable.
|
||||
15. [MINOR] The Lot B keep-alive and focus proofs are blind in happy-dom, and the browser suite is off until Lot H. — WHY: happy-dom's `focus()` checks connection, disabled and inert only, never `display:none` (HTMLElementUtility.focus). So "requests reach only their owner" and "not found → tab, never body" pass even when the target is a hidden row. Meanwhile e2e:shell stays knowingly red from Lot B to Lot H, so a regression from Lots C to G cannot be told apart from the expected red. — FIX: move the `e2e/support/editor.ts` rewrite and one Chromium keep-alive/focus spec into Lot B, and run the unaffected specs (access, recovery, conflict, signout) at each lot.
|
||||
PROOF: read 52 files (the plan; the contract; AdminSheetDraftRoute; the tab model and tab row, ToolColumn; TextField, DraftField, useCropGroup, useEditCommand, useViewUpdate, sheetDocument; the General, Views, Vertebrae, References, Findings and Annotations tabs; CategoriesSection, EditableAnnotations, uiState, CreationPanel, creationAttempt, useCanvasBuild, AnnotationCanvas; focusRequest, useUndoShortcuts, useViewport, mode; the store slices editorEdit, undo, editorSave, editorBase, editorTypes, editorStore, editorLoad, recoveryFlow, recovery, persistence; DraftHeader, ConflictDialog, ModalDialog, Dialog, DeleteDialog, AppLayout, MobileDrawer, useAdminQuery; the getOfficialSheetAdmin schema; maquettes.html with the board 11 PNG; learnings LRN-057/082/085/089/104/111/115/116; happy-dom 20.10.6 focus and inert source). Also inspected: React 19.2.6 in the lockfile, the 300 KB equine document.json, the shared « Nom (FR) » labels in fr.ts, and the page-wide getByLabel calls in the e2e specs. Checked plan §2-§8, Review focus 1-5, Lots B/C/E/F/H and Edge cases. Read-only throughout: nothing was run, no test was executed.
|
||||
```
|
||||
|
||||
## Simplicity (first draft)
|
||||
|
||||
```text
|
||||
CHALLENGE — LENS: simplicity — VERDICT: CONCERNS(2)
|
||||
PLAN: /home/bchanot/Documents/faunosteo-v1-2/.claude/tasks/plans/2026-11-06-v1-2-6-ux-u1.md
|
||||
FINDINGS:
|
||||
1. [MAJOR] The unsaved-count machinery is a second copy of state the history already holds. It adds a `saveDistance` store field, a `nextSaveDistance` reducer with six events, `saved(sentDistance)` threaded through the save attempt, and edits to `editorBase`, `editorEdit`, `editorLoad`, `recoveryFlow`, `editorSave`, `editorTypes` and `undo` (plan §6 "Store additions", Lot E files). — WHY: every writer already keeps the saved text and the history entries as the same string. `readyPatch` and `reloadPatch` set `documentText` and `savedText` from one `text` (editorLoad.ts:81-82, :138-139). `applySaved` sets `savedText: attempt.sentText`, which is the `documentText` at send time (editorSave.ts:86, :121). Commits and steps push `state.documentText` unchanged into the stacks (editorEdit.ts:58, :76; undo.ts:53, :56-73). So the count can be one memoised pure selector: 0 when `documentText === savedText`; otherwise the depth of `savedText` in `undo` (or `redo`), found by `===`; null when absent or `staleBase`. By construction that covers load, discard, reload, restore, commits made during a save, an undo past the save followed by a commit (redo cleared) and every trim. The hand-kept counter already misses one case: it nulls on trim only "after any commit", but `stepBack` and `stepForward` also call `bounded()` (undo.ts:63, :73). Review focus 3 ("the save line says something false") exists mostly because of this parallel state. — FIX: drop `saveDistance`, `nextSaveDistance` and the five writer edits; add one pure `savedDistance(state)` selector, tested on the same event table, read by `saveLineState`.
|
||||
2. [MAJOR] Lot B is several lots in one. It covers the four-tab model, Activity keep-alive with the visited bookkeeping, `useEditorNavigation` (openers, fallback focus, live region), the route split, the section registry and frame with three `git mv`, the focus-request rework, the "Aller à" retarget, the hint retargets, the canvas fallback to the main view and a provisional references panel. That is about 23 source files and 11 test files for one executor dispatch, and review focus items 1, 2 and 5 all land in it. — WHY: plan Lot B "Files" and "Tests". Keep-alive is separable: today only the active body is mounted (EditorTabBody.tsx:11, "only the active one is mounted"), so a lot that ships the four tabs and sections without Activity keeps today's unmount semantics with no regression, and Activity plus `visitedTabs`/`visitedSections`/`referencesMounted` plus `editor-keep-alive.test.tsx` can follow as their own lot. Separately, the plan leaves `e2e:shell` "knowingly red" from Lot B to Lot H (six commits). Most of the coupling sits in two helpers (`e2e/support/editor.ts:326-330` `selectTab`, `warm-up.ts:20,43` `TABS`), and only 9 `selectTab` calls name a removed tab ('views' 7, 'references' 1, 'vertebrae' 1). — FIX: split B into B1 (tabs, navigation, sections, retargets, plus the `selectTab`/`openSection` helper rewrite) and B2 (Activity keep-alive and its tests), so Lot H only adds the new journeys.
|
||||
3. [MINOR] The lot boundaries move header and glyph work away from their consumers. The header is touched in B, C and E. Lot B adds a header « Références » button but does not list DraftHeader. Lot C edits `HeaderActions.tsx` ("button wiring") while consuming only A and B, yet the `HeaderActions` split is in Lot E. Lot A builds `EditorGlyph` and `history.ts`, which nothing uses before C and E. — WHY: plan Lot A "nothing consumes them yet", Lot B "header « Références » button", Lot C files, Lot E files and §6 split. — FIX: do the DraftHeader → HeaderActions/SaveLine split in the first lot that adds a header control (B), and create `EditorGlyph` and `history.ts` in the lots that consume them.
|
||||
4. [MINOR] `apps/app/src/editor/history.ts` is a new module (with a test over every mode × recovery pair) for a predicate the route already computes twice. — WHY: AdminSheetDraftRoute.tsx:117 passes `mode === 'edit' && recovery === 'none'` to `useUndoShortcuts`, and :132 computes `readOnly = mode !== 'edit' || recovery !== 'none'`, its exact negation. A third spelling adds a source instead of unifying one. — FIX: compute `writable = !readOnly` once in the route and pass it to `useUndoShortcuts` and `HistoryButtons`; no new file.
|
||||
5. [MINOR] `EditorGlyph` re-draws icons that `Icon` already has, and splits ToolColumn's glyph map in two. — WHY: plan §6 "`EditorGlyph.tsx` (local glyph map … with `book`, `search`, `close`)". `components/ui/Icon.tsx` already exports `book` and `close` and is already imported by DraftHeader (`Icon name="lock"`), so using them needs no change to Icon.tsx. ToolColumn.tsx:24-34 keeps the other seven paths in its own `GLYPHS`, which leaves three glyph tables in the editor. — FIX: use `Icon` for book and close; move ToolColumn's whole `GLYPHS` map into `EditorGlyph` (adding `search`) so the editor keeps one table.
|
||||
6. [MINOR] `citationCounts` re-implements a tree walk the editor already has, and both new filters (overview "Filtrer par nom", panel search) re-implement accent folding. — WHY: plan §5 asks for a recursive walk "counting `reference_ids` of every `FindingCategory` and `FindingNode`", but `buildItems(doc)` (findings/tree.ts:161) already flattens every category and node with `element.value` (tree.ts:131, :154). `folded()` exists at catalogue/useCatalogue.ts:53 (NFD, strip `\p{Diacritic}`, lowercase). — FIX: count over `buildItems(doc)`; share one fold helper between the two filters (exporting `folded` needs a FILE SCOPE line, or put one editor-local helper used by both).
|
||||
7. [MINOR] The `reset` action and the render-phase `setTab` exist only because the navigation state lives in DraftEditor, which mounts before the document is loaded. — WHY: plan §1 `reset (tab: the C40 initial tab of an opened version)`, Edge cases "navigation state is per mounted `DraftEditor`"; AdminSheetDraftRoute.tsx:97-100 sets the tab during render once `previewState` arrives. The plan's new `EditorWorkspace` renders only once the version is opened, so `initialTab(previewState, tier)` is known when it mounts. — FIX: call `useEditorNavigation` in `EditorWorkspace` with a lazy `useReducer` initialiser; delete `reset` and the render-phase setState.
|
||||
8. [MINOR] Lot G rewords prose separately from the lots that move each place, so strings stay wrong from B to F and the same keys and tests are touched twice. — WHY: Lot B retargets `UnmeasuredHint` (PropertiesPanel.tsx:159-175) and renames `editor.tab.*` to `editor.place.*` (§10). But `editor.annotations.unmeasured.hint` and `no_child_view` (fr.ts:1510, :1516) still say "onglet Vues et illustrations" until Lot G, and `editor-annotations-tab.test.tsx:487` is rewritten in G instead of B. — FIX: reword each prose key in the lot that moves its place; Lot G keeps only the label-proposals file and the parity check.
|
||||
9. [MINOR] "On the drawing" has two encodings. — WHY: plan §1 makes `'drawing'` a member of `ANNOTATION_SECTIONS` while `EditorTarget.section` is `AnnotationSection | null`, so a target on Annotations can say `null` or `'drawing'`. The plan does not say whether `null` keeps the open section or means the drawing (for example the IssueList fallback "the place alone"). — FIX: keep one encoding (drop `'drawing'` and use `null`, or make `section` non-null on Annotations targets) and state that `select_tab` is the only action that keeps a section.
|
||||
PROOF: read 41 files: the plan, the U1 contract, UX_PLAN §3 U1, UX_TESTS U1, AdminSheetDraftRoute.tsx, editor/{tabs,focusRequest,verification,useUndoShortcuts,sheetDocument}.ts, annotations/focusTarget.ts, state/{undo,editorEdit,editorBase,editorLoad,editorSave,recoveryFlow}.ts, core/sameDocument.ts, findings/tree.ts, components/editor/{EditorTabs,EditorTabBody,DraftHeader}.tsx, tabs/{Annotations,General,References,Vertebrae}Tab.tsx, annotations/{ToolColumn,PropertiesPanel}.tsx, findings/FindingContent.tsx, verification/IssueList.tsx, ui/Icon.tsx, shell/{AppLayout,MobileDrawer}.tsx, admin/useAdminQuery.ts, catalogue/useCatalogue.ts, packages/supabase/src/sheets.ts (save answer, draft_last_save), i18n/fr.ts prose lines, e2e/support/{editor,warm-up}.ts, maquettes.html hist/save/overviewPanel, core-wasm ElementKey type, pnpm-lock (React 19.2.6). Inspected the string identity across every unsaved writer, bounded() call sites, existing icon/fold/tree helpers and e2e tab coupling (grep counts). Checked plan §1-§10, Lots A-I, Review focus, Edge cases and Contract amendments against the owner CONSTRAINTS; nothing that was settled is re-raised (server-time read, non-modal panel, approach A, registry, keep-alive goal).
|
||||
```
|
||||
|
||||
## Correctness, confirmation pass (revised plan)
|
||||
|
||||
```text
|
||||
CHALLENGE — LENS: correctness — VERDICT: CONCERNS(3)
|
||||
PLAN: /home/bchanot/Documents/faunosteo-v1-2/.claude/tasks/plans/2026-11-06-v1-2-6-ux-u1.md
|
||||
FINDINGS:
|
||||
1. [MAJOR] Keeping places mounted with `hidden` removes the commit that currently saves typed text on a tab switch, and nothing replaces it on paths where no blur fires. — WHY: Today a tab switch unmounts the body (EditorTabBody.tsx:11, "only the active one is mounted"), and TextField's cleanup commits any typed text still pending (TextField.tsx:61-68). Plan §2 says instead "typed text is committed by the blur that any tab click, key or « Aller à » press causes first, as today". That is not how it works today. Plan §6 also says "Safari and iPadOS do not move focus to a tapped button", yet it adds the pointerdown blur only to HistoryButtons. Tab buttons, « Plus » items, overview entries, « Retour au dessin », header « Références » and « Aller à » all lack it. Edit mode includes touch from 1 024 px (AC11). Escape closing the references panel (§5) also hides a focused ReferenceRow TextField (ReferenceRow.tsx:54,67) without any blur event. The text then sits uncommitted in a hidden field. `unsaved` stays false, so the leave guard is not armed (editorBase.ts:58-60), no recovery copy is written (recoveryFlow.ts:124), and « Enregistrer » sends the document without it. Leaving the page loses it silently, which breaks owner precision 1. — FIX: in useEditorNavigation, blur the active text field (which commits it) before every move: select_tab, open_section, back_to_drawing, open_references, close_references including Escape, and go_to. Pin it with B2 tests where focus stays in the field during a tab change and during an Escape close.
|
||||
2. [MAJOR] « Aller à » an annotation silently discards a tracing in progress; the plan protects only a pending creation. — WHY: §4 / choice 12 keep the creation "while a creation is pending" (`ui.pending`). The drawing's request handler dispatches `view` then `select` (EditableAnnotations.tsx:60-65). `view` returns `{...initialUi, viewId}` and `select` sets `tracing: null` (uiState.ts:56-67), so the tracing and the active tool are dropped. That covers a new zone or link tracing and a `replace` tracing. With keep-alive the tracing survives the switch to Vérification, then « Aller à » discards it during a tab change, which breaks gated precision 1. Review focus 2 itself names "a tracing" as state, but §4's rule leaves it out. — FIX: extend the « Aller à » rule to `ui.tracing` (kept, shown, announced, no view or select dispatch), and add the test to editor-sections.test.tsx and editor-keep-alive.test.tsx.
|
||||
3. [MAJOR] Each lot runs only the e2e specs it touches plus two sentinels, which misses specs the lot actually breaks, so "Browser suites stay green at every lot" does not hold. — WHY: B2 (keep-alive) touches no existing spec. editor-journey.spec.ts:309 uses `page.getByLabel('Nom (FR)', {exact:true})` after modifyAnnotations left « Accès modifié » selected (journey:188-191), with no reload in between. After B2 the hidden PropertiesPanel's `#annotation-name-fr` is labelled `editor.annotations.name_fr` = 'Nom (FR)' (fr.ts:1525), so Playwright hits a strict-mode violation. The unit test editor-route.test.tsx:135 (`queryByTestId('editor-tab-annotations')).toBeNull()`) also breaks and is not in B2's list. Lot C moves the list under the drawing, but editor-equine.spec.ts:281,319 and editor-structures.spec.ts:288 query `getByRole('list', {name: editor.annotations.list})`, and C lists only editor-annotations, editor-geometry and editor-journey. Lot E changes the unsaved text: editor-structures.spec.ts:229-231 (`getByText('modifications non enregistrées').toHaveCount(0)`) becomes a check that always passes, because « 1 modification non enregistrée » no longer matches. editor-recovery.spec.ts:142-146 and 168-172 are unlisted (the sentinel will catch them). — FIX: B2, C and E run every editor-*.spec.ts on the sandbox, name these specs in their file lists, and map the rewrites (R-24).
|
||||
4. [MINOR] The unique-id claim is based on a grep of the source and misses SVG ids generated at runtime. — WHY: CropCanvas composes the parent view (CropCanvas.tsx:33 `buildView(preview, parentId)`), and the drawing composes the same view. Both use the per-view scope `fv.<view>.` (compose.rs:164,193), so their ids are identical once both are mounted (drawing visited and a crop group open). B2's "no `id` repeats" test then either fails or has to exempt them. `url(#…)` references in the visible copy also resolve into the hidden one, which relies on SVG keeping display:none defs referenceable. I have not verified this across browsers. — FIX: state the exemption and check the views-section rendering in Chromium, or scope the ids per render.
|
||||
5. [MINOR] The HistoryButtons mechanism has three gaps. — WHY: (a) The commit triggered by the pointerdown blur can be refused (TextField `error`, e.g. `editor.field.required_names`, AnnotationFields.tsx:50). The click then undoes an earlier unrelated change, possibly on another tab, which contradicts "the undo reverts exactly it". (b) That commit changes the save line (« Révision n » → « 1 modification non enregistrée »). If the header row above the tab row rewraps, the button moves between pointerdown and pointerup, the click lands on an ancestor and nothing is undone (LRN-104 class). (c) With an empty history the button is `aria-disabled`. I believe Playwright treats that as disabled for actionability, so the Lot H "typed text then undo, empty history" journey cannot use a plain click (not verified). — FIX: skip the step when the blur's commit did not land (compare `undo.length` before and after the blur); reserve the save line's width; plan the e2e click accordingly.
|
||||
6. [MINOR] The mechanics for « Aller à » while a creation is pending, and for the canvas reset, are under-specified. — WHY: The creation panel heading (CreationPanel.tsx:90 `<h3>`) has no tabIndex -1; the plan adds one only at PropertiesPanel.tsx:61. `apply: (target) => boolean` also cannot report "kept pending", so the hook has no way to trigger the "creation in progress" announcement. The `view` action always returns a new state (uiState.ts:57), so a reset effect that does not check whether a dispatch is needed loops on a document with no main view (`mainViewId` returns '', useViewModel.ts:18-19). I found no UI path that reaches that state. — FIX: add tabIndex -1 there, give `apply` a third outcome, and dispatch the reset only when `ui.viewId` names a missing view.
|
||||
7. [MINOR] Some lot file lists are incomplete. `pnpm typecheck` will catch these, but the R-24 mapping will miss them. — WHY: Lot A types `NavigationState.focus: FocusRequest` and has go_to produce `{target, serial}`, but FocusRequest only changes shape in B1 (focusRequest.ts:5-8 is still `{key, serial}`). B1 omits editor-findings.test.tsx:32 and editor-annotations-tab.test.tsx:44, whose props objects lack the now-required `navigate`; tests are typechecked (tsconfig include "tests"). Lot D omits FindingDetail/FindingsTab, which must pass the opener down to FindingContent. Lot E omits editorBase.ts, whose `initialData()` must hold `lastSave` for open and close to reset it. — FIX: add these files to their lots and define the request type in navigation.ts in Lot A.
|
||||
8. [MINOR] The reducer's rule on the open section is ambiguous. — WHY: §1 calls `select_tab` "the only action that keeps the open section". Read literally, `open_references` and `close_references` reset Annotations to the drawing, so opening the panel from the views section changes what the user sees underneath. Lot A's tests do not pin this. — FIX: state that open_references and close_references keep tab and section, and test it in Lot A.
|
||||
PROOF: read 62 files (plan, U1 contract, UX PLAN §2 G and §3 U1, UX TESTS U1, learnings LRN-089/104/111/115/116; undo.ts, editorEdit/Load/Save/Base/Types.ts, recoveryFlow.ts, recovery.ts, sameDocument.ts, editOps.ts; AdminSheetDraftRoute, EditorTabBody, EditorTabs, DraftHeader, AnnotationsTab, EditableAnnotations, uiState, creationAttempt, CreationPanel, PropertiesPanel, AnnotationFields, GeometryGroup, GeneralTab, FindingsTab, FindingTree, ReferencesTab, ReferenceRow, VerificationTab, IssueList, verification.ts, tabs.ts, focusRequest.ts, focusTarget.ts, useViewModel, sheetDocument, useFraming, useViewport, useUndoShortcuts, TextField, DraftField, ModalDialog, CropCanvas, CatalogueCanvas, AppLayout, MobileDrawer, format.ts, plural.ts, tsconfig; crates/core compose.rs, create.rs, edit.rs, ops.rs, preview.rs; e2e support/editor.ts, warm-up.ts, editor-journey/equine/structures/geometry/recovery specs; editor-route and editor-route-recovery tests; Tailwind 4.3 preflight, axe-core 4.14 aria-controls rule). Inspected: string identity of documentText, savedText and history entries on load, reload, discard, restore, commit, undo, redo, applySaved, draft.unchanged and keepMine (the savedDistance selector holds); Tailwind `[hidden]` !important; effects and focus calls in kept places; global key listeners (none); panel, sticky and inert layout against AppLayout's scroll container; lot compile dependencies and e2e or unit coverage per lot. Checked plan §1-§10, Lots A-I, Review focus, Global constraints, Challenge record.
|
||||
```
|
||||
@@ -835,3 +835,20 @@ Not decided: F5, F9-F21. U1 plan at 2e46c14 untouched: integration points re-che
|
||||
**Alternatives**: U2b after U6 (less `AnnotationFields` rework, later delivery); inside U2 (too large). « Catégorie de constats » kept (clashes with annotation « Catégorie »).
|
||||
**Open**: F2 groups, F3 fields, F4 view model, F5, F9-F21. Recorded in `V1-2-6_UX_FINDINGS_NAV.md` §7, `V1-2-6_UX_PLAN.md` §3 U2b, contract `2026-11-06-v1-2-6-findings-nav-decisions.md`.
|
||||
- **Status (2026-11-06)**: accepted, corrected 2026-11-06 after fresh verifier: F22 decision = owner sentence only (« préselectionner sa zone de rattachement. Ne pas imposer une seconde sélection inutile. »); form variant open: fixed zone (board 18 A) or preselected changeable field (literal reading). F8 decision = owner wording (« opération logique atomique, validée et annulable, sans doublon silencieux »); core validation via commitBatch, one undo entry, duplicate-name notice = study's proposed means, confirm in U2b contract.
|
||||
- **Status (2026-11-06)**: accepted, completed by BDR-104 (F2 leaves, F3, F4 model A, F8, F22 decided 2026-11-06)
|
||||
|
||||
## BDR-104 — V1-2.6 U2b F2/F3/F4/F8/F22 decided, U1 design confirmed, no implicit sandbox deletion (2026-11-06)
|
||||
- **Status**: accepted
|
||||
**Decision**: owner brief « U1 / U2b — Derniers arbitrages avant implémentation » (2026-11-06). U1 design confirmed; U2b placement between U2 and U3 confirmed. U2b decided in full:
|
||||
- F2: count selectable leaves only, no intermediate groups; duplicates from several annotations of one zone removed (grasset 25, draft 627). Identity = zone id + node path, never label.
|
||||
- F3: search FR + EN on names of zones, families, groups, leaves; accent- and case-insensitive; all words must match, any order, across tree levels.
|
||||
- F4: model A. No annotation ticked → selected views filter their zones; from first tick → explicitly picked zones; intersection with text.
|
||||
- F8: never auto-create redundant zone; annotation without zone → explicit link to existing zone or validated creation; coherent, undoable, non-destructive; never merge two distinct findings on equal labels.
|
||||
- F22: finding added from an annotation defaults to its zone; any change of anatomical association = explicit action, no silent move of existing findings. Study reads « par défaut » as variant (b): preselected, changeable field.
|
||||
- Sandbox rule: plan approval authorises NO data deletion, sandbox included. Each `db:sandbox down` / `up fresh` needs its own explicit owner go (proposed contract clarification 2.9 of `V1-2-6_UX_U1_CHECKPOINT.md`, prevails over plan :38-40, :397).
|
||||
Still open: F5, F9-F21 (recommendations only); U2b contract details: F3 œ/æ/’ fold shared with catalogue, other-language display, F8 second confirmation for a duplicate name. U1 authorisation pending: 18 choices, amendments 2.1-2.9, reset procedure.
|
||||
**Rationale**: leaves = what practitioner records (`FindingsTreePicker.tsx:35`); facet model gives a view's findings in one click; explicit association avoids silent data moves.
|
||||
**Alternatives**: F2 all nodes (boards' 29/730); F4 model B picks only; F22 variant (a) fixed zone (board 18 A).
|
||||
**Open**: see above. Recorded in `V1-2-6_UX_FINDINGS_NAV.md` §6-§7, `V1-2-6_UX_PLAN.md` U2b, `V1-2-6_UX_U1_CHECKPOINT.md`.
|
||||
- **Status (2026-11-06)**: accepted, precision after fresh verifier: F2 « Identity = zone id + node path » is the study's reading (V1-2-6_UX_FINDINGS_NAV.md §7 F2), not owner wording; « never by label » comes from owner F8.
|
||||
- **Status (2026-11-06)**: accepted, wording: « decided in full » means decided by the owner; details left to the U2b contract stay open (F3 œ/æ/’ fold and other-language display, F8 second confirmation).
|
||||
@@ -536,3 +536,4 @@ R5.4: `draft/{labels,changelog,review_report,drawing,overlay,app_review,svg_comp
|
||||
## 2026-11-06
|
||||
- V1-2.6 U0 (docs only, BDR-101): V1-2 contract §6.2/§6.4 (draft rounds)/§6.7/§7.4/§8.2-8.4/§12.2 O22 (save + approval/publication fixed-category checks, not built)/§16.7/§16.12/§17.12; level-1 C3-C40 notes; design README v1-2-6 validated; rules sheet-model/schemas; 5 UX docs. T17, T12, T6, T14, T1 open. Verifier ECARTS(1) x2 fixed. No code, no DEV.
|
||||
- V1-2.6 U2b principle approved by owner (BDR-103): U2b after U2; F1/F2/F6/F8/F22 decided, F7 term, F3/F4 partial; study §7 table F1-F22 with alternatives + consequences, F2 groups open (730 vs 627 leaves), F3 fields, F4 facet model; LRN-119 Activity. U1 plan 2e46c14 untouched. Docs only, no DEV.
|
||||
- V1-2.6 owner final arbitrations (BDR-104): U2b F2 leaves, F3, F4 model A, F8, F22 decided; U1 design confirmed; no implicit sandbox deletion. U1 checkpoint page (18 choices, AC3/4/5/7/17 exact, 16 MAJOR traced, reset = down + up fresh, lot criteria). Docs only, sandbox untouched.
|
||||
@@ -680,8 +680,8 @@ Order (BDR-071): P0 docs + decisions → V1-1 clients and animals → V1-2 sheet
|
||||
- [ ] V1-2.6 UX redesign technical preparation (owner brief 2026-11-05 « V1-2.6 — Validation UX définitive et préparation technique »: 16 boards + 11 choices validated; docs and static audits only, no app/Rust/SQL/worker code, no DEV, no merge, no V1-2.7; STOP at the technical checkpoint)
|
||||
- [x] static audits (core model, rendering/PDF/N-1, geometry/wasm, SQL/worker, editor/tests) · [x] docs/development V1-2-6_UX_{PLAN,COMPATIBILITY,TESTS,RISKS,DECISIONS}.md (sub-steps U0-U9, decisions T1-T19) · [x] independent review (3 lenses: CONCERNS 5/9/6, no BLOCKER) + fixes integrated (plan §6) · [x] commit + push branch · [x] owner answers 2026-11-05 (brief « V1-2.6 UX — Ratification des décisions techniques », BDR-100): T11 approved, T16 conditional deferral (curves lot), T2/T3 conditional on proofs, T4 no residual gap, T5 history preserved, T9 three actions, T10 navigation type, T12 principle · [x] five docs updated (decisions, compatibility §0/§7/§8, tests, risks + blocking criteria, plan §7) · [x] LRN-118 (wasm measuring rule) · [x] independent reviews: correctness challenger CONCERNS(5 MAJOR, 7 MINOR) integrated; verifier ECARTS(2) fixed; targeted re-check ECARTS(2) (one U6 test assumed permissive save, deploy order said all rounds) fixed · [x] third independent check before commit (2026-11-05): ECARTS(2) on K10/K11 (R-3 mitigation, U6 objective on older T4 scope, write-lock test assumed stripping save, T16 count scope in two forms) fixed · [x] fresh targeted re-check: CONFORME 12/12 (G1-G4 closed; 7 observations kept for U0) · [x] commit + push · [x] owner answers 2026-11-05 (brief « Autorisation U0 uniquement », BDR-101): T4 both SQL checks approved (O22 amended), T5 defaults, T10 option B, T15, T16 count before activation, « Remplacer par un polygone » explicit · [x] T17 answered 2026-11-06 (BDR-102) · [ ] still open: T12 text (before U7), T6 (V1-2.8), T14 follow-up; T1 only if a measure exceeds · [x] owner authorisation to start U0 (2026-11-05)
|
||||
- [ ] V1-2.6 UX U0, contract and decisions, docs only (contract `.claude/tasks/contracts/2026-11-05-v1-2-6-ux-u0.md`; no code, no SQL, no DEV, no U1): [x] V1-2 contract §6.2, §6.4, §6.7, §7.4, §8.2-§8.4, §12.2 + §17.1 (O22), §16.7, §16.12, §17.12 · [x] level-1 contract C3, C4, C5, C6, C7, C8, C11, C13, C16, C18, C20, C25, C28, C32, C33, C40, with the precedence rule of its header · [x] docs/design/README.md · [x] rules sheet-model.md, schemas.md · [x] five UX docs · [x] BDR-101 · [x] preconditions (r5:import-equine --check clean, seed 22/6/0 paths, wasm 592 143 B) · [x] independent verification: ECARTS x6 fixed, then CONFORME 12/12 (2026-11-06); open points for U2/U6 not in docs: point edge-size handle (boards 02/03), default laterality of the automatic access (U6), §15 replay text vs the category.fixed.* filter · [x] commit + push · [x] owner U0 checkpoint (approved for good in the brief « Autorisation de U1 uniquement », 2026-11-06)
|
||||
- [ ] V1-2.6 UX U1, editor shell (brief « Autorisation de U1 uniquement » + « U1 — Validation de la conception interne », approach A; contract `.claude/tasks/contracts/2026-11-06-v1-2-6-ux-u1-1123.md`; plan `.claude/tasks/plans/2026-11-06-v1-2-6-ux-u1.md`, lots A, B1, B2, C-I; no Rust/SQL/worker/scripts, no DEV, no merge, no U2): [x] design approach A validated by the owner with 10 precisions · [x] owner choices 2026-11-06 (server save time, non-modal references panel, citation button in the finding's detail, board 01 annotation card) · [x] plan written + three-lens challenge (correctness CONCERNS 6, robustness CONCERNS 5, simplicity CONCERNS 2, no BLOCKER) integrated · [ ] owner plan checkpoint · [ ] lots A-I · [ ] gates, verifier, security · [ ] owner U1 checkpoint
|
||||
- [ ] V1-2.6 UX complement « annotations ↔ constats » (owner brief 2026-11-06 « Nouvelle exigence UX : navigation bidirectionnelle »; contract `.claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-design.md`; design only, U1 plan untouched, no code, no DEV): [x] relations audit (one link `finding_zone_id`, no new association, equine draft 1:1) · [x] boards 17-22 `docs/design/v1-2-6-constats/` · [x] study `docs/development/V1-2-6_UX_FINDINGS_NAV.md` (no U1 integration point needed, sub-step U2b proposed, risks, tests, decisions F1-F21) · [x] fresh design review APPROVE WITH FIXES (3 MUST-FIX, 16 SHOULD), fixes applied · [x] fresh verifier ECARTS(4) → ECARTS(2) → CONFORME 9/9 (round 3; 567da67 came after it, not covered) · [x] owner principle validation 2026-11-06 (brief « Validation de principe U2b et préparation des checkpoints », BDR-103): U2b retained after U2 and before U3, F1/F2/F6/F8/F22 approved, F7 for the term « Famille », F3/F4 in part · [x] decisions F1-F22 table (alternatives, consequences, state), F2 groups vs leaves, F3 field list, F4 view semantics, boards with their decisions in study §7.4, U2b entry in `V1-2-6_UX_PLAN.md` §3, LRN-119 (`<Activity>`), contract `.claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-decisions.md` · [x] fresh verifier on that contract: ECARTS(9) → fixed → CONFORME 11/11 (6 observations outside criteria kept for the owner) · [ ] owner: F2 groups, F3 fields, F4 view model, F5, F9-F21 · [ ] U2b authorisation (after U2)
|
||||
- [ ] V1-2.6 UX U1, editor shell (brief « Autorisation de U1 uniquement » + « U1 — Validation de la conception interne », approach A; contract `.claude/tasks/contracts/2026-11-06-v1-2-6-ux-u1-1123.md`; plan `.claude/tasks/plans/2026-11-06-v1-2-6-ux-u1.md`, lots A, B1, B2, C-I; no Rust/SQL/worker/scripts, no DEV, no merge, no U2): [x] design approach A validated by the owner with 10 precisions · [x] owner choices 2026-11-06 (server save time, non-modal references panel, citation button in the finding's detail, board 01 annotation card) · [x] plan written + three-lens challenge (correctness CONCERNS 6, robustness CONCERNS 5, simplicity CONCERNS 2, no BLOCKER) integrated · [x] U1 design confirmed by the owner 2026-11-06 (BDR-104; no data deletion implicit in the plan approval, sandbox included) · [x] authorisation checkpoint page `docs/development/V1-2-6_UX_U1_CHECKPOINT.md` (18 choices, amendments 2.1-2.9, audits traced, sandbox reset scope, lot criteria; challenger reports archived `.claude/audits/2026-11-06-v1-2-6-u1-plan-challenges.md`; contract `.claude/tasks/contracts/2026-11-06-v1-2-6-u1-authorisation-checkpoint.md`, fresh verifiers ECARTS(3) → ECARTS(1) → last gap fixed, not re-verified) · [ ] owner U1 authorisation · [ ] lots A-I · [ ] gates, verifier, security · [ ] owner U1 checkpoint
|
||||
- [ ] V1-2.6 UX complement « annotations ↔ constats » (owner brief 2026-11-06 « Nouvelle exigence UX : navigation bidirectionnelle »; contract `.claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-design.md`; design only, U1 plan untouched, no code, no DEV): [x] relations audit (one link `finding_zone_id`, no new association, equine draft 1:1) · [x] boards 17-22 `docs/design/v1-2-6-constats/` · [x] study `docs/development/V1-2-6_UX_FINDINGS_NAV.md` (no U1 integration point needed, sub-step U2b proposed, risks, tests, decisions F1-F21) · [x] fresh design review APPROVE WITH FIXES (3 MUST-FIX, 16 SHOULD), fixes applied · [x] fresh verifier ECARTS(4) → ECARTS(2) → CONFORME 9/9 (round 3; 567da67 came after it, not covered) · [x] owner principle validation 2026-11-06 (brief « Validation de principe U2b et préparation des checkpoints », BDR-103): U2b retained after U2 and before U3, F1/F2/F6/F8/F22 approved, F7 for the term « Famille », F3/F4 in part · [x] decisions F1-F22 table (alternatives, consequences, state), F2 groups vs leaves, F3 field list, F4 view semantics, boards with their decisions in study §7.4, U2b entry in `V1-2-6_UX_PLAN.md` §3, LRN-119 (`<Activity>`), contract `.claude/tasks/contracts/2026-11-06-v1-2-6-findings-nav-decisions.md` · [x] fresh verifier on that contract: ECARTS(9) → fixed → CONFORME 11/11 (6 observations outside criteria kept for the owner) · [x] owner 2026-11-06 (brief « U1 / U2b — Derniers arbitrages avant implémentation », BDR-104): F2 leaves, F3, F4 model A, F8, F22 decided; study §6-§7 updated · [ ] owner: F5, F9-F21 (before the U2b contract) · [ ] U2b authorisation (after U2)
|
||||
- [ ] follow-up candidates (owner T14): multi-tab notice; RR item for the rollback limit of the category model (new id, reconcile with develop)
|
||||
- [ ] curves lot (ex-U9, owner T16 2026-11-05): curve handle editing, curved zone move, path remap, path point correction; spec `V1-2-6_UX_PLAN.md` §2 D, tests `V1-2-6_UX_TESTS.md` « Curves lot ». Rule: no feature that lets a path enter a document (package import, zones from the drawing's shapes, a curve drawing tool) ships before or without it. Before the new model is activated on an environment, and before U6 or U8 reaches any environment beyond the throwaway sandbox: read-only count of path geometries in its drafts and published versions (sandbox by U6 itself; DEV and shared environments by the owner or under explicit authorisation; non-zero reopens T16)
|
||||
- [ ] MANDATORY before merging V1-2 into develop (owner 2026-11-03): registry id reconciliation. LRN-095 collides: develop 09655b2 « Port a safe runner verbatim… » (2026-11-02) vs V1-2 « pgTAP across PGlite and the real Supabase image… » (2026-10-28, cited by BDR-084 and the V1-2.1 TODO lines). BLK-013 exists on develop only (« e2e:avatar on develop reached DEV »): `memory.sh` on V1-2 would hand out BLK-013 again, so a V1-2 blocker needs its id checked against develop first. Same for the TODO release-readiness ids: RR-11 is develop's (« sandbox-only e2e follow-ups »), V1-2 uses RR-12. No renumbering during V1-2.6 unless needed; renumber one side and patch its citers at the merge
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
# CONTRACT — v1-2-6-u1-authorisation-checkpoint
|
||||
- date: 2026-11-06 | flow: checkpoint preparation (docs only) | branch: feature/v1-2-anatomical-sheets
|
||||
- status: active
|
||||
- worktree: /home/bchanot/Documents/faunosteo-v1-2 (every command from this absolute path; never DEV; the sandbox is
|
||||
neither started nor reset)
|
||||
- base: a43145a. Commit in place, push; no merge, no `gitflow.sh finish`.
|
||||
|
||||
## REQUEST (verbatim — IMMUTABLE)
|
||||
|
||||
# FAUNOSTEO — U1 / U2b — Derniers arbitrages avant implémentation
|
||||
|
||||
Le propriétaire confirme la conception U1 et le placement de U2b entre U2 et U3.
|
||||
|
||||
## A. Décisions U2b
|
||||
|
||||
F2 — Compter uniquement les feuilles sélectionnables de l'arbre des constats, sans les groupes intermédiaires. Les doublons dus à plusieurs annotations d'une même zone doivent être éliminés.
|
||||
|
||||
F3 — Recherche en français et en anglais, sur les noms des zones, familles, groupes et feuilles. Recherche insensible aux accents et à la casse. Tous les mots doivent correspondre, dans n'importe quel ordre, y compris lorsqu'ils apparaissent à différents niveaux de l'arbre.
|
||||
|
||||
F4 — Valider le modèle A. Sans annotation cochée, les vues sélectionnées filtrent les zones représentées. Dès qu'une annotation est cochée, les zones explicitement sélectionnées déterminent le filtre anatomique. Combiner ce filtre avec la recherche textuelle par intersection.
|
||||
|
||||
F8 — Ne jamais créer automatiquement une zone de constats redondante. Une annotation sans zone doit permettre une association explicite à une zone existante ou une création validée. L'opération doit être cohérente, annulable et non destructive. Ne pas fusionner deux constats distincts sur la seule égalité de leurs libellés.
|
||||
|
||||
F22 — Lorsqu'on ajoute un constat depuis une annotation, utiliser sa zone existante comme rattachement par défaut. Toute modification de l'association anatomique passe par une action explicite, sans déplacement silencieux des constats existants.
|
||||
|
||||
Mettre à jour les décisions et les tests U2b concernés.
|
||||
|
||||
## B. Décisions encore ouvertes
|
||||
|
||||
Présenter les questions F5 et F9 à F21 avec leurs libellés exacts et les recommandations correspondantes.
|
||||
|
||||
Ne pas les considérer comme automatiquement approuvées.
|
||||
|
||||
## C. Checkpoint d'autorisation U1
|
||||
|
||||
Le plan U1 au commit 2e46c14 est conservé.
|
||||
|
||||
Présenter maintenant, sans réécrire le plan :
|
||||
|
||||
1. Les 18 choix visibles du plan U1, avec alternatives, recommandation et conséquences.
|
||||
2. Les cinq amendements contractuels exacts.
|
||||
3. Le résultat des trois audits indépendants et la trace de résolution de leurs points majeurs.
|
||||
4. La portée exacte de toute suppression ou réinitialisation de la sandbox prévue dans le lot B1.
|
||||
5. Les critères de validation de chaque lot A à I.
|
||||
|
||||
Prévoir qu'aucune suppression de données, même en sandbox, n'est implicitement autorisée par l'approbation du plan.
|
||||
|
||||
## D. Apprentissage React
|
||||
|
||||
Conserver LRN-119, notamment la distinction entre préservation de l'état et reprise des effets de React Activity, ainsi que le comportement des références DOM lors du masquage.
|
||||
|
||||
## E. Restrictions
|
||||
|
||||
Documentation et arbitrages uniquement.
|
||||
|
||||
Ne pas modifier le code applicatif, Rust, SQL ou worker.
|
||||
|
||||
Ne pas utiliser Supabase DEV.
|
||||
|
||||
Ne pas réinitialiser la sandbox.
|
||||
|
||||
Ne pas fusionner, déployer ni commencer U1, U2 ou U2b.
|
||||
|
||||
S'arrêter à la présentation des dernières décisions nécessaires à l'autorisation d'implémentation U1.
|
||||
|
||||
## CLARIFICATIONS
|
||||
(none)
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
1. U2b decisions (A): the study `docs/development/V1-2-6_UX_FINDINGS_NAV.md` section 7 records F2, F3, F4, F8 and
|
||||
F22 as approved with the owner's sentences of this REQUEST verbatim, adapts their recommendation and consequences
|
||||
(F2 leaves and identity never by label, F8 explicit link or validated creation and no merge on labels, F22 default
|
||||
zone and no silent move), flags any reading the owner did not state (F22 « par défaut ») and any detail left to
|
||||
the U2b contract; F5 and F9 to F21 stay « to decide »; every figure added is computed from the equine draft under
|
||||
the rule it names.
|
||||
2. U2b tests (A): the study's section 6 lists unit and e2e tests for each of F2, F3, F4, F8 and F22 as decided.
|
||||
3. U1 plan preserved (C): plan and contract byte-identical to 2e46c14.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && git diff --quiet 2e46c14 -- .claude/tasks/plans/2026-11-06-v1-2-6-ux-u1.md .claude/tasks/contracts/2026-11-06-v1-2-6-ux-u1-1123.md && echo U1_UNCHANGED
|
||||
EXPECT: U1_UNCHANGED
|
||||
EVIDENCE: MET exit=0 marker-found :: U1_UNCHANGED
|
||||
4. Checkpoint page (C1-C5): `docs/development/V1-2-6_UX_U1_CHECKPOINT.md` gives (1) the plan's 18 visible choices
|
||||
quoted verbatim, each with alternatives, recommendation and consequences; (2) the five AC amendments with the
|
||||
contract's current text verbatim and an exact proposed text faithful to the plan, plus the plan's other contract
|
||||
changes quoted; (3) the verdicts and MAJOR/MINOR counts of the three challengers and the confirmation pass, each
|
||||
MAJOR traced to its resolution in the plan, matching the archived original reports
|
||||
`.claude/audits/2026-11-06-v1-2-6-u1-plan-challenges.md`; (4) the exact scope of every planned sandbox reset
|
||||
(commands, what is removed and what is not, current state) from `scripts/db-sandbox.sh`; (5) the validation
|
||||
criteria of lots A to I matching the plan; every « plan :n » reference points at the cited text.
|
||||
5. No implicit deletion (C): the page states that the plan approval authorises no data deletion and proposes a
|
||||
contract clarification that prevails over the plan lines authorising the wipe, without editing the plan.
|
||||
6. LRN-119 kept (D): unchanged by this intervention, its status line on DOM refs present.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && git diff --quiet a43145a -- .claude/memory/learnings.md && grep -q "refs to DOM elements detached while hidden" .claude/memory/learnings.md && echo LRN_KEPT
|
||||
EXPECT: LRN_KEPT
|
||||
EVIDENCE: MET exit=0 marker-found :: LRN_KEPT
|
||||
7. Registries: one decisions entry for this brief through `memory.sh`, recording only owner decisions; journal; TODO.
|
||||
8. Restrictions (E): no change under `apps/`, `crates/`, `supabase/`, `packages/`, `scripts/`, `docs/design/v1-2-6/`,
|
||||
the PNG boards; no sandbox container started or removed; the untracked review file never staged.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo-v1-2 && git diff --quiet a43145a -- apps crates supabase packages scripts docs/design/v1-2-6 'docs/design/v1-2-6-constats/*.png' && ! git ls-files --error-unmatch faunosteo-v1-2-6-revue-ux-chatgpt.md >/dev/null 2>&1 && echo CK_SCOPE_OK
|
||||
EXPECT: CK_SCOPE_OK
|
||||
EVIDENCE: MET exit=0 marker-found :: CK_SCOPE_OK
|
||||
9. A fresh independent verifier against this contract; justified gaps fixed; exact verdict reported. STOP.
|
||||
|
||||
## FILE SCOPE
|
||||
- docs/development/{V1-2-6_UX_FINDINGS_NAV.md, V1-2-6_UX_PLAN.md (U2b entry), V1-2-6_UX_U1_CHECKPOINT.md (new)}
|
||||
- docs/design/v1-2-6-constats/REVUE.md
|
||||
- .claude/audits/2026-11-06-v1-2-6-u1-plan-challenges.md (new, verbatim reports)
|
||||
- .claude/tasks/TODO.md, this contract, .claude/memory (through memory.sh)
|
||||
- NOT in scope: the U1 plan and contract, apps/**, crates/**, supabase/**, packages/**, scripts/**, the boards
|
||||
Reference in new issue
Block a user