Files
FreeCADWasmDev/docs/current/web-link-c6b8621f93e92e60c66fa282-boundary.md
wangdequan 9a7c4f0335 Save FreeCAD Web workspace sources and user validation evidence
IFC native binding remains incomplete; preserve accurate test results.
2026-09-15 22:01:58 +08:00

2.3 KiB

Web link command implementation boundary

Batch: c6b8621f93e92e60c66fa282

Implementation remains incomplete for Std_LinkMakeRelative, Std_LinkReplace, Std_LinkSelectActions, Std_LinkSelectAllLinks, Std_LinkSelectLinked, Std_LinkSelectLinkedFinal, and Std_LinkUnlink.

Observed source facts:

  • web/src/web-link-contract.ts:1 includes all seven commands. Its result contract requires command/document identity, a changed flag, and selection identities, optionally including subelements and changed documents.
  • freecad-source/src/WebAssembly/FreeCADCoreProbe/NativeDocumentView.h:22 declares the native document-view allowlist. It includes other link commands but excludes these seven; the request guard rejects excluded commands.
  • freecad-source/src/WebAssembly/FreeCADCoreProbe/NativeDocumentView.h:140 constructs a Web:desktop: record and dispatches ordinary document commands through executeDocumentCommand under the Python GIL. Its response must contain one matching successful record before the result is returned.

Remaining work requires inspecting the actual executeDocumentCommand implementation and the desktop source before changing the allowlist or catalogs. The handler implementation has not been inspected in this turn; its behavior must not be inferred from the Web contract or from the allowlist omission.

Desktop source anchors in freecad-source/src/Gui/CommandLink.cpp:

  • Make relative: 368.
  • Replace and unlink: 625 and 651.
  • Select linked and final linked: 893 and 950.
  • Select all links and selection actions: 991 and 1012.

Resume with packet-provided windows for those desktop implementations, the executeDocumentCommand owner in DocumentProbe.cpp, the selected entries in web/src/document-view-routes.json, and the actual catalog ownership in tools/generate_feature_capability_registry.py. Establish executable native behavior before enabling registration. Follow the mounted Web adapter and selection callback through the existing document-view route.

All four supplemental source windows were consumed by the packet summary, the Web link contract, and NativeDocumentView.h lines 1-200. This is a source inspection boundary, not evidence that native business source is absent. No native registration or runtime behavior was changed. No tests, builds, browser checks, benchmarks, or acceptance work were performed.