推进 INI 面板 shell handoff render-state

This commit is contained in:
2026-06-15 09:51:18 +08:00
parent 5c951ab9bc
commit b1f23e6641
10 changed files with 300 additions and 11 deletions

View File

@@ -507,3 +507,99 @@ host_wasm_opfs_browser_smokes=ok
继续推进 browser/UI workflow。下一批建议在 launch 页面或等价外部 shell view 中增加一个只读
snapshot consumer helper把 snapshot 直接压成 launch-side render state并对 blocked snapshot
做 focused browser smoke仍保持只读不新增控制按钮不解析 G-code。
四、2026-06-15 继续执行记录INI panel shell handoff render-state consumer
本轮按“第一原则:加快实质性推进”继续推进 browser/UI workflow新增只读 shell handoff
render-state consumer把 handoff snapshot 压成 launch 页面和外部 shell 可直接渲染的稳定状态。
完成内容:
- `ui-shell.js` 新增 `createIniPanelShellSessionHandoffRenderState()`
- render-state 输出:
- `apiName: "ini-panel-shell-session-handoff-render-state"`
- `renderStateVersion: 1`
- `phase`
- `ready`
- `title`
- `statusText`
- `detailText`
- `statusLine`
- `rows`
- `dataset.handoffPhase`
- `dataset.handoffReady`
- `createIniPanelShellViewModel()` 新增:
- `shellSessionHandoffRenderState`
- `createShellSessionHandoffRenderState`
- `createIniPanelLaunchApiManifest().methods` 新增
`getShellSessionHandoffRenderState`
- `launch.html` 改为从 render-state 渲染 `[data-handoff-status]`、
`[data-handoff-rows]` 和 `[data-handoff-shell]` 的 phase/readiness dataset
- `launch.html` 的 `window.linuxCncIniPanelLaunchApi` 新增真实 browser 入口
`getShellSessionHandoffRenderState()`
- `ini_panel_launch_smoke.html` 校验真实 launch iframe
- render-state version 为 1
- render-state `ready === true`
- render-state status line 为 `Ready: No blocking reasons`
- render-state rows 与 display view-model rows 一致;
- DOM `[data-handoff-shell]` 输出 `handoffPhase=ready` 与 `handoffReady=true`
- `ini_panel_shell_integration_workflow_smoke.html` 校验外部 shell workflow 能读取
render-state并确认 status line 与 display rows 一致;
- `verify_ini_panel_shell_integration_manifest.mjs` 覆盖:
- ready render-state 完整 shape
- blocked snapshot render-state 的 `Blocked: summaryVersion` focused case
- `verify_ini_panel_ui_shell.mjs` 覆盖 shell view-model 的 render-state 聚合关系;
- `verify_ini_panel_launch_api_manifest.mjs`、`verify_ini_panel_entry_docs.mjs` 与
`docs/panel-entry.md` 同步记录和校验新 helper/API/DOM dataset
- 未新增控制按钮;
- 未解析 G-code
- 未解释 canonical events
- 未新增 JS CNC 语义;
- 未改变 OPFS/session persistence、LinuxCNC interpreter、tool、parameter、planner 或
LinuxCNC-owned runtime semantics。
验证已通过:
```bash
git diff --check
wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.sh
wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.sh
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
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_shell_integration_manifest_node_smoke=ok
ini_panel_launch_api_manifest_node_smoke=ok
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
browser_ini_shell_integration_workflow_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
```
下一步建议:
继续推进 SDK/API surface 与 browser/UI workflow 的交界。下一批建议新增一个只读
`createIniPanelShellSessionHandoffActionPlan()` 或等价 helper把 render-state 的 ready/blocked
状态转成外部 shell 可执行的下一步计划(例如 target page、required methods、blocked reasons、
display rows但仍只描述流程不新增控制按钮不解析 G-code。