diff --git a/docs/web/KNOWN_LIMITATIONS.md b/docs/web/KNOWN_LIMITATIONS.md index cc6dd406a..674fdcaf8 100644 --- a/docs/web/KNOWN_LIMITATIONS.md +++ b/docs/web/KNOWN_LIMITATIONS.md @@ -87,6 +87,8 @@ boundary; the legacy `parity-ledger.json` is historical planning data. - Keyframe evidence stays PARTIAL: the Outliner keyframe case `outliner-keyframe-keys-web` proves the native keyframing operators ran and an action datablock appeared. The Outliner tree does not expose fcurve or keyframe counts, so no count assertion is made. No new engine evidence is claimed. +- The per-editor cross-walk of these gaps lives in [MODULE-COVERAGE.md](MODULE-COVERAGE.md), which + records one row per `EDITOR_TYPES` entry and the stable gap ids `MOD--NN`. ## Blender feature scope diff --git a/docs/web/MODULE-COVERAGE.md b/docs/web/MODULE-COVERAGE.md new file mode 100644 index 000000000..aa3f856ad --- /dev/null +++ b/docs/web/MODULE-COVERAGE.md @@ -0,0 +1,81 @@ +# Editor module coverage + +This page cross-walks the 21 `EDITOR_TYPES` entries in `web/protocol/editor-workflow.ts` against the +e2e specs, headed receipts and known gaps. It exists so that a module is never called covered because a +file with its name exists. The Outliner parity work (G1–G6, B1–B6) is the reference standard; the other +modules are measured against the same bar. + +## Method + +Coverage levels, strongest first: + +- `PROVEN` — a spec assertion or a headed receipt shows a user-visible operation executing on the native + Main: an operator ran, Main changed, and the change was read back or saved. +- `READBACK_OR_PROBE` — the spec reads Main state or drives the protocol without proving the editor + performs the user operation that a desktop user would perform. +- `GATE_ONLY` — the spec proves a gate, block or disabled path, not the editing path behind it. +- `INDIRECT` — the editor is exercised only as a side effect of another editor's workflow, with no + assertion on its own surface. +- `UNCOVERED` — no e2e evidence; the editor appears only in routing tables or workflow fixtures. + +Rules: + +- A spec file name is not evidence. Every `PROVEN` cell names the assertion or receipt it relies on. +- Headed receipts under `tests/golden/*-HEADED-*` are local artifacts and stay untracked; the headed + run counts below come from the `tools/web/run-*-headed.mjs` `KNOWN_CASES` tables. +- `G1`–`G6` parity classes are recorded in the parity ledger; gaps here use `RESIDUAL` when they are + evidence or protocol gaps rather than a named Outliner class. + +## Editor matrix + +| Editor | App surface | e2e evidence | Headed receipts | Level | Gaps | +| --- | --- | --- | --- | --- | --- | +| `VIEW_3D` | viewport canvas, quick toolbar, native viewport overlays | `viewport-navigation-web-production` ("wheel zoom, Shift+MMB pan, click select and G/X modal"), `viewport-navigation-native-production`, `viewport-consistency` | 18 cases / 142 dirs (`run-viewport-navigation-headed.mjs`) | `PROVEN` | — | +| `OUTLINER` | React tree rows, restriction columns, library and override markers | `outliner-treeview-production` ("renders native rows with tree semantics and keeps selection wired"), `outliner-headed-production` (48 cases) | 48 cases / 193 dirs (`run-outliner-headed.mjs`) | `PROVEN` | MOD-OUTLINER-01, MOD-OUTLINER-02 | +| `PROPERTIES` | `modifier-stack-ui-production`, `armature-authoring-workbench`, b4 property panels | `modifier-stack-ui-production` ("commits only changed native fields"), `b4-properties-ui-production`, `b4-light-world-output-ui-production`, `wbv2-modifier-parameter-production` | none dedicated | `PROVEN` | MOD-PROPERTIES-01, MOD-PROPERTIES-02 | +| `UV_IMAGE` | UV editing surface, native UV area bridge | `web-uv-workspace-gate` ("finds a writable native UV area and commits an unwrap"), `wbv2-uv-unwrap-batch-production`, `ui-editor-view2d-production` | none dedicated | `PROVEN` | — | +| `NODE` | shader editor, geometry nodes canvas, compositor canvas | `shader-editor-flow-production`, `web-geonodes-canvas` ("adds, connects and commits a graph"), `web-compositor-canvas` ("builds, executes and commits a graph"), `shader-editor-all-nodes-production` | none dedicated | `PROVEN` | — | +| `GRAPH` | Graph Editor surface in the area header | `web-area-graph-editor` ("Camera viewport is real and Graph Editor edits animation keys") | none dedicated | `PROVEN` | MOD-ANIM-01 | +| `DOPE_SHEET` | Dope Sheet surface in the area header | no dedicated assertion; animation specs drive keyframes but not the Dope Sheet rows | none dedicated | `INDIRECT` | MOD-DOPESHEET-01, MOD-ANIM-01 | +| `NLA` | NLA strip track, `wbv2-nla-stack-production` | `nla-strip-ui-production` ("moves native strips and preserves Main through failure and recovery"), `wbv2-nla-stack-production` | none dedicated | `PROVEN` | MOD-NLA-01 | +| `SPREADSHEET` | Spreadsheet browser and CSV export | `web-spreadsheet-readonly` ("browses mesh data, filters columns and exports CSV without editing the Main") | none dedicated | `PROVEN` (read path) | MOD-SPREADSHEET-01 | +| `TIMELINE` | Timeline area, marker rows | `action-marker-ui-production` ("Action creation, keyframes and timeline markers remain editable"), `b5-animation-ui-production` | none dedicated | `PROVEN` | MOD-ANIM-01 | +| `CLIP` | Clip editor routing only | no clip editing spec; `ui-editor-workflow-production` only names the editor | none | `UNCOVERED` | MOD-CLIP-01 | +| `MASK` | Mask datablock readout and selection context | `tracking-mask-production` ("reads Blender Mask data and selection context"), `ui-editor-view2d-production` | none dedicated | `READBACK_OR_PROBE` | — | +| `SEQUENCER` | sequencer strip list, scene strips | `sequencer-authoring-ui-production` ("edits persist in native Main with rollback and history"), `scene-strip-ui-production` | none dedicated | `PROVEN` | MOD-SEQUENCER-01 | +| `TEXT` | Text datablock source editing | `wbv2-text-source-production` ("preserves Text datablock source through Main recovery and reopen") | none dedicated | `PROVEN` (datablock path) | — | +| `CONSOLE` | Python Console session, server operator panel | `console-wasm-keyboard-production` ("uses native Main keyboard history and save/reopen"), `server-operator-ui-production` | none dedicated | `PROVEN` | — | +| `INFO` | Info editor surface | no dedicated assertion; operator reports are read through other surfaces | none | `UNCOVERED` | MOD-INFO-01 | +| `FILE_BROWSER` | file open/save flows, download entry | `file-copy-production`, `file-import-progress` (streamed byte progress and cancellation), `web-save-download-semantics` | none dedicated | `PROVEN` | — | +| `PREFERENCES` | Preferences dialog and keymap editor | `web-preferences` ("Preferences persist through OPFS and keymap rebinding takes effect") | none dedicated | `PROVEN` | — | +| `TOPBAR` | desktop header menus, workspace tabs | `desktop-menu-workflows` ("desktop header menus add, undo, rename and export a real Main scene") | none dedicated | `PROVEN` | — | +| `STATUSBAR` | status line text | asserted incidentally inside other specs (for example the object count in the armature case snapshot) | none | `INDIRECT` | — | +| `UNSUPPORTED` | fallback surface for unknown editor ids | `ui-editor-workflow-production`, capability gates for blocked editors | none | `GATE_ONLY` | — | + +## Gap register + +`OPEN` — reachable by a user, not fixed. `PARTIAL` — the path works but a stated part is missing. +`BLOCKED` — cannot be exercised until another gap clears. `FROZEN` — evidence is deliberately capped. + +| ID | Description | User-visible impact | Evidence | Category | Priority | State | +| --- | --- | --- | --- | --- | --- | --- | +| MOD-OUTLINER-01 | The armature object has no Outliner row in the pose-constraint fixture. Ten headed hardware reruns of `armature panel operates on the selected bone` all failed at `web/tests/fixtures/native-ui-workflow.ts:166`, and the failure snapshot lists five of six objects while Main reports the armature as active. | A user cannot select the armature from the Outliner in that scene, so the armature panel workflow cannot start. | `docs/web/KNOWN_LIMITATIONS.md` armature bullet; `tests/golden/ARMATURE-PANEL-FLAKE/` (untracked) | RESIDUAL | P1 | `OPEN` | +| MOD-OUTLINER-02 | The Outliner is empty in the Rendering workspace, so objects cannot be picked from there. | Row selection has to be done in another workspace first. | `docs/web/KNOWN_LIMITATIONS.md` Rendering workspace bullet | RESIDUAL | P2 | `OPEN` | +| MOD-PROPERTIES-01 | The armature panel case cannot run because it starts by selecting the armature row. Same failing case as MOD-OUTLINER-01. | The armature authoring workbench is unreachable in that workflow. | `web/tests/e2e/armature-editor-coverage-ui-production.spec.ts` | RESIDUAL | P1 | `BLOCKED` | +| MOD-PROPERTIES-02 | `setSceneViewLayerAOVs` and `setSceneViewLayerLightgroups` carry a revision field that the Worker never compares. | Two tabs can overwrite each other's AOV and lightgroup edits without a conflict. | `web/protocol/web-engine-revisions.ts`, `web/tests/unit/web-engine-revisions.test.mjs` | RESIDUAL | P2 | `OPEN` | +| MOD-NLA-01 | `setNLAStack` carries a revision field that the Worker never compares. | A stale NLA stack submission is accepted instead of rejected. | `web/protocol/web-engine-revisions.ts` | RESIDUAL | P3 | `OPEN` | +| MOD-SEQUENCER-01 | `setSequencerTransitions` parses the timeline without comparing `timeline.revision`. | Stale transition edits are accepted. | `web/protocol/web-engine-revisions.ts` | RESIDUAL | P2 | `OPEN` | +| MOD-SPREADSHEET-01 | The Spreadsheet browses, filters and exports but offers no edit path. | Dataset editing stays in the desktop editor. | `web/tests/e2e/web-spreadsheet-readonly.spec.ts` | RESIDUAL | P3 | `PARTIAL` | +| MOD-ANIM-01 | Keyframe evidence stops at "an action datablock appeared": the Outliner tree exposes no fcurve or keyframe counts, so no count assertion is made. | Reviewers cannot confirm key counts from the tree. | `docs/web/KNOWN_LIMITATIONS.md` keyframe bullet; `outliner-keyframe-keys-web` | RESIDUAL | P3 | `FROZEN` | +| MOD-DOPESHEET-01 | The Dope Sheet is exercised only through animation specs that assert on other surfaces. | A Dope Sheet regression could pass the suite. | `web/tests/e2e/b5-animation-ui-production.spec.ts` | RESIDUAL | P3 | `PARTIAL` | +| MOD-CLIP-01 | The Clip editor has no e2e case; only the editor workflow fixture names it. | Clip editing is unverified end to end. | `web/tests/e2e/ui-editor-workflow-production.spec.ts` | RESIDUAL | P3 | `OPEN` | +| MOD-INFO-01 | The Info editor has no dedicated case; operator reports are read through other surfaces. | Info report rows are unverified. | `web/tests/e2e` inventory | RESIDUAL | P3 | `OPEN` | + +## Sources reused + +- `web/protocol/editor-workflow.ts` — `EDITOR_TYPES`, action prefixes and workflow IR. +- `web/tests/e2e` — 413 specs, of which 174 are `*production*` cases. +- `tools/web/run-outliner-headed.mjs`, `run-viewport-navigation-headed.mjs`, + `run-armature-robot-headed.mjs`, `run-mesh-decimate-headed.mjs` — headed `KNOWN_CASES` tables. +- `tests/golden/WBV2/dynamic-inventory.json` — production inventory and coverage ledger. +- `docs/web/KNOWN_LIMITATIONS.md` — the canonical limitation and residual-gap text. diff --git a/web/tests/unit/module-coverage-inventory.test.mjs b/web/tests/unit/module-coverage-inventory.test.mjs new file mode 100644 index 000000000..570825622 --- /dev/null +++ b/web/tests/unit/module-coverage-inventory.test.mjs @@ -0,0 +1,76 @@ +import assert from "node:assert/strict"; +import fs from "node:fs"; +import path from "node:path"; +import test from "node:test"; + +const root = path.resolve(import.meta.dirname, "../../.."); +const doc = fs.readFileSync(path.join(root, "docs/web/MODULE-COVERAGE.md"), "utf8"); +const workflowSource = fs.readFileSync(path.join(root, "web/protocol/editor-workflow.ts"), "utf8"); + +/* The editor list is a literal string array; reading the declaration keeps this + * test free of the protocol module graph it imports. A format change fails the + * match below instead of silently comparing against nothing. */ +function editorTypes() { + const match = workflowSource.match(/export const EDITOR_TYPES = (\[[^\]]*\]) as const;/); + assert.ok(match, "EDITOR_TYPES declaration not found in editor-workflow.ts"); + return JSON.parse(match[1]); +} + +function section(title) { + const start = doc.indexOf(`## ${title}`); + assert.ok(start >= 0, `missing section: ${title}`); + const rest = doc.slice(start + title.length + 3); + const end = rest.indexOf("\n## "); + return end >= 0 ? rest.slice(0, end) : rest; +} + +function cells(line) { + return line.split("|").slice(1, -1).map((cell) => cell.trim()); +} + +const editors = editorTypes(); +const matrixRows = section("Editor matrix") + .split("\n") + .filter((line) => line.startsWith("| `")) + .map((line) => cells(line)); +const registerRows = section("Gap register") + .split("\n") + .filter((line) => line.startsWith("| MOD-")) + .map((line) => cells(line)); + +test("the module matrix has exactly one row per editor type", () => { + const matrixEditors = matrixRows.map(([editor]) => editor.replaceAll("`", "")); + assert.equal(matrixEditors.length, editors.length); + assert.deepEqual([...matrixEditors].sort(), [...editors].sort()); + for (const editor of editors) { + assert.equal(matrixEditors.filter((item) => item === editor).length, 1, `${editor} must appear once`); + } +}); + +test("every matrix row carries a known coverage level", () => { + const levels = new Set(["PROVEN", "READBACK_OR_PROBE", "GATE_ONLY", "INDIRECT", "UNCOVERED"]); + for (const [editor, , , , level] of matrixRows) { + const name = level.split(" ")[0].replaceAll("`", ""); + assert.ok(levels.has(name), `${editor} has an unknown level: ${level}`); + } +}); + +test("gap ids are unique and every referenced id is registered", () => { + const ids = registerRows.map(([id]) => id); + assert.equal(new Set(ids).size, ids.length, "gap ids must be unique"); + const registered = new Set(ids); + for (const [editor, , , , , gaps] of matrixRows) { + for (const match of gaps.matchAll(/MOD-[A-Z0-9_]+-\d{2}/g)) { + assert.ok(registered.has(match[0]), `${editor} references unregistered ${match[0]}`); + } + } + for (const id of ids) assert.match(id, /^MOD-[A-Z0-9_]+-\d{2}$/); +}); + +test("every registered gap carries a known state and priority", () => { + const states = new Set(["OPEN", "PARTIAL", "BLOCKED", "FROZEN"]); + for (const [id, , , , , priority, state] of registerRows) { + assert.ok(states.has(state.replaceAll("`", "")), `${id} has an unknown state: ${state}`); + assert.match(priority, /^P[1-3]$/); + } +});