推进 INI 面板状态 bundle helper
This commit is contained in:
62
text11.txt
62
text11.txt
@@ -896,3 +896,65 @@ host_wasm_opfs_browser_smokes=ok
|
||||
继续沿 `window.linuxCncIniPanelApi` 收敛控制面。下一批建议把当前散落的 report/export/
|
||||
status getter 再包成一个明确的 `getMachineSessionStateBundle()` 或 `getMachineSessionView()`
|
||||
只读入口,给控制网页界面一个单点轮询对象;仍保持只读,不加按钮,不扩大 CNC 语义边界。
|
||||
|
||||
九、2026-06-14 继续执行记录:INI panel state bundle helper
|
||||
|
||||
本轮继续沿 `window.linuxCncIniPanelApi` 收敛控制面,把现有 report/export/status 入口
|
||||
聚合成一个单点只读 bundle helper,给控制网页界面或上层 SDK 一个更稳的轮询对象。
|
||||
|
||||
完成内容:
|
||||
|
||||
- `wasm-port/runtime/ui/ini-panel/panel-state-summary.js` 新增
|
||||
`createMachineSessionStateBundle(state, options)`;
|
||||
- bundle helper 返回:
|
||||
- `report`;
|
||||
- `export`;
|
||||
- `workflowStatus`;
|
||||
- `wasm-port/runtime/ui/ini-panel/app.js` 在
|
||||
`window.linuxCncIniPanelApi`、`window.getMachineSessionStateBundle()` 下暴露该 helper;
|
||||
- `wasm-port/tests/ui/node/verify_ini_panel_state_summary.mjs` 覆盖 bundle 与单项 getter 的
|
||||
结构一致性;
|
||||
- `wasm-port/tests/browser/ini_panel_smoke.html` 在真实 save、restore-load、run 流程后验证
|
||||
bundle,确认其 report/export/status 与单项 getter 一致;
|
||||
- `wasm-port/docs/ui-panel-state-summary.md` 补充 bundle helper 说明,并明确它是控制页的
|
||||
推荐单点只读入口;
|
||||
- 未新增按钮;
|
||||
- 未解析 G-code;
|
||||
- 未改变 OPFS/session persistence、LinuxCNC interpreter、canonical-event 语义、tool、
|
||||
parameter、planner 或 LinuxCNC-owned runtime semantics。
|
||||
|
||||
验证已通过:
|
||||
|
||||
```bash
|
||||
git diff --check
|
||||
wasm-port/tests/ui/node/verify_ini_panel_state_summary.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_state_summary_node_smoke=ok
|
||||
ui_node_smokes=ok
|
||||
browser_ini_opfs_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
|
||||
```
|
||||
|
||||
下一步建议:
|
||||
|
||||
继续沿“单点只读入口”推进,把 `window.linuxCncIniPanelApi` 再收敛成一个更明确的
|
||||
`getMachineSessionView()` 或 `getMachineSessionStateBundle()` 的稳定消费者契约,并开始只
|
||||
在这个 bundle 上面叠控制页展示逻辑;仍不新增按钮、不把 CNC 语义搬进 JS。
|
||||
|
||||
Reference in New Issue
Block a user