推进 INI 面板 run G-code workflow helper
This commit is contained in:
70
text11.txt
70
text11.txt
@@ -381,3 +381,73 @@ helper,覆盖 snapshot/default program selection、G-code OPFS load、WASM wri
|
||||
interpreter run、run summary、field/log state 和 error state。该 helper 仍只能编排
|
||||
host/runtime boundary,不解析或实现 G-code、planner、tool、parameter 或 canonical-event
|
||||
语义。
|
||||
|
||||
二、2026-06-14 继续执行记录:INI panel run G-code workflow helper
|
||||
|
||||
本轮继续按 `text11.txt` 第一原则推进实质性 UI workflow 能力,把 `run-gcode` 用户流程抽成
|
||||
可复用 helper,让上层 UI/API 可以直接复用 session/default G-code 选择、OPFS load、WASM
|
||||
staging、LinuxCNC interpreter run、run summary、field/log state 的编排。
|
||||
|
||||
完成内容:
|
||||
|
||||
- 新增 `wasm-port/runtime/ui/ini-panel/run-workflow.js`;
|
||||
- 导出:
|
||||
- `selectSessionGcodeProgram(input)`;
|
||||
- `runSessionContextLogLines(program, snapshot, snapshotLabel)`;
|
||||
- `runGcodeSessionWorkflow(input)`;
|
||||
- workflow helper 执行 host/runtime boundary 编排:
|
||||
- 从 snapshot G-code OPFS path 或默认 G-code path 选择程序;
|
||||
- 通过注入的 `loadGcodeProgram(...)` 读取 OPFS G-code 文本;
|
||||
- 调用 `interp.writeTextFile(...)` 写入 interpreter WASM filesystem;
|
||||
- 调用 LinuxCNC-owned `interp.runFileWithIni(...)`;
|
||||
- 返回 program、resultText、run summary、UI field state、motionSnapshots 和 log lines;
|
||||
- `wasm-port/runtime/ui/ini-panel/app.js` 的 `Run G-code` 按钮改为调用 workflow helper;
|
||||
- canonical-event 展示和 motion playback 仍留在 UI 层,workflow 只通过注入的
|
||||
`summarizeRun(...)` 接收已观察到的 UI summary/motion state;
|
||||
- 新增 `wasm-port/tests/ui/node/verify_ini_panel_run_workflow.mjs` 和 shell wrapper;
|
||||
- `wasm-port/tests/ui/node/verify_ui_node_smokes.sh` 纳入 run workflow smoke;
|
||||
- `wasm-port/docs/ui-run-summary-helpers.md` 更新 run workflow API、返回结构和边界说明;
|
||||
- 未改变 OPFS bridge、machine-file-store、LinuxCNC interpreter、G-code 文本、canonical-event
|
||||
语义、tool、parameter、planner 或 LinuxCNC-owned runtime semantics。
|
||||
|
||||
验证已通过:
|
||||
|
||||
```bash
|
||||
git diff --check
|
||||
wasm-port/tests/ui/node/verify_ini_panel_run_workflow.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_run_workflow_node_smoke=ok
|
||||
ini_panel_run_summary_node_smoke=ok
|
||||
ini_panel_session_summary_node_smoke=ok
|
||||
ini_panel_session_workflow_node_smoke=ok
|
||||
ini_panel_machine_file_summary_node_smoke=ok
|
||||
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
|
||||
```
|
||||
|
||||
下一步建议:
|
||||
|
||||
继续按“实质性能力优先”推进。优先把 save/restore/load/run workflow 的结果汇总成一个
|
||||
更完整的 machine session state snapshot helper,供上层 UI/API 直接消费当前 machine、
|
||||
session、loaded WASM mapping、selected G-code、last run summary、panel badges 和 error
|
||||
state;该 helper 只聚合已有 host/runtime boundary facts,不解析 G-code 或扩展 CNC 语义。
|
||||
|
||||
Reference in New Issue
Block a user