推进 INI 面板 launcher link view-model helper

This commit is contained in:
2026-06-15 04:25:29 +08:00
parent ac463453da
commit b330f7b1bc
7 changed files with 200 additions and 16 deletions

View File

@@ -1633,3 +1633,128 @@ host_wasm_opfs_browser_smokes=ok
继续推进实质 UI/API surface。下一批建议把 `ui-shell.js` 中用于 launcher 的入口列表再封装成
`getVisibleIniPanelEntries()`,让页面不需要知道 manifest 复制语义;仍保持只读,不新增控制
按钮,不解析 G-code。
二十一、2026-06-14 继续执行记录INI panel visible entries helper
本轮按“加快实质性推进”在 `ui-shell.js` 增加 launcher-facing 的可见入口 helper让页面和
文档使用 `getVisibleIniPanelEntries()`,不再直接依赖 manifest 复制语义。
完成内容:
- `wasm-port/runtime/ui/ini-panel/ui-shell.js` 新增 `getVisibleIniPanelEntries()`
- `getVisibleIniPanelEntries()` 返回 launcher 可见入口列表;
- `wasm-port/runtime/ui/ini-panel/launch.html` 改为调用 `getVisibleIniPanelEntries()`
- `wasm-port/tests/browser/ini_panel_launch_smoke.html` 改为验证 visible entries
- `wasm-port/tests/ui/node/verify_ini_panel_ui_shell.mjs` 覆盖 visible entries 与复制语义;
- `wasm-port/docs/panel-entry.md` 改为以 `getVisibleIniPanelEntries()` 作为入口列表 API
- `wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs` 同步验证文档和 visible entries
- 未新增控制按钮;
- 未解析 G-code
- 未解释 canonical events
- 未改变 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_entry_docs.sh
wasm-port/tests/ui/node/verify_ui_node_smokes.sh
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_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
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
```
下一步建议:
继续推进 UI/API surface但避免纯文档循环。下一批建议把 `getVisibleIniPanelEntries()` 用到
更多外层 shell 消费示例,或新增一个小型 Node helper 生成 launcher link view-model仍保持
只读,不新增控制按钮,不解析 G-code。
二十二、2026-06-15 继续执行记录INI panel launcher link view-model helper
本轮按“加快实质性推进”继续推进 UI/API surface在 shell 层新增 launcher link
view-model helper让 launcher 页面不直接读取 manifest 字段名。
完成内容:
- `wasm-port/runtime/ui/ini-panel/ui-shell.js` 新增
`createIniPanelLauncherLinkViewModel()`
- launcher link view-model 输出 `entryId`、`href`、`label`,作为外层 shell 可直接渲染的
链接模型;
- `wasm-port/runtime/ui/ini-panel/launch.html` 改为调用
`createIniPanelLauncherLinkViewModel()` 渲染链接;
- `wasm-port/tests/browser/ini_panel_launch_smoke.html` 覆盖 launcher link view-model
- `wasm-port/tests/ui/node/verify_ini_panel_ui_shell.mjs` 覆盖 view-model 内容与复制语义;
- `wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs` 同步校验文档和 shell helper
- `wasm-port/docs/panel-entry.md` 记录 launcher link view-model API
- 未新增控制按钮;
- 未解析 G-code
- 未解释 canonical events
- 未改变 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_entry_docs.sh
wasm-port/tests/browser/verify_ini_panel_browser.sh
wasm-port/tests/ui/node/verify_ui_node_smokes.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_ini_panel_browser.sh
wasm-port/tests/host/verify_host_smokes.sh
```
关键输出:
```text
ini_panel_ui_shell_node_smoke=ok
ini_panel_entry_docs_node_smoke=ok
browser_ini_opfs_smoke=ok
browser_ini_control_page_smoke=ok
browser_ini_launch_smoke=ok
ui_node_smokes=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/API surface 的可复用边界。下一批建议新增一个
`createIniPanelShellViewModel()`,把 launcher links、可用页面和 control-page helper 暴露为
单一 shell model供外层应用一次性挂载仍保持只读不新增控制按钮不解析 G-code。