Add desktop GUI manifest, parity matrix and Web baseline audit

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
2026-11-13 14:08:35 +08:00
parent 579d6d20c8
commit aff9b6464a
9 changed files with 48403 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
# Web FreeCAD 桌面功能与 GUI 对标 · 接续点
更新:2026-11-13
计划:`/home/mes123456/.claude/plans/partitioned-puzzling-haven.md`
## 目标
统一 React 桌面式单壳;32 模块功能/GUI 对标;OPFS 文件;three.js 图形;
逐 workbench 截图 + 1492 命令矩阵 + 324 官方案例验收。
## 已完成(P0)
- **桌面参照可运行**:找到 `freecad-source/build/native-release/bin/FreeCAD`(GUI)
与 `FreeCADCmd`(控制台)。补齐缺失 GUI 模块(PartGui/SketcherGui/PartDesignGui/
TechDrawGui/FemGui/MeshGui/StartGui 等 18 个 `.so`)。
- 修复桌面源码编译缺口:
- `src/Gui/CommandStd.cpp` 增加 `NetworkRetriever.h` 引用;
- `src/Gui/NetworkRetriever.h/.cpp` 补 `StdCmdDownloadOnlineHelp::updateAction/className`;
- `src/Mod/Mesh/Gui/RemeshGmsh.cpp` `countFacets()` → `CountFacets()`。
- Xvfb `:2` 截图:`web/docs/current/desktop-parity-evidence/Part-desktop.png`。
- **桌面 GUI 清单**:`tools/parity/extract-desktop-gui.mjs`
- 输出 `web/public/api/desktop-gui-manifest.json`:29 个 GUI workbench(Plot/Show/Web
无桌面 workbench)、1492 命令记录、309 菜单命令、237 工具栏命令、746 条命令元数据。
- 输出 `web/docs/current/desktop-parity-matrix.json` 与
`web/public/api/gui-command-gap-report.json`:
implemented 3 / native-ui-check 196 / gui-route-missing 425 / gui-missing 865 / boundary 3。
- **Web 基线审计**:`tools/parity/audit-web-gui.mjs --workbench Part`
- 输出 `Part-web.png` 与 `Part-web-audit.json`;0 错误/0 溢出;
缺失菜单仅 `Part_ColorPerFace`(解析器伪菜单,后续修正)。
## 真实残余
- 统一桌面壳尚未实现:project-shell 仍只支持 9 个 workbench、菜单仅 Start/File/Edit/View/Part;
`workbench.html`/`partdesign.html` 仍是独立壳。
- `gui-route-missing` 425、`gui-missing` 865 尚未逐条分配 React owner。
- 桌面清单解析仍有伪菜单(Part_ColorPerFace、空 submenu),需过滤与层次修正。
- 桌面 GUI 启动有 `--no-sandbox` 警告横幅(来自环境变量),截图时需裁掉或清理环境。
- 桌面源码改动(3 文件)与 Web 工具/清单尚未提交。
## 下一步精确入口
1. 清理并提交:`tools/parity/extract-desktop-gui.mjs`、`audit-web-gui.mjs`、
`web/public/api/{desktop-gui-manifest,gui-command-gap-report}.json`、
`web/docs/current/desktop-parity-*`;桌面 3 个源码修复单独提交。
2. P1:新建 `web/src/shell/{app-shell,menu-bar,toolbar,dock-layout,task-view,
command-registry,workbench-registry}.tsx`,先挂 Part 一个 workbench 到统一壳;
旧页面重定向。
3. 修正解析器:去掉空/伪菜单,保留菜单层级;补 Python InitGui 的菜单/工具栏。
4. 每完成一个 workbench:`audit-web-gui.mjs --workbench <id>` 截图 + 差异 JSON。
## 关键路径
- 桌面 GUI:`freecad-source/build/native-release/bin/FreeCAD`
- 桌面源码:`freecad-source/src/Gui`、`freecad-source/src/Mod/*/Gui`
- Web 壳:`web/src/project-shell.tsx`、`web/src/workbench-shell.tsx`
- 清单/审计:`tools/parity/`、`web/public/api/desktop-gui-manifest.json`
- 证据:`web/docs/current/desktop-parity-evidence/`

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

View File

@@ -0,0 +1,58 @@
{
"schema": "freecad-web-desktop-parity/web-gui-audit/v1",
"generatedAt": "2026-11-13T06:07:50.666Z",
"workbench": "Part",
"url": "http://127.0.0.1:5181/project.html?workbench=Part",
"desktop": {
"menus": [
"Primitives",
"Copy",
"Boolean",
"Join",
"Split",
"Compound",
"Part",
"Part_ColorPerFace"
],
"toolbars": [
"Solids",
"Part Tools",
"Boolean Tools"
],
"menuCommandCount": 67
},
"web": {
"menus": [
"File",
"Edit",
"View",
"Part",
"Primitives",
"Copy",
"Boolean",
"Join",
"Split",
"Compound"
],
"toolbarButtons": 96,
"docks": [
"Model tree",
"New group",
"Object Properties",
"Tasks"
],
"hasTree": true,
"hasProperties": true,
"hasTask": false,
"status": "Project session ready",
"workbenchValue": "Part",
"overflow": 0
},
"missingMenus": [
"Part_ColorPerFace"
],
"status": 200,
"errors": [],
"failed": [],
"ok": true
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff