From a663c8dbcaea71e74f6c30b9626a35075cc5c499 Mon Sep 17 00:00:00 2001 From: wangdequan Date: Mon, 15 Jun 2026 07:54:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E8=BF=9B=20INI=20=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=20shell=20integration=20browser=20workflow=20smoke?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- text12.txt | 77 ++++++++ wasm-port/docs/panel-entry.md | 4 + ...anel_shell_integration_workflow_smoke.html | 181 ++++++++++++++++++ .../tests/browser/verify_ini_panel_browser.sh | 19 ++ .../ui/node/verify_ini_panel_entry_docs.mjs | 10 + 5 files changed, 291 insertions(+) create mode 100644 wasm-port/tests/browser/ini_panel_shell_integration_workflow_smoke.html diff --git a/text12.txt b/text12.txt index b494f76..d922eb5 100644 --- a/text12.txt +++ b/text12.txt @@ -1763,3 +1763,80 @@ host_wasm_opfs_browser_smokes=ok 继续推进 browser/UI workflow。下一批建议把 shell integration readiness 接到 control-page 或 launch 的外部 shell smoke 中,形成“读取 integration manifest -> readiness gate -> 打开 control page -> 读取 readonly status”的端到端只读接入 workflow;仍保持只读,不新增控制按钮,不解析 G-code。 + +二十二、2026-06-15 继续执行记录:INI panel shell integration browser workflow smoke + +本轮按“第一原则:加快实质性推进”继续推进 browser/UI workflow,把 shell integration readiness +接入真实 browser 端到端只读外部 shell workflow,覆盖“读取 integration manifest -> readiness gate +-> 打开 control page -> 读取 readonly status”的接入链路。 + +完成内容: + +- 新增 `wasm-port/tests/browser/ini_panel_shell_integration_workflow_smoke.html`; +- 该 browser smoke 模拟外部 shell: + - 先加载真实 `launch.html`; + - 读取 `linuxCncIniPanelLaunchApi.getShellIntegrationManifest()`; + - 读取 `linuxCncIniPanelLaunchApi.getShellIntegrationReadiness()`; + - 校验 readiness `phase === "ready"`、`ready === true`、`missing` 为空; + - 从 integration manifest 的 target pages 找到 control-page target; + - 加载真实 `control-page.html`; + - 校验 control-page browser API manifest 与 integration manifest 对齐; + - 等待 embedded INI panel API ready; + - 通过既有 UI workflow 写入 INI、保存 machine files、load session; + - 使用 `readControlPageStatus()` 读取 readonly machine-session status; + - 校验 workflow last action、parameter file、tool table 与 control-page DOM status; +- `verify_ini_panel_browser.sh` 纳入新 browser smoke,并输出 + `browser_ini_shell_integration_workflow_smoke=ok`; +- `docs/panel-entry.md` 记录该 browser workflow smoke 的外部 shell handoff 目的; +- `verify_ini_panel_entry_docs.mjs` 校验: + - 文档记录新 smoke; + - browser 聚合脚本执行新 smoke; + - 新 smoke 使用 `getShellIntegrationReadiness()`; + - 新 smoke 使用 `readControlPageStatus()`; + - 新 smoke 输出成功标记; +- 未新增控制按钮; +- 未解析 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_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_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 integration workflow 的只读 handoff 抽成 Node 可测 +helper(例如 `createIniPanelShellIntegrationWorkflowPlan()`),让外部 shell 在不开 browser 的情况下 +获得 target page、readiness、required methods 与 readonly status handoff plan;仍保持只读,不新增 +控制按钮,不解析 G-code。 diff --git a/wasm-port/docs/panel-entry.md b/wasm-port/docs/panel-entry.md index efa0716..a7bcf71 100644 --- a/wasm-port/docs/panel-entry.md +++ b/wasm-port/docs/panel-entry.md @@ -124,6 +124,10 @@ Use `createIniPanelShellIntegrationReadiness()` or needs a read-only `ready`/`blocked` status, failed check names, API names, and counts for pages, methods, and persistence capabilities before mounting any embedded control page. +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, +open the control page target, then read readonly machine-session status. The control-page refresh workflow lives in `runtime/ui/ini-panel/control-page-refresh-workflow.js`. Use diff --git a/wasm-port/tests/browser/ini_panel_shell_integration_workflow_smoke.html b/wasm-port/tests/browser/ini_panel_shell_integration_workflow_smoke.html new file mode 100644 index 0000000..9648b18 --- /dev/null +++ b/wasm-port/tests/browser/ini_panel_shell_integration_workflow_smoke.html @@ -0,0 +1,181 @@ + + + + + LinuxCNC INI Shell Integration Workflow Smoke + + +
running
+ + + diff --git a/wasm-port/tests/browser/verify_ini_panel_browser.sh b/wasm-port/tests/browser/verify_ini_panel_browser.sh index 2fb76f3..7502617 100755 --- a/wasm-port/tests/browser/verify_ini_panel_browser.sh +++ b/wasm-port/tests/browser/verify_ini_panel_browser.sh @@ -63,9 +63,11 @@ PORT="$(cat "$PORT_FILE")" URL="http://127.0.0.1:$PORT/tests/browser/ini_panel_smoke.html" CONTROL_URL="http://127.0.0.1:$PORT/tests/browser/ini_panel_control_page_smoke.html" LAUNCH_URL="http://127.0.0.1:$PORT/tests/browser/ini_panel_launch_smoke.html" +SHELL_INTEGRATION_URL="http://127.0.0.1:$PORT/tests/browser/ini_panel_shell_integration_workflow_smoke.html" OUT="$TMP_DIR/chromium.out" CONTROL_OUT="$TMP_DIR/chromium-control.out" LAUNCH_OUT="$TMP_DIR/chromium-launch.out" +SHELL_INTEGRATION_OUT="$TMP_DIR/chromium-shell-integration.out" "$CHROMIUM" \ --headless=new \ @@ -117,3 +119,20 @@ if ! grep -Fq "browser_ini_launch_smoke=ok" "$LAUNCH_OUT"; then fi echo "browser_ini_launch_smoke=ok" + +"$CHROMIUM" \ + --headless=new \ + --disable-gpu \ + --no-sandbox \ + --user-data-dir="$CHROME_PROFILE" \ + --virtual-time-budget=10000 \ + --dump-dom \ + "$SHELL_INTEGRATION_URL" >"$SHELL_INTEGRATION_OUT" 2>&1 + +if ! grep -Fq "browser_ini_shell_integration_workflow_smoke=ok" "$SHELL_INTEGRATION_OUT"; then + echo "browser INI shell integration workflow smoke failed" >&2 + sed -n '1,220p' "$SHELL_INTEGRATION_OUT" >&2 + exit 1 +fi + +echo "browser_ini_shell_integration_workflow_smoke=ok" diff --git a/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs b/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs index e8fd58e..5e84046 100644 --- a/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs +++ b/wasm-port/tests/ui/node/verify_ini_panel_entry_docs.mjs @@ -35,6 +35,11 @@ const docText = readFileSync(resolve(root, "docs/panel-entry.md"), "utf8"); const shellText = readFileSync(resolve(root, "runtime/ui/ini-panel/ui-shell.js"), "utf8"); const controlPageText = readFileSync(resolve(root, "runtime/ui/ini-panel/control-page.js"), "utf8"); const launchText = readFileSync(resolve(root, "runtime/ui/ini-panel/launch.html"), "utf8"); +const browserIniPanelText = readFileSync(resolve(root, "tests/browser/verify_ini_panel_browser.sh"), "utf8"); +const shellIntegrationWorkflowSmokeText = readFileSync( + resolve(root, "tests/browser/ini_panel_shell_integration_workflow_smoke.html"), + "utf8", +); const refreshWorkflowText = readFileSync( resolve(root, "runtime/ui/ini-panel/control-page-refresh-workflow.js"), "utf8", @@ -222,6 +227,11 @@ assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellIntegrationSchema\b/ assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellIntegrationManifest\b/); assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellIntegrationReadiness\b/); assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getControlPageApiMethods\b/); +assert.match(docText, /\bini_panel_shell_integration_workflow_smoke\.html\b/); +assert.match(browserIniPanelText, /\bini_panel_shell_integration_workflow_smoke\.html\b/); +assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellIntegrationReadiness\b/); +assert.match(shellIntegrationWorkflowSmokeText, /\breadControlPageStatus\b/); +assert.match(shellIntegrationWorkflowSmokeText, /\bbrowser_ini_shell_integration_workflow_smoke=ok\b/); assert.match(docText, /\bOPFS\/session persistence capabilities\b/); assert.match(docText, /\bmachine files\b/); assert.match(docText, /\bsession snapshots\b/);