Files
FreeCADWasmDev/docs/current/document-actions-20260915.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

34 lines
2.5 KiB
Markdown

# Native document actions
## Implemented
- `Std_SaveAs` and `Std_SaveCopy` use the existing PartBox document-view envelope and native `saveAs`/`saveCopy` rather than sending a view schema to a Python-family worker. Their FCStd bytes are persisted to OPFS. Save Copy preserves the open native document identity and refuses the same OPFS filename, including path aliases.
- `Std_SelectAll` reuses the existing native document-object selection and propagates it to the mounted workbench.
- `Std_Undo` reuses the native transaction stack. Surviving selected objects now return complete identities including labels, as required by the facade. Scene refresh remains separate from the committed undo.
- `Std_ToggleFreeze` calls `DocumentObject::freeze/unfreeze` directly on selected native objects, with per-document transactions and returned frozen states.
- `Std_ToggleSkipRecompute` reads and sets `Document::SkipRecompute` through a real checkbox state. Read requests do not change the flag. Updating this flag does not clear the current selection.
The mounted document task now provides command-specific filename, save, selection, undo and freeze controls instead of the unrelated generic selection-preview panel. Prefixed command IDs are normalized at the task boundary.
## Reused Sources
`freecad-source/src/Gui/CommandDoc.cpp`, `CommandFeat.cpp`, `WebViewCommands.h`, `NativeDocumentView.h`, the existing PartBox/DocumentProbe targets, document-view facade and OPFS storage are reused. No alternate geometry algorithms, fixture output or new WASM module were added.
## Build and Delivery
PartBox and DocumentProbe were incrementally compiled/linked once for the combined native changes. Frontend build succeeded in 4.12 seconds. The formal six-command pipeline is `implementation_ready`:
| Pipeline step | Seconds |
| --- | ---: |
| Module registry | 0.104 |
| Capability registry | 0.088 |
| Link preflight | 0.042 |
| Build handoff after compilation | 0.199 |
| Artifact sync | 4.423 |
| Completion bookkeeping | 1.063 |
| Pipeline total | 5.919 |
The 0.199-second build handoff is not the preceding native compilation duration. Receipt: `document-actions-pipeline-20260915.json`. No automatic business, regression or browser tests were run.
After this batch, the registry has 1411/1452 routed entries and 41 pending. This is implementation registration, not project-wide acceptance. Unimplemented links, GUI hosting and remaining BIM dependencies are still pending; do not close them by adding names to a route table.