Files
FreeCADWasmDev/docs/current/cross-workbench-document-editing-checkpoint-20260918.md

6.6 KiB
Raw Blame History

Cross-workbench document editing continuation

Selected packet: 87d3691ca57ddbf994740d84; capability: product:cross-workbench-document-editing; workflow: product-document-files.

Changes in this turn

  • web/src/project-shell.tsx: applyNativeDocument now retains native object fields in session properties, excluding mesh buffers. Previously the fixed Part property projection discarded incoming Body/Tip/profile/constraint metadata. This is a source change, not a verified cross-workbench integration. The shell still uses the Part document owner and has no mounted Sketcher/PartDesign switch.
  • tools/web-cross-workbench-business-cases.mjs: executable primary-browser scenario captures actual worker responses and requires constrained Sketcher geometry, Body Tip and Pad profile links, volume 480 for a 12 × 8 × 5 Pad, and nonempty tessellation. The scenario has not reached those assertions. It currently fails at the missing Workbench selector. Its later controls are proposed accessible names to reconcile with the actual reusable workspace, not inspected existing controls. It deliberately remains incomplete after the first scenario until the remaining proof is implemented. No covers tags were added.
  • tools/web-acceptance-cases.mjs: imports and dispatches the new selected case and excludes its ID from legacy dispatch. No acceptance contracts, verifier, proof requirements, or runner were changed.

Verification and evidence

  • node --check tools/web-cross-workbench-business-cases.mjs: exit 0.
  • node --check tools/web-acceptance-cases.mjs: exit 0.
  • python3 tools/run_business_acceptance.py --module Web --ids product:cross-workbench-document-editing: exit 1, acceptance incomplete, 0 passed, 1 executed, 2.304 seconds.
  • Runner-created evidence: docs/current/business-evidence/49541ff602063d0030bc9fd7-20260917T224121011857.json.
  • Case artifacts: docs/current/web-cross-workbench-business/2026-09-17T22-41-19-430Z/.
  • First assertion: primary UI has zero comboboxes named Workbench; expected one. No native commands were run by this failed scenario. This run used existing web/dist; the source property-preservation change was not built or browser-validated.
  • Missing immutable proof areas reported by runner: active_document_identity, cross_workbench_history, fcstd_opfs_roundtrip, live_sketch_feature_recompute, rejection_isolation.

Source access boundary

The packet's web/src/partdesign-workspace.tsx is now only five lines, importing PartDesignWorkspace from ./partdesign-workspace-component.js and mounting it. Reading the exact underlying source web/src/partdesign-workspace-component.tsx through read_implementation_source.py was rejected: Use an exact packet dependency or current-module source/case path; no directory scans. The component exists as an import target; do not interpret this rejection as absence of business source. It needs inclusion in the next source packet, along with the new case file, without changing acceptance requirements.

The source reader subsequently reached its 16-window / 48000-byte bound. A 60-line request for partdesign-document-facade.ts at line 80 succeeded; subsequent 60-line attempts for PartDesignDocumentWorkflow.cpp:1, partdesign-desktop-adapter.ts:1, and web-acceptance-cases.mjs:200 were rejected at that bound. No bypass reads were used. Do not repeat those unchanged failed reads in this turn.

Retained anchors for next work

  • Primary shell imports/state: project-shell.tsx:1; native request and snapshot application: approximately 125–175 (five lines added inside the object loop); FCStd handoff and save navigation: original 380–445; primary toolbar: original 451–490 (now shifted by five).
  • Existing primary native call: router.request("Part", PART_DOCUMENT_COMMAND, { schema: PART_DOCUMENT_SCHEMA, module: "Part", document: nativeName(id), action, includeMesh: true, ...details, displayProperties }, id).
  • applyNativeDocument(id, result, dirty) updates current project objects, links, render bridge, transactions and session revision. Reuse it; fix native ownership and Body/feature visibility deliberately when integrating design snapshots.
  • Existing editSliceInWorkbench saves a real FCStd to OPFS and navigates to /workbench.html with module, command, document and fcstd query parameters. This is a reference for persistence only; navigation to a standalone page does not satisfy the current primary UI workflow.
  • Design contract: command partdesign.document, schema freecad-web-partdesign/document/v1. Actions include create, createBody, setSketch, setFeature, snapshot, save/open/close, undo/redo. DesignResult supplies document, objects, undoCount, redoCount, bytes. DesignObject includes body, tip, profile, length, geometryCount, constraintCount, dof and fullyConstrained. Native sketch parameter spelling and component ownership/props have not been inspected; do not guess them.

Next steps and remaining requirements

  1. Include/read the extracted reusable PartDesign component and relevant existing native workflow anchors. Mount its real controls in the primary shell with the active native document, existing router/render bridge and OPFS session. Workbench changes must preserve document and selected-object identity, not create fixture documents or use iframe/diagnostic pages.
  2. Reconcile executable browser selectors with actual accessible UI. Extend the real scenarios for existing-document preservation and isolation, constraint edits with dependent Pad recompute, accept/cancel, failed-input isolation, undo/redo across workbench switches, and native FCStd OPFS save/reopen preserving editable semantics and geometry. Add the required independent native cases using the provided WASM owner. Do not replace the incomplete guard with passing status until all corresponding cases exist.
  3. Add proof-area tags only to completed semantic assertions. Preserve all original requirements and the five verifier areas above. Check dependency attribution for the new case/component using the existing authorized workflow; do not alter machinery or contract to obtain a pass.
  4. After batching related fixes, build/sync only affected targets and run the selected acceptance runner. Reuse unchanged prior passing evidence; do not rerun this unchanged failing case for timestamps.

IFC semantic export must continue to obey docs/current/IFC_SEMANTIC_EXPORT_CONTRACT.md; proxy geometry is insufficient. No IFC claim is made by this work. No full-parity/API gates, deployment, pushes or messages to others are authorized. Preserve historical evidence and original/supplemental requirements. Continue automatically from this checkpoint; the capability is not complete.