Files
FreeCADWasmDev/docs/current/web-commanddoc-833151cee540ba6d377cfc4b-checkpoint.md

5.7 KiB

CommandDoc continuation checkpoint

Batch 833151cee540ba6d377cfc4b, 2026-09-16. Selected: Web:desktop:Std_Edit, Web:desktop:Std_Expressions, Web:desktop:Std_Placement, Web:desktop:Std_Print.

Implementation in this turn

  • Added native Placement read/apply/cancel to WebViewCommands.h, using App.Placement, native rotation/composition, document transactions and recompute. Absolute mode places the first object and applies its delta to the remaining selection; incremental mode composes a delta with each object. Rejects missing/foreign/nongeometric/frozen objects, subelements, active tasks, invalid mode, nonfinite inputs and a zero rotation axis.
  • Added Placement result validation in web-commanddoc-contract.ts and mounted translation/axis/angle, absolute/incremental, read/apply/cancel controls in web-commanddoc-task.tsx. Existing adapter routes and scene refresh are reused; shared dispatcher and shell were not changed.
  • Added executable browser/native Placement cases to tools/web-business-cases.mjs: group transforms, native OCCT volume/bounds/validity, document isolation, undo/redo, mounted controls, cancel and invalid-input preservation. No covers declaration was added and no passing status was manually edited.

Verification state

  • web/node_modules/.bin/tsc --noEmit -p web/tsconfig.json: passed.
  • npm --prefix web run check:geometry-boundary: passed static boundary check; this is not proof of all native algorithm ownership.
  • git diff --check -- <four changed implementation/case paths>: passed.
  • Incremental PartBox and DocumentProbe WASM build completed successfully using python3 tools/web_build_lock.py -- cmake --build freecad-source/build-web/configure --target FreeCADWebPartBoxProbe FreeCADWebDocumentProbe -j8.
  • Browser build completed (FREECAD_WEB_FAST_LINK=1 web/node_modules/.bin/vite build web --config web/vite.config.ts, 152 seconds). Initial asset and preview sync completed (9 preview artifacts verified, 4 copied).
  • First Placement acceptance run failed in 4.272 seconds because Python PrimitivePy does not expose isFreezed(). Evidence: business-evidence/f7bdbd1da32d4d0f469b5be3-20260916T123930221889.json. Fixed by moving the guard to NativeDocumentView.h at the actual document-view entry point, using native DocumentObject::isFreezed(). Added freeze rejection and unchanged native state assertions. The second affected native build and asset sync completed. Preview sync verified 9 artifacts and copied 4.
  • node --check tools/web-business-cases.mjs: passed.
  • Final isolated runner command: python3 tools/run_business_acceptance.py --module Web --ids Web:desktop:Std_Placement --reuse. Result: passed, executedCount 1, reused false, 9.474 seconds. Evidence: business-evidence/f7bdbd1da32d4d0f469b5be3-20260916T124407882334.json. This proves the explicit absolute/incremental two-object workflow and its semantic assertions, not the advanced Placement boundaries below. Do not rerun this unchanged passing workflow merely to refresh evidence.

Preserved first error and remaining boundaries

The isolated existing Edit case was executed through the acceptance runner: python3 tools/run_business_acceptance.py --module Web --ids Web:desktop:Std_Edit --reuse. It failed in 4.124 seconds. Evidence: business-evidence/6097a992e376ebeaa624bd90-20260916T123159862828.json. Native error is No module named 'FreeCADGui'. The existing handler imports FreeCADGui and calls getInEdit/setEdit/resetEdit. Preserve the failed assertion that the selected native ViewProvider enters edit mode. No fake GUI module, metadata edit state or passing status was substituted. A functional browser edit provider with native property mutation, commit/cancel and provider-specific dispatch remains required. Do not replay this unchanged failure.

Expressions: desktop source CommandDoc.cpp:1982 defines copy selected, copy active document, copy all documents and paste. Source :2050 serializes native PropertyExpressionContainer expressions with ##@@ <path> <doc>#<object>.<property> (<label>) headers, comments with native escaping, and persistent expression text. Paste resolves native documents/objects/containers, parses expressions and object identifiers, and preserves comments. The rest of paste transaction/error logic after line 2150 is still unread. Existing commanddoc response validator has no Expressions success branch; native selected path lacks an Expressions handler. Do not replace this clipboard workflow with a generic property-expression editor.

Print: desktop source CommandDoc.cpp:971 delegates to the active MDI view's print() and is enabled when that view supports Print. Requires a browser active view print host and actual printable content, cancellation and native document preservation assertions. Generic command result metadata is insufficient.

Placement scope still needs comparison with local TaskPlacement implementation beyond the inspected activation source CommandDoc.cpp:1745. Rotation center, live preview, hierarchy/link placement semantics and provider-specific constraints are not claimed complete by the new absolute/incremental subset. Preserve these requirements for continuation.

All original and supplemental requirements remain, including the unchanged IFC semantic export contract. No IFC work was rerun or replaced by proxy geometry. No contract, verifier, proof requirements or acceptance machinery was changed. No full-parity/API gates, deployment, push or external message was performed. The command launcher ignored workdir for relative frontend commands; explicit web/ executable/config paths and npm --prefix web avoid that issue. Initial unscoped Git/search commands were rejected and were not CAD business failures.