9.1 KiB
V1-2.6 execution ledger (tracked, resume source)
Plan .claude/tasks/plans/2026-11-03-v1-2-6-editor.md, contract .claude/tasks/contracts/2026-11-03-v1-2-6-editor-1509.md
(C1-C34). Worktree /home/bchanot/Documents/faunosteo-v1-2 (durable, owner 2026-11-04; the former one under a session
scratchpad was removed by the harness cleanup at 13:08, LRN-114). Branch feature/v1-2-anatomical-sheets. Sandbox
only. This file holds every ruling, finding and checkpoint needed to resume; the git-ignored SDD workspace
(.superpowers/sdd/2026-11-03-v1-2-6-editor/) holds drafts only. Updated and pushed after each validated lot.
Lots
| Lot | Commits | Review | State |
|---|---|---|---|
A M8 draft_last_save |
2f824a9 |
clean | done (sandbox fresh 1992 + upgrade from M7, types --check) |
| B sheet asset accessors | f7e7bf4 |
clean | done (sandbox 2/2 twice; refusal observed HTTP 400 + statusCode "403") |
| C preview mutators, edit ops, ids | 173be59, bc43a1b, cfd49c7 |
clean after 2 fix rounds | done |
| D store, undo, recovery, issues | 7f1d440, b14509f |
clean after 1 fix round | done |
| E route, modes, offer, conflict | 6aba971 |
clean | done |
| F Général, Références, Vertèbres | d163b2c |
clean | done |
| G views + upload | 8343528, 1bbf97e, 7ea9619 |
clean after the redone fix rounds (G1 closed codes, G3 hash at load, G2 split) | done |
| H Annotations | 2609785, 3f15762 |
clean after 1 fix round (owner rules O1-O6 hold, H1-H8 addressed) | done |
| I Constats | 92c595c, 91d06c9 |
clean after 1 fix round (C9 description, vet referral, citations; keyboard focus) | done |
| J Vérification + submit | 447d0a4, 4f223e0, 3d589e1 |
clean after 2 fix rounds (« Aller à » selects the element, consumed once) | done |
| K e2e · L owner trial · M gates | — | — | pending (briefs K, L written) |
Rulings (orchestrator, each with its cost if wrong)
- R1
readVersiondraft mode moved from Lot E to Lot D (D'sopen()consumes it). Cost: one lot boundary moved. - R2 the
accepthook lives inCataloguePreview.replaceDocument(text, accept?)so the rollback is in one place. Cost: one signature to move. - R3 a lot's review may run in parallel with the next lot's implementation when their files are disjoint. Cost: a fix round sees a partial tree in typecheck; commits use explicit paths.
- R4 the store refuses
submitwhile unsaved (closed kindunsaved) besidesstale_base; the UI mirrors it. Cost: one extra refusal kind. - R5 Lot E dispatched while Lot D's re-review ran (E never edits store files). Cost: E adapts to a later store fix.
- R6 mode precedence rights > inactive > historical > frozen > narrow (strongest server-side reason first, display reason last). Cost: notice order only; listed at the checkpoint.
- R7 a detail view's parent change goes through the geometry
accept(it changes the inherited drawing, owner rule 7); the button « Utiliser l'illustration de la vue parente » (drop an own drawing back to a crop) kept as a label proposal and a visible choice for the checkpoint. Cost: a refused parent change; one button removed. - R8 locals limit: one destructuring declaration (
const [x, setX] = useState(),const {a, b} = form) counts as one local, the reading every earlier lot was reviewed under;useCropGroup(5) anduseCropDraft(4) pass. Cost if wrong: a cosmetic split of two hooks. - R9 Constats: a finding category's kind is creation-only (C9 lists no kind edit). Cost: one select added later.
- R10 undo/redo shortcuts editor-wide (plan « Store and sessions »), writable mode only, ignored under an open modal dialog. Cost: shortcut scope only.
- R11 « Aller à … » selects the element through a focus request on
EditorTabProps({key, serial}), each tab seeding its own selection. Cost: one prop on every tab. - R12 the 11 store files reformatted by a subagent's Prettier run (format only, uncommitted) are neither committed
nor reverted by the orchestrator: the subagent's
git checkoutwas refused by the permission classifier and the orchestrator does not run a refused action on its behalf; the owner decides (revert or keep). Every commit uses explicit paths meanwhile. - Promoted minors (same invariant as an Important finding): C non-trap
internaltaken as a trap (now detected by runtime generation/status); DdiscardChangesbusy guard and latereadConflictwrite after dismiss.
Open findings to carry
- Lot G fixes DONE (
1bbf97e,7ea9619): G3 root cause — the store already recordeddrawing_hash_mismatchindrawingFailures;drawingStatusOfread the core'smissingentry first.issues.tsgained the refusal reasondrawing_rejected(+ optionaldrawingDetail) for attaching a drawing the core holds as rejected;geometryAcceptunchanged.svg_not_canonicalis unreachable through the page's own upload (it uploads its cleaned form); covered by attaching a held non-canonical drawing. - Lot H design notes from the lost attempt (NOT implemented, NOT tested; to be rebuilt): proposal arithmetic in
editor/annotations/frame.ts(F from theviewBoxtext withNumber, r0 floored to 0.01, candidates A/B/C, C by an inward-rounded per-axis clamp with the exact clamp on an empty interval); every geometry commit throughcommit(cmd, { accept: geometryAccept({ before: previewState, changedIds: [id] }) });correctionForoffers C on anout_of_framerefusal or a refused radius under r0; one geometry-group component for the pending creation and the properties panel; read-only reusesCatalogueCanvaswithkey={handleVersion}; select and place onclick, drag move after 4 CSS px;canPanfalse on a selected marker or while a drawing tool is active. Implementer's own additions to judge: zone and link clicks outside F get the same hint as points; « Remplacer par un polygone » commits on close underaccept, a refusal drops the tracing.
Deferred minors (for the final review's triage)
-
A: M8 header comment « Null when the draft has no draft »; 023 lacks a save with a null actor; 023 non-save write relies on the revision trigger (asserted).
-
B: doc line 101 chars in sheets.ts; test lines > 100 chars;
classifyUploadErrorduplicates 3 branches ofclassifyDrawingError;storageCode()"undefined" fallback. -
C:
canPanref set during render; unrelated Prettier re-wrap in useFraming.ts; tests lack re-add-replaces-bytes after rebuild and a 16-entry map assertion; cleaning test IIFE builder; privatehandlecast in a test; localdocumentshadows the DOM global. -
D:
keepMinechecks conflict before the recovery block (unreachable);finishRestoredrops a failed copy drawing from the held list;geometryErrorsByIdsuperset of the four codes (accepted);setCanEditwithout arestoringguard (no loss); true→false→true with unsaved work untested. -
E:
otherCopies.tsre-parses copies on render (addsheetIdtoStoredCopyInfo); leave guard under recovery alone untested at page level; conflictreadingstate has no Annuler (Escape to confirm in e2e). -
F: digits-only count check overlaps the core's unsigned rule (shape check);
duplicate_keyretry and DeleteDialog failure branch untested; RangeEditorsetStateduring render; repeated row labels; long citation titles. -
G:
issues.tsPrettier noise on Lot D lines; frame-refusal test lacks theother/removalfallbacks; no session check between register/list/upload/confirm (idempotent); UI state set after an await without the session check;parseBoxaccepts1e3/0x10(the core decides). -
I: no tree type-ahead; expansion seeded once (a restore bringing new zones leaves them collapsed); add-category with a node selected lands at zone level without a hint;
Citationslong JSX;currentItems()swallows a parse error. -
H:
pendingForClick(creation.ts:161) 7 locals; ToolColumn, CreationFields, CreationPanel, ToolButton long JSX (markup); per-click 1000×30 / 4000×200 tests assert invariants, not each verdict; 1000×30 keyboard case skips silently;useUndoShortcutsusesdialog[open](not:modal), ignores neitherdefaultPreventednorrepeat; stalebuilt.failurenotice for one build after a view switch;proposedRadiuskept on a cx/cy-only edit. -
E (found at H re-review):
DraftEditor13 locals andAdminSheetDraftRoute10 locals (limits breach). -
J: focus serial restarts at 1 after a clear (latent: a same-instance self « go to » would be skipped; a monotonic route counter removes it);
focusRowglobal querySelectorAll by JSON key; issue codes a hand-kept mirror of the core's 26 codes (complete today).
Questions for the owner at the checkpoint (not decided)
-
The 11 format-only uncommitted changes under
apps/app/src/editor/state/(R12): revert (git checkout -- apps/app/src/editor/state) or keep. -
« 1 erreurs bloquantes »: ratified wording kept; a singular form needs the owner.
-
Trim leading/trailing spaces of typed values before sending (Lot F review: visible choice).
-
R6 mode precedence, R7 « Utiliser l'illustration de la vue parente », default tab Annotations (boards 04/05).
-
Every new label stays a proposal (
.claude/audits/2026-11-03-v1-2-6-label-proposals.md).