diff --git a/text12.txt b/text12.txt index dcec0eb..c81ff76 100644 --- a/text12.txt +++ b/text12.txt @@ -3246,3 +3246,99 @@ host_wasm_opfs_browser_smokes=ok `renderIniPanelShellSessionHandoffWorkflowState()` 或 `mountIniPanelShellSessionHandoffWorkflow()`),把 workflow render-state 渲染进稳定 DOM contract,方便外部 shell 直接挂载 end-to-end handoff 总览;仍保持只读, 不新增控制按钮,不解析 G-code。 + +四十一、2026-06-15 继续执行记录:INI panel shell handoff workflow DOM mount helper + +本轮按“第一原则:加快实质性推进”继续推进 SDK/API surface 与 browser/UI workflow,为 shell +handoff 增加 workflow DOM contract/readiness/render/mount helper,让外部 shell 可以直接挂载 +end-to-end handoff 总览 DOM。 + +完成内容: + +- `ui-shell.js` 新增: + - `createIniPanelShellSessionHandoffWorkflowDomContract()`; + - `createIniPanelShellSessionHandoffWorkflowDomReadiness()`; + - `renderIniPanelShellSessionHandoffWorkflowState()`; + - `mountIniPanelShellSessionHandoffWorkflow()`; +- workflow DOM helper 复用现有 mount DOM helper 模式,提供稳定 selectors、dataset keys、row dataset keys、 + readiness 检查、render result 和 structured mount result; +- `createIniPanelShellViewModel()` 暴露: + - `shellSessionHandoffWorkflowDomContract`; + - `createShellSessionHandoffWorkflowDomContract`; + - `createShellSessionHandoffWorkflowDomReadiness`; + - `renderShellSessionHandoffWorkflowState`; + - `mountShellSessionHandoffWorkflow`; +- `createIniPanelLaunchApiManifest().methods` 新增: + - `getShellSessionHandoffWorkflowDomContract`; + - `getShellSessionHandoffWorkflowDomReadiness`; + - `renderShellSessionHandoffWorkflowState`; + - `mountShellSessionHandoffWorkflow`; +- launch method count 更新为 39; +- `launch.html` 新增默认 workflow overview DOM 区域: + - `[data-handoff-workflow]`; + - `[data-handoff-workflow-status]`; + - `[data-handoff-workflow-rows]`; +- `launch.html` 的 `window.linuxCncIniPanelLaunchApi` 暴露对应 browser API,并默认渲染 workflow overview; +- `ini_panel_shell_integration_workflow_smoke.html` 新增外部 shell-owned workflow DOM 区域: + - `[data-external-shell-workflow]`; + - `[data-external-shell-workflow-status]`; + - `[data-external-shell-workflow-rows]`; +- browser smoke 通过 shared workflow DOM helpers 校验: + - DOM readiness; + - workflow DOM mount phase; + - workflow row count; + - workflow dataset scope; + - workflow status line; +- Node smoke 覆盖 workflow DOM contract/readiness/render/mount 的 ready/missing 路径; +- 文档同步记录 workflow DOM helper 用法; +- 未新增控制按钮; +- 未解析 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_ui_shell.sh +wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.sh +wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.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_ui_shell_node_smoke=ok +ini_panel_launch_api_manifest_node_smoke=ok +ini_panel_shell_integration_manifest_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。下一批建议增加 shell handoff workflow overview page/helper,把 workflow +DOM mount helper 接入一个独立 overview surface 或 shared panel band,方便外部 shell 无需手动拼 DOM +就能复用 end-to-end handoff 总览;仍保持只读,不新增控制按钮,不解析 G-code。 diff --git a/wasm-port/docs/panel-entry.md b/wasm-port/docs/panel-entry.md index faa5564..3d711e2 100644 --- a/wasm-port/docs/panel-entry.md +++ b/wasm-port/docs/panel-entry.md @@ -37,6 +37,10 @@ import { createIniPanelShellSessionHandoffWorkflowSummary, createIniPanelShellSessionHandoffWorkflowDisplayViewModel, createIniPanelShellSessionHandoffWorkflowRenderState, + createIniPanelShellSessionHandoffWorkflowDomContract, + createIniPanelShellSessionHandoffWorkflowDomReadiness, + renderIniPanelShellSessionHandoffWorkflowState, + mountIniPanelShellSessionHandoffWorkflow, renderIniPanelShellSessionHandoffMountState, createIniPanelShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageRenderState, @@ -266,12 +270,28 @@ when an outer shell needs that end-to-end summary compressed into stable `linuxCncIniPanelLaunchApi.getShellSessionHandoffWorkflowRenderState()` when an outer shell needs that workflow display-model compressed into stable `dataset`, `statusLine`, and rows for direct DOM rendering. Use +`createIniPanelShellSessionHandoffWorkflowDomContract()` or +`linuxCncIniPanelLaunchApi.getShellSessionHandoffWorkflowDomContract()` when an +outer shell needs the required workflow mount/status/rows selectors, mount +dataset keys, and row dataset keys before rendering workflow overview DOM. Use +`createIniPanelShellSessionHandoffWorkflowDomReadiness()` or +`linuxCncIniPanelLaunchApi.getShellSessionHandoffWorkflowDomReadiness()` to +check that those workflow DOM nodes exist before rendering. Use +`renderIniPanelShellSessionHandoffWorkflowState()` or +`linuxCncIniPanelLaunchApi.renderShellSessionHandoffWorkflowState()` when an +outer shell needs the shared read-only DOM renderer for workflow overview rows. +Use `mountIniPanelShellSessionHandoffWorkflow()` or +`linuxCncIniPanelLaunchApi.mountShellSessionHandoffWorkflow()` when an outer +shell needs one structured workflow DOM mount result containing contract, +readiness, render-state, render result, and any mount error as data. Use `renderIniPanelShellSessionHandoffMountState()` or `linuxCncIniPanelLaunchApi.renderShellSessionHandoffMountState()` when an outer shell needs the shared read-only DOM renderer for those rows. The launch page renders the default waiting mount state into `[data-handoff-mount]`, `[data-handoff-mount-status]`, and `[data-handoff-mount-rows]` without opening -the control page. +the control page. The launch page also renders a default workflow overview into +`[data-handoff-workflow]`, `[data-handoff-workflow-status]`, and +`[data-handoff-workflow-rows]`. The browser workflow smoke `tests/browser/ini_panel_shell_integration_workflow_smoke.html` verifies the same external shell handoff: read integration manifest, pass readiness gate, diff --git a/wasm-port/runtime/ui/ini-panel/launch.html b/wasm-port/runtime/ui/ini-panel/launch.html index 5c30265..031d64d 100644 --- a/wasm-port/runtime/ui/ini-panel/launch.html +++ b/wasm-port/runtime/ui/ini-panel/launch.html @@ -99,6 +99,10 @@
Checking shell handoff mount readiness.
Checking shell handoff workflow summary.
+