12 KiB
Primary cross-workbench integration
Continuation checkpoint — 2026-09-18 04:09 UTC
Batch 87d3691ca57ddbf994740d84; whole selected capability remains incomplete.
All original and supplemental requirements and historical evidence remain in
force, including the unchanged IFC semantic export contract.
Fixed the actual embedded primary task request boundary in
web/src/project-shell.tsx (embedded workspace request callback near line 673).
It now rejects supplied foreign-document or malformed selections before calling
the current native document owner. The embedded path bypasses the standalone
desktop adapter, so the previous adapter-only guard did not cover this entry.
Added runPrimarySelectionIsolation in
tools/web-cross-workbench-business-cases.mjs. It opens the production primary
page, creates a Body and Sketch using visible controls in each of two documents,
asserts same native sketch names with different native document identities, then
injects foreign selections in both directions through the mounted task's real
request callback. It asserts each rejection, zero worker requests during each
rejected operation, identical complete native snapshots before/after, and
unchanged native undo and redo counters in BOTH documents. Native snapshots use
the existing WASM owner; no fake router is used by this new browser case.
Fault injection locates the mounted callback through React fiber; it is not a
mouse selection scenario and adds no product test API. It is also not independent
native-process integration proof.
Actual verification:
web/node_modules/.bin/vite build websucceeded in 4.96 s, including 3.538 s incremental public-asset sync. Reused existing WASM; no native rebuild. This does not establish a passing TypeScript check; the prior out-of-packet Sketcher persistence type mismatch remains unverified/unresolved here.FREECAD_CROSS_WORKBENCH_FOCUS=selection-isolation python3 tools/run_business_acceptance.py --module Web --ids product:cross-workbench-document-editing --reusecompleted in 4.36 s. Both adapter-boundary and new mounted-primary isolation cases passed. Whole result remainsnot_implemented/acceptance_incomplete, zero whole IDs passed. The new optional focus stops after isolation and never claims the skipped workflow cases passed; default execution retains them.- Formal evidence:
business-evidence/49541ff602063d0030bc9fd7-20260918T040823609911.json. Native snapshots/rejections/timing artifacts:web-cross-workbench-business/2026-09-18T04-08-20-088Z/. - No contracts, verifier, proof-area requirements, coverage tags or acceptance machinery were changed. No unchanged Pad/save/reopen scenarios were rerun.
Next concrete repair: implement native preview begin/update/accept/reject in
the existing PartDesign owner, then wire task accept/cancel and verify geometry
and transaction history with one focused affected-target rebuild. Read bounded
anchors in freecad-source/src/WebAssembly/FreeCADCoreProbe/PartDesignDocumentWorkflow.cpp
and web/src/partdesign-workspace-component.tsx (request/perform near 184–215,
draft cancel control near 291). Current per-operation transactions commit before
returning. Other outstanding boundaries remain: populated Part owner handoff
with preserved identity/history; independent native integration proof; primary
editing/property/tree requirements retained below. Source-reader byte budget was
reached this turn; do not bypass it or reinterpret that as absent source.
Continuation checkpoint — 2026-09-18 03:46 UTC
Batch 87d3691ca57ddbf994740d84, selected capability
product:cross-workbench-document-editing remains incomplete. Preserve all
historical evidence below and all original/supplemental requirements, including
the unchanged IFC semantic export contract.
Implemented a common selection validation boundary in
web/src/partdesign-desktop-adapter.ts. Recognized commands now reject foreign
document selections, malformed selection containers/entries, and invalid native
object names before native dispatch. Previously the adapter checked selections
only in individual branches, leaving Body, NewSketch, EditSketch and Pad without
a common guard. Existing primary-shell document override validation was already
present and was preserved.
Added executable regression checks to the existing cross-workbench business case:
four commands × three invalid selections, each requiring invalid_request and
zero calls to the native router. This uses the actual adapter bundled by the
installed Vite; the dispatch sentinel is a test double. It is adapter boundary
proof, NOT independent native integration or browser-injected foreign-selection
proof. No coverage tags, proof requirements, verifier, contract or ledger were
changed.
Actual verification:
npm --prefix web run build: geometry boundary audit passed; sync completed; TypeScript failed atsrc/sketcher-persistence-slice.ts(6,1111)becauseshapeMaterialRestoreis absent fromSketcherPersistenceResult. This file is outside the current packet; do not claim the full build or typecheck passed.web/node_modules/.bin/vite build web: production bundle succeeded in 7.96 s, reusing supplied WASM. No native rebuild.- First acceptance attempt failed on a missing esbuild import in the new case. Replaced it with the already installed Vite library bundler and reran through the official runner after the test repair.
python3 tools/run_business_acceptance.py --module Web --ids product:cross-workbench-document-editing --reuse: completed in 9.231 s,acceptance_incomplete, zero whole IDs passed. Evidence:business-evidence/49541ff602063d0030bc9fd7-20260918T034648808422.json. Artifacts:web-cross-workbench-business/2026-09-18T03-46-40-413Z/. New boundary artifact records all 12 rejections and zero native dispatches. Existing four browser assertion groups completed, including real Pad volumes 480/560/600, executable undo/redo and FCStd reload/reopen (8320 bytes).
Remaining boundaries: populated Part owner handoff with identity/history; native preview accept/reject transactions; foreign-selection injection through the primary browser command path with both native documents/history checked; independent native integration proof; other primary editing/property/tree work listed below. Adapter rejection alone does not close these requirements.
Next concrete repair: add the primary-browser foreign-selection injection case and verify unchanged native snapshots/undo counts for both documents, using the existing request correlation and owners. Then implement preview begin/update/ accept/reject in the existing native owner (current per-operation transactions commit before returning), with one focused affected-target rebuild. Resolve the Sketcher persistence type mismatch when its source is included in the packet. Source reader exhausted the 48000-byte budget during this turn; subsequent anchor requests were rejected. Continue with fresh bounded anchors, without bypassing the reader or replaying unchanged successful scenarios for timestamps.
Continuation completed 2026-09-18 02:44 UTC. This supersedes the historical missing-Workbench-selector failure. Whole requirement remains incomplete.
Implemented using existing work
- Primary Workbench selector mounts the existing PartDesign workspace's extracted sketch/feature controls in the primary task area. Standalone entry and native actions are preserved. The embedded component takes the primary document, snapshot, selection, busy state and shared renderer/router; it does not own a second project or dispose the primary renderer/router.
- New project documents that select Sketcher/PartDesign use the existing PartDesign native document owner for both workbenches. Native snapshots update the primary project store, model tree, history and viewport. Returning to Part view does not switch the native owner or discard edits.
- Primary undo/redo, remove, snapshot, FCStd save/open and close route to the
document's actual native owner. PartDesign OPFS files use the
PartDesign_filename prefix so a page reload can choose the existing correct runtime. Actual FCStd bytes remain the data source; metadata is not a substitute. - A populated Part-owned document cannot yet be migrated with preserved history. Switching it to Sketcher/PartDesign is explicitly rejected without a native mutation. Unsupported Part actions in a design-owned document are rejected; direct Part primitive controls and unsupported native label editing are disabled. Do not pretend that this boundary is complete migration.
- Added the extracted
partdesign-workspace-component.tsxto the source packet's reusable dependencies. Prior scope-denial checkpoints for this file are stale.
Actual focused result
python3 tools/run_business_acceptance.py --module Web --ids product:cross-workbench-document-editing --reuse
completed four assertion groups in 8.535 s. Formal evidence:
business-evidence/49541ff602063d0030bc9fd7-20260918T023634851125.json.
Artifacts: web-cross-workbench-business/2026-09-18T02-36-27-049Z/.
Overall result is not_implemented / acceptance_incomplete, zero whole IDs passed.
- Primary entry creates Body, fully constrained 12×8 Sketch and linked Pad length 5, volume 480. All modeling requests share one project identity/native name/ Worker. Body Tip and Pad Profile refer to actual native objects.
- Editing width to 14 recomputes volume 560. Native undo/redo restore 480/560. Cancel restores the local committed draft without a native request; invalid width is rejected and subsequent native undo/redo still executes correctly.
- A second Part document creates an independent volume-1000 Box. Unsupported owner handoff issues no native request; returning to the design document preserves its selected sketch and width 14.
- Primary OPFS save yields real ZIP/FCStd bytes. Page reload/reopen restores the document in PartDesign; editing width to 15 yields volume 600 and retains the profile dependency. Desktop/mobile canvas screenshots show real geometry and the page has no horizontal overflow.
The tab assertion now compares its stable data-document-id, not revision/dirty
text, which legitimately changes after editing. The previous unconditional final
failure is replaced by explicit remaining boundaries while retaining incomplete
status. No required proof areas or passing ledger were edited.
TypeScript and geometry audit passed. Final production Vite build passed in 1.42 s using existing assets; no native rebuild was needed. A first candidate run was correctly rejected when a layout edit changed its inputs during execution; only the later stable run above is used as attributable evidence.
The extracted component's standalone PartDesign entry was also checked through
its actual controls: 3×4 Sketch and Pad length 2 yield volume 24, no page errors.
Record: migration-review-20260918/partdesign-standalone-reuse.json.
Remaining work / active coordination
- Preserve native identity and undo history while transferring an already populated Part document into the feature owner; do not silently clone it.
- Full native preview accept/reject task lifecycle, direct foreign-selection rejection and independent native integration proof remain outstanding.
- Broader primary Part editing/import, native label/color persistence and tree hierarchy for design-owned documents need their respective integration.
- Background cycle 9457 has resumed Web work and is fixing existing Part-request document override validation. Preserve that concurrent change; do not repeat the old missing-selector test or overwrite the shared primary shell.
Service thawed after isolated frontend build/acceptance. Original IFC, other module cases and historical evidence were not replayed. Continue from these actual behaviors and the current source, not the earlier selector checkpoint.