推进 INI 面板 shell handoff mount DOM renderer

This commit is contained in:
2026-06-15 12:02:25 +08:00
parent 54f8551c50
commit 22ca6ced3f
10 changed files with 223 additions and 46 deletions

View File

@@ -2643,3 +2643,80 @@ host_wasm_opfs_browser_smokes=ok
继续推进 SDK/API surface。下一批建议把外部 shell mount DOM renderer 抽成可复用 helper
`renderIniPanelShellSessionHandoffMountState()` 或等价 API并用 Node/browser smoke 保护其
DOM contract仍保持只读不新增控制按钮不解析 G-code。
三十三、2026-06-15 继续执行记录INI panel shell handoff mount DOM renderer helper
本轮按“第一原则:加快实质性推进”继续推进 SDK/API surface 与 browser/UI workflow把外部
shell mount DOM renderer 从 browser smoke 内抽为可复用 helper让 launch 页面和 shell integration
workflow 共享同一只读 DOM contract。
完成内容:
- `ui-shell.js` 新增 `renderIniPanelShellSessionHandoffMountState()`
- `createIniPanelShellViewModel()` 暴露 `renderShellSessionHandoffMountState` helper
- `createIniPanelLaunchApiManifest().methods` 新增 `renderShellSessionHandoffMountState`
- `launch.html` 改为使用 `renderIniPanelShellSessionHandoffMountState()` 渲染默认 mount DOM
- `launch.html` 的 `window.linuxCncIniPanelLaunchApi.renderShellSessionHandoffMountState()`
新增真实 browser 入口,并支持外部 shell 传入自有 DOM nodes 与 row dataset prefix
- `ini_panel_shell_integration_workflow_smoke.html` 删除本地专用 renderer改用 launch API 暴露的
shared renderer 渲染 waiting/ready mount-state
- `ini_panel_shell_integration_workflow_smoke.html` 校验 shared renderer 返回值:
- `rendered === true`
- row count 为 5
- ready render result dataset `handoffReady === "true"`
- `verify_ini_panel_ui_shell.mjs` 用最小 DOM stub 覆盖 shared renderer 的 dataset、statusLine、row
ids 与 row dataset 写入;
- `verify_ini_panel_shell_integration_manifest.mjs` 将 launch method count 更新为 27
- `verify_ini_panel_launch_api_manifest.mjs` 覆盖 launch manifest 与 launch page API 暴露;
- `verify_ini_panel_entry_docs.mjs` 与 `docs/panel-entry.md` 同步记录和校验新 helper
- 未新增控制按钮;
- 未解析 G-code
- 未解释 canonical events
- 未新增 JS CNC 语义;
- 未改变 OPFS/session persistence、LinuxCNC interpreter、tool、parameter、planner 或
LinuxCNC-owned runtime semantics。
验证已通过:
```bash
git diff --check
wasm-port/tests/ui/node/verify_ini_panel_ui_shell.sh
wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.sh
wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.sh
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh
wasm-port/tests/ui/node/verify_ui_node_smokes.sh
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
wasm-port/tools/verify_vendor_sync.sh
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
wasm-port/tests/host/verify_host_smokes.sh
```
关键输出:
```text
ini_panel_ui_shell_node_smoke=ok
ini_panel_shell_integration_manifest_node_smoke=ok
ini_panel_launch_api_manifest_node_smoke=ok
ini_panel_entry_docs_node_smoke=ok
ui_node_smokes=ok
browser_ini_opfs_smoke=ok
browser_ini_control_page_smoke=ok
browser_ini_launch_smoke=ok
browser_ini_shell_integration_workflow_smoke=ok
vendor sync up to date
standalone CNC semantics guard complete
interp_wasm_node_smoke=ok
sim_configs_wasm_node_inventory_executed=28
sim_configs_wasm_node_inventory_passed=28
sim_configs_wasm_node_inventory_skipped=131
sim_configs_wasm_node_inventory_unexpected_fail=0
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续推进 SDK/API surface。下一批建议为 shared mount DOM renderer 增加 schema/contract helper
(例如 `createIniPanelShellSessionHandoffMountDomContract()`),让外部 shell 可在渲染前校验所需
DOM nodes、dataset keys 与 row dataset prefix仍保持只读不新增控制按钮不解析 G-code。