Add manifest-driven desktop shell preview

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
2026-11-13 14:28:46 +08:00
parent e493eafa04
commit 330221bd5d
9 changed files with 317 additions and 3 deletions

View File

@@ -28,6 +28,19 @@
- 输出 `Part-web.png` 与 `Part-web-audit.json`;0 错误/0 溢出;
缺失菜单仅 `Part_ColorPerFace`(解析器伪菜单,后续修正)。
## 已完成(P1 骨架)
- `web/src/shell/`:
- `command-registry.ts`:加载 `desktop-gui-manifest.json`,提供 workbench/命令元数据;
- `menu-bar.tsx`:File/Edit/View/Tools/Macro/Windows/Help + 工作台菜单,支持子菜单与命令;
- `toolbar.tsx`:按 manifest 渲染工作台工具栏;
- `shell-preview.tsx` + `shell-preview.html`:29 个 workbench 选择器、菜单/工具栏、
three.js 预览视口(网格/坐标轴/Box)、属性/树/状态栏。
- 页面检查:`http://127.0.0.1:5181/shell-preview.html` 29 个 workbench、3 个工具栏、
0 pageError、0 横向溢出;截图
`web/docs/current/desktop-parity-evidence/shell-preview.png`。
- 说明:预览页仅渲染清单与命令回调(记录 last command),尚未接入统一文档/执行路由。
## 真实残余
- 统一桌面壳尚未实现:project-shell 仍只支持 9 个 workbench、菜单仅 Start/File/Edit/View/Part;
@@ -42,9 +55,9 @@
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 到统一壳;
旧页面重定向。
2. 把 `shell-preview` 的菜单/工具栏挂入 `project-shell.tsx`,用 command registry
替换静态菜单;Part 先接通 `activatePartAction`,其余 workbench 接 `desktopCommands`/
`workbench-registry`;旧页面重定向。
3. 修正解析器:去掉空/伪菜单,保留菜单层级;补 Python InitGui 的菜单/工具栏。
4. 每完成一个 workbench:`audit-web-gui.mjs --workbench <id>` 截图 + 差异 JSON。

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB