Files
FreeCADWasmDev/docs/current/web-commanddoc-a24f6e589f24f72fc4fb40c4-checkpoint.md

5.0 KiB

Web command document batch checkpoint

Date: 2026-09-16. Batch: a24f6e589f24f72fc4fb40c4.

Completed This Turn

Web:desktop:Std_SaveAll passed the official acceptance runner with 10 executable browser/native assertions.

Evidence: docs/current/business-evidence/980163f63b5433ff72d8d931-20260916T145342813759.json.

Runner: python3 tools/run_business_acceptance.py --module Web --ids Web:desktop:Std_SaveAll --reuse. Result: passed=1, remaining=[], executedCount=1, reused=false, process exit 0, totalSeconds=8.919.

Changes:

  • web/src/web-commanddoc-task.tsx: mounted Save All task button and successful persisted document count through the existing workbench task mount.
  • web/src/web-commanddoc-contract.ts: typed native saved file list for the task response.
  • web/src/web-desktop-adapter.ts: checks the complete returned Save All file list for basename/sanitized-name collisions before any OPFS write. Reports an explicit persistence error and retains existing OPFS files.
  • tools/web-business-cases.mjs: registered Save All and implemented its mounted browser workflow, with enabled Execute waiting for fixture commands.

Assertions cover cancellation during the second filename prompt before saving either document; identical native path rejection; exact FCStd native bytes persisted for both documents; repeated saves without new prompts; incorrect runtime owner rejection; OPFS basename collision rejection; recovery using distinct filenames; reopening each OPFS file with independent metadata and valid OCCT geometry; editable expression dependencies in the reopened document with unchanged originals.

The collision guard executes after native serialization. A collision can therefore change native file identity, but does not write any of the colliding bytes to OPFS. The error states this explicitly. Atomic multi-file OPFS commits and storage quota fault recovery are not certified by this case. Sanitized-name collisions are guarded in code; the executable collision fixture specifically uses identical basenames in different directories.

Verification

  • npm --prefix web run check:geometry-boundary: passed, no findings; static boundary check only.
  • node web/node_modules/typescript/bin/tsc --noEmit -p web/tsconfig.json: passed.
  • node web/node_modules/vite/bin/vite.js build web: passed, public assets synchronized incrementally; existing bundle size/dynamic import warnings.
  • Existing supplied WASM reused. No native rebuild, full-parity/API gate, deployment, push, external message, contract/verifier/proof-area edit, or manual acceptance status edit.

Tool environment note: the exec workdir argument did not place npm in web; use explicit --prefix web or repo-relative executable/root arguments as above. Initial unprefixed geometry check attempts found no script. npm exec vite build attempted package resolution and was interrupted; the successful build uses the existing local Vite 8.2.1 executable.

Remaining Selected Work

  • Web:desktop:Std_ProjectUtil: routed through executeOwnerCommandDoc in web/src/web-desktop-adapter.ts and mounted WebCommandDocOwnerTask in web/src/workbench-shell.tsx. Native implementation starts at WebViewCommands.h:490, imports freecad.project_utility, and is registered at lines 1725 and 2035. No executable case was added or run this turn. The imported web-commanddoc-owner-adapter.ts and web-commanddoc-owner-task.tsx are outside the current packet's allowed source list; this is a packet access boundary, not evidence that their implementation is absent. Expand the next packet to include those concrete integration files and the supplied native project utility source before changing them.
  • Web:desktop:Std_Transform and Web:desktop:Std_TransformManip: routed into the Part owner through executeWebDesktopCommand; unlike Save All they currently choose part.pythonFamilyBatch, not part.viewCommand, in the adapter's documentViewCommand branch around line 505. Both appear in native commanddoc_names at WebViewCommands.h:433, but the scoped name search found no dedicated handlers. Trace the generic handler before deciding what is missing. Neither has a dedicated task branch in the inspected web-commanddoc-task.tsx, nor an executable case in tools/web-business-cases.mjs.
  • Desktop source anchors read: CommandDoc.cpp:1714 opens TaskTransform and disallows another active task; CommandDoc.cpp:1799 enters the selected object's Transform edit mode. Read the remaining activation checks and supplied TaskTransform/view-provider implementation in the next packet before implementing manipulation semantics.

Next action: preserve the passing Save All proof with --reuse; implement and prove the remaining selected commands using existing native ownership and OCCT geometry. Do not replay the prior unrelated Quit failure. Add only semantic assertions that actually execute. Continue to preserve every original and supplemental requirement, including the unchanged IFC semantic export contract; proxy geometry remains insufficient.