推进 INI 面板快照 G-code 运行选择
This commit is contained in:
61
text10.txt
61
text10.txt
@@ -611,3 +611,64 @@ host_wasm_opfs_browser_smokes=ok
|
||||
`GCODE_FILENAME` 收敛为“优先使用已恢复 snapshot 中的 G-code OPFS path,否则回退默认
|
||||
G-code”,并在 browser smoke 中验证 restore-and-load 后运行的程序来自 snapshot 文件清单。
|
||||
仍只做 OPFS/session/UI 编排,不解析或改写 G-code 语义。
|
||||
|
||||
七、2026-06-14 继续执行记录:INI panel snapshot G-code run selection
|
||||
|
||||
本轮继续推进 browser/UI workflow 的实质能力,让 `Run G-code` 使用已恢复 machine
|
||||
session snapshot 中的 G-code 文件清单,而不是始终只使用固定默认 filename。
|
||||
|
||||
完成内容:
|
||||
|
||||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 新增 `restoredSessionSnapshot` 状态,用于
|
||||
保存最近一次 checked snapshot restore 结果;
|
||||
- 新增 `gcodeFilenameFromSnapshotPath(...)`,将 snapshot 中的
|
||||
`linuxcnc/gcode/<filename>` OPFS path 转成 `loadGcodeProgram(...)` 需要的 filename;
|
||||
- 新增 `loadSelectedGcodeProgram()`:
|
||||
- 优先读取 restored snapshot payload 中的 G-code OPFS path;
|
||||
- 无 restored snapshot 或无 G-code path 时回退默认 `GCODE_FILENAME`;
|
||||
- 仍通过既有 OPFS G-code store 读取文本;
|
||||
- `Run G-code` 改为使用 selected program,并在日志中记录
|
||||
`OPFS path -> WASM path`;
|
||||
- `Session G-code` 字段在运行后保留 OPFS path,明确反映用户流程使用的 snapshot
|
||||
文件清单;
|
||||
- browser INI panel smoke 验证 restore-and-load 后运行的程序来自
|
||||
`linuxcnc/gcode/ui-session.ngc`,并继续验证 LinuxCNC canonical events 与 run monitor;
|
||||
- 未改变 G-code 文本内容、interpreter run API、canonical-event 解析、OPFS path model
|
||||
或 LinuxCNC-owned runtime semantics。
|
||||
|
||||
验证已通过:
|
||||
|
||||
```bash
|
||||
git diff --check
|
||||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||||
wasm-port/tests/opfs/node/verify_file_service.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
|
||||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_interp_browser.sh
|
||||
wasm-port/tests/host/verify_host_smokes.sh
|
||||
```
|
||||
|
||||
关键输出:
|
||||
|
||||
```text
|
||||
browser_ini_opfs_smoke=ok
|
||||
opfs_file_service_node_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
|
||||
browser_interp_smoke=ok
|
||||
host_wasm_opfs_browser_smokes=ok
|
||||
```
|
||||
|
||||
下一步建议:
|
||||
|
||||
继续沿 UI workflow 做实质推进。优先补 fallback 覆盖:在 browser smoke 中增加不恢复
|
||||
snapshot、只保存 machine files 并 `Load Machine Session` 后运行 G-code 的路径,验证
|
||||
`Run G-code` 会回退默认 `linuxcnc/gcode/ui-session.ngc` 且保持 canonical-event flow。
|
||||
仍只做 OPFS/session/UI 编排,不解析或改写 G-code 语义。
|
||||
|
||||
Reference in New Issue
Block a user