推进 INI 面板 UI 会话描述 helper
This commit is contained in:
61
text10.txt
61
text10.txt
@@ -793,3 +793,64 @@ host_wasm_opfs_browser_smokes=ok
|
||||
`SESSION_SNAPSHOT_ID`、`SESSION_SNAPSHOT_FILENAME` 与 G-code fallback metadata 整理成
|
||||
一个小的 UI session descriptor/helper,减少按钮 handler 间重复拼接 snapshot label、
|
||||
G-code OPFS path 和默认 program source 的逻辑。仍不解析或改写任何 CNC 语义。
|
||||
|
||||
十、2026-06-14 继续执行记录:INI panel UI session descriptor helper
|
||||
|
||||
本轮继续沿 OPFS/session/UI boundary 推进,把 INI panel 内部的 session snapshot 常量与
|
||||
默认 G-code metadata 收敛成一个小的 UI session descriptor/helper,减少按钮 handler
|
||||
之间重复拼接。
|
||||
|
||||
完成内容:
|
||||
|
||||
- 在 `wasm-port/runtime/ui/ini-panel/app.js` 新增 `UI_SESSION` descriptor:
|
||||
- `snapshotId`;
|
||||
- `snapshotFilename`;
|
||||
- `defaultGcodeFilename`;
|
||||
- `gcodeWasmPath`;
|
||||
- 新增 `sessionSnapshotLabel(...)`,统一生成
|
||||
`ui-machine-session/ui-machine-session.json` 形式的 UI label;
|
||||
- 新增 `defaultGcodeOpfsPath()`,统一生成默认 G-code OPFS path;
|
||||
- `save-session-snapshot`、`restore-session-snapshot`、`restore-load-session` 的日志与
|
||||
字段回填改为复用 descriptor/helper;
|
||||
- `Run G-code` 的 default fallback 与 WASM target path 改为复用 descriptor;
|
||||
- 保持现有 UI 文本、按钮行为、snapshot id/filename、G-code filename、WASM path 和
|
||||
OPFS path 不变;
|
||||
- 未改变 G-code 文本内容、OPFS file-service、machine-session bridge、interpreter run
|
||||
API、canonical-event 解析或 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
|
||||
```
|
||||
|
||||
下一步建议:
|
||||
|
||||
继续沿 OPFS/session/UI boundary 推进。优先让 `Save Session Snapshot` 的 metadata 使用
|
||||
同一个 `UI_SESSION` descriptor 生成,例如补充 snapshot label、default G-code OPFS path
|
||||
和 UI workflow source,方便后续恢复/审计用户会话;并在 browser smoke 中验证 metadata
|
||||
可从 saved snapshot round trip 读回。仍不解析或改写任何 CNC 语义。
|
||||
|
||||
Reference in New Issue
Block a user