Files
FreeCADWasmDev/docs/current/web-commandmacro-remaining-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.0 KiB

Macro Transport Boundary

Batch: ba4cad68ea8ed95624783d80

Selected commands: Std_DlgMacroExecute, Std_DlgMacroExecuteDirect, Std_DlgMacroRecord, and Std_MacroAttachDebugger.

The inspected source maps all four commands to part.pythonFamilyBatch in web/src/web-desktop-adapter.ts. The shared dispatcher invokes executeWebDesktop before its generated route-index lookup (web/src/desktop-command-dispatcher.ts:123). The packet's PartBoxProbe.cpp:4180 excerpt dispatches this family to executeWebMacroCommand and propagates the native result.

The macro branch in web-desktop-adapter.ts:390 supplies the Part family schema, stateful tier, native macro family, document identifier and stored files. part-python-family-facade.ts passes this envelope to fc_web_dispatch_json. part.worker.ts sends this family to its existing FreeCADWebPartBoxProbe instance, which owns the live document. The mounted macro controls supply operations, source, filenames and debugger address.

Implemented the missing multi-document result delivery: native execution returns document names before and after execution, including when the macro raises an exception. The adapter notifies the existing host of closed documents and refreshes surviving documents through the existing scene facade, delivering the active document last.

The missing transport declaration was in local_route in tools/generate_feature_capability_registry.py: it did not resolve the Web macro family to the Part execution owner. The adapter now consumes web/src/web-macro-routes.json for its endpoint, and the generator uses the same table with the existing facade, worker, mounted host and native handler connections to emit the Part family route while preserving the Web canonical command identity.

Implementation status: implementation_ready, pending user use. Incremental compilation, linking, resource synchronization and route generation remain with the outer pipeline. No generated route receipt is asserted by this source change.