diff --git a/text12.txt b/text12.txt index c81ff76..4c81a47 100644 --- a/text12.txt +++ b/text12.txt @@ -3342,3 +3342,89 @@ 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。 + +四十二、2026-06-15 继续执行记录:INI panel shell handoff workflow overview surface + +本轮按“第一原则:加快实质性推进”继续推进 SDK/API surface 与 browser/UI workflow,把 shell handoff +workflow DOM mount helper 接入一个真实可访问的 overview surface,让外部 shell 可以直接复用 +end-to-end handoff 总览页面,而不是手动拼 DOM。 + +完成内容: + +- 新增 `runtime/ui/ini-panel/workflow-overview.html`; +- 新页面默认渲染 shell handoff workflow overview DOM,并暴露 + `window.linuxCncIniPanelWorkflowOverviewApi`: + - `getWorkflowOverviewRenderState()`; + - `getWorkflowOverviewDisplayViewModel()`; + - `getWorkflowOverviewSummary()`; + - `getWorkflowOverviewDomContract()`; + - `getWorkflowOverviewDomReadiness()`; + - `renderWorkflowOverview()`; + - `mountWorkflowOverview()`; + - `createWorkflowOverviewRenderState()`; +- `entry-manifest.js` 新增第三个入口: + - `workflow-overview`; + - `./workflow-overview.html`; + - `Open shell handoff overview`; +- `launch.html` 更新为三入口 launch surface,并新增 workflow overview 链接; +- `verify_ini_panel_entry_manifest.mjs`、`verify_ini_panel_launch_api_manifest.mjs`、 + `verify_ini_panel_ui_shell.mjs`、`verify_ini_panel_shell_integration_manifest.mjs`、 + `verify_ini_panel_entry_docs.mjs` 同步三入口计数与文档页面表; +- 新增 `tests/browser/ini_panel_workflow_overview_smoke.html`,覆盖 overview surface 的真实 browser API、 + DOM render、DOM readiness、mount result 与 blocking row; +- `tests/browser/verify_ini_panel_browser.sh` 接入 `browser_ini_workflow_overview_smoke=ok`; +- 文档 `docs/panel-entry.md` 新增 Workflow overview page 与 visible entry 记录; +- 未新增控制按钮; +- 未解析 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_manifest.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_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_entry_manifest_node_smoke=ok +ini_panel_launch_api_manifest_node_smoke=ok +ini_panel_shell_integration_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_workflow_overview_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 embedding helper,把 +`workflow-overview.html` 或其 DOM mount API 接成一个可嵌入 band/iframe contract,方便外部 shell +在现有页内直接嵌入 overview surface;仍保持只读,不新增控制按钮,不解析 G-code。 diff --git a/wasm-port/docs/panel-entry.md b/wasm-port/docs/panel-entry.md index 3d711e2..279248d 100644 --- a/wasm-port/docs/panel-entry.md +++ b/wasm-port/docs/panel-entry.md @@ -80,6 +80,7 @@ and the control-view renderer. It does not implement CNC behavior. | Launch | `runtime/ui/ini-panel/launch.html` | Read-only entry page for available panel surfaces. | | Edit and run | `runtime/ui/ini-panel/index.html` | Editable INI panel and existing run workflow surface. | | Read-only control view | `runtime/ui/ini-panel/control-page.html` | Read-only control view backed by the panel API. | +| Workflow overview | `runtime/ui/ini-panel/workflow-overview.html` | Read-only shell handoff workflow overview surface. | ## Visible Entries @@ -89,6 +90,7 @@ The visible launch entries come from `getVisibleIniPanelEntries()`: | --- | --- | --- | | `edit-run` | `./index.html` | Open edit and run panel | | `control-view` | `./control-page.html` | Open read-only control view | +| `workflow-overview` | `./workflow-overview.html` | Open shell handoff overview | Launcher pages can render links from `createIniPanelLauncherLinkViewModel()` without reading manifest field names directly. Each item has `entryId`, `href`, diff --git a/wasm-port/runtime/ui/ini-panel/entry-manifest.js b/wasm-port/runtime/ui/ini-panel/entry-manifest.js index 29813f8..a43330a 100644 --- a/wasm-port/runtime/ui/ini-panel/entry-manifest.js +++ b/wasm-port/runtime/ui/ini-panel/entry-manifest.js @@ -9,6 +9,11 @@ export const INI_PANEL_ENTRIES = [ title: "Open read-only control view", href: "./control-page.html", }, + { + id: "workflow-overview", + title: "Open shell handoff overview", + href: "./workflow-overview.html", + }, ]; export function getIniPanelEntryManifest() { diff --git a/wasm-port/runtime/ui/ini-panel/launch.html b/wasm-port/runtime/ui/ini-panel/launch.html index 031d64d..73b26a5 100644 --- a/wasm-port/runtime/ui/ini-panel/launch.html +++ b/wasm-port/runtime/ui/ini-panel/launch.html @@ -86,10 +86,11 @@

LinuxCNC INI Panel

-

Choose the editable panel or the read-only control view.

+

Choose the editable panel, the read-only control view, or the shell handoff overview.

Checking shell handoff compatibility.

diff --git a/wasm-port/runtime/ui/ini-panel/workflow-overview.html b/wasm-port/runtime/ui/ini-panel/workflow-overview.html new file mode 100644 index 0000000..f98fc0f --- /dev/null +++ b/wasm-port/runtime/ui/ini-panel/workflow-overview.html @@ -0,0 +1,124 @@ + + + + + + LinuxCNC INI Workflow Overview + + + +
+
+

LinuxCNC INI Workflow Overview

+

Read-only shell handoff overview for mount, readonly status, and overall workflow readiness.

+
+

Checking shell handoff workflow summary.

+
+
+
+
+ + + diff --git a/wasm-port/tests/browser/ini_panel_launch_smoke.html b/wasm-port/tests/browser/ini_panel_launch_smoke.html index 01a0379..c6b5aa2 100644 --- a/wasm-port/tests/browser/ini_panel_launch_smoke.html +++ b/wasm-port/tests/browser/ini_panel_launch_smoke.html @@ -36,9 +36,9 @@ try { const visibleEntries = getVisibleIniPanelEntries(); - assertEqual(visibleEntries.length, 2, "launch visible entry length"); + assertEqual(visibleEntries.length, 3, "launch visible entry length"); const launcherLinks = createIniPanelLauncherLinkViewModel(); - assertEqual(launcherLinks.length, 2, "launcher link model length"); + assertEqual(launcherLinks.length, 3, "launcher link model length"); assertEqual(launcherLinks[0].entryId, "edit-run", "launcher link entry id"); assertEqual(launcherLinks[0].label, "Open edit and run panel", "launcher link label"); assertEqual(launcherLinks[0].href, "./index.html", "launcher link href"); @@ -48,6 +48,11 @@ "Open read-only control view", "launch manifest control entry", ); + assertEqual( + getIniPanelEntryByHref("./workflow-overview.html").title, + "Open shell handoff overview", + "launch manifest workflow entry", + ); assertEqual( createIniPanelShellViewModel().controlPage.browserApiMethods.join(","), createControlPageBrowserApiMethods().join(","), @@ -131,7 +136,7 @@ ); assertEqual( launchApiManifest.methods.join(","), - "isSupportedLaunchApiManifest,getLaunchApiSchema,getLaunchApiManifest,getShellIntegrationSchema,getShellIntegrationManifest,getShellIntegrationReadiness,getShellSessionHandoffSummarySchema,getShellSessionHandoffSummary,isSupportedShellSessionHandoffSummary,getShellSessionHandoffCompatibilityReport,getShellSessionHandoffDisplayViewModel,getShellSessionHandoffSnapshot,getShellSessionHandoffRenderState,getShellSessionHandoffActionPlan,getShellSessionHandoffChecklist,getShellSessionHandoffPackageSchema,getShellSessionHandoffPackage,getShellSessionHandoffPackageReport,getShellSessionHandoffPackageDisplayViewModel,getShellSessionHandoffPackageRenderState,getShellSessionHandoffPackageMountState,getShellSessionHandoffPackageMountDisplayViewModel,getShellSessionHandoffPackageMountRenderState,renderShellSessionHandoffMountState,isSupportedShellSessionHandoffPackage,getLauncherLinks,getControlPageApiMethods", + createIniPanelLaunchApiManifest().methods.join(","), "launch API manifest methods", ); const shellIntegrationSchema = launchApi.getShellIntegrationSchema(); @@ -540,7 +545,7 @@ ); assertEqual( launchApiManifest.visibleEntries.length, - 2, + 3, "launch API manifest visible entry count", ); assertEqual( @@ -548,6 +553,11 @@ "./control-page.html", "launch API manifest control target", ); + assertEqual( + launchApiManifest.targetPages[2].href, + "./workflow-overview.html", + "launch API manifest workflow target", + ); assertEqual( launchApiManifest.persistenceCapabilities.length, 3, @@ -573,9 +583,14 @@ "Open read-only control view", "launch panel control link", ); + assertEqual( + launchDoc.querySelector('a[href="./workflow-overview.html"]').textContent, + "Open shell handoff overview", + "launch panel workflow link", + ); assertEqual( launchApi.getLauncherLinks().length, - 2, + 3, "launch API launcher link count", ); assertEqual( diff --git a/wasm-port/tests/browser/ini_panel_workflow_overview_smoke.html b/wasm-port/tests/browser/ini_panel_workflow_overview_smoke.html new file mode 100644 index 0000000..a12856d --- /dev/null +++ b/wasm-port/tests/browser/ini_panel_workflow_overview_smoke.html @@ -0,0 +1,86 @@ + + + + + LinuxCNC INI Workflow Overview 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 7502617..a88cbe9 100755 --- a/wasm-port/tests/browser/verify_ini_panel_browser.sh +++ b/wasm-port/tests/browser/verify_ini_panel_browser.sh @@ -63,10 +63,12 @@ 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" +WORKFLOW_OVERVIEW_URL="http://127.0.0.1:$PORT/tests/browser/ini_panel_workflow_overview_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" +WORKFLOW_OVERVIEW_OUT="$TMP_DIR/chromium-workflow-overview.out" SHELL_INTEGRATION_OUT="$TMP_DIR/chromium-shell-integration.out" "$CHROMIUM" \ @@ -120,6 +122,23 @@ 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 \ + "$WORKFLOW_OVERVIEW_URL" >"$WORKFLOW_OVERVIEW_OUT" 2>&1 + +if ! grep -Fq "browser_ini_workflow_overview_smoke=ok" "$WORKFLOW_OVERVIEW_OUT"; then + echo "browser INI workflow overview smoke failed" >&2 + sed -n '1,220p' "$WORKFLOW_OVERVIEW_OUT" >&2 + exit 1 +fi + +echo "browser_ini_workflow_overview_smoke=ok" + "$CHROMIUM" \ --headless=new \ --disable-gpu \ 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 a1f98b6..572618e 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 @@ -168,6 +168,7 @@ const requiredPages = [ ["Launch", "runtime/ui/ini-panel/launch.html"], ["Edit and run", "runtime/ui/ini-panel/index.html"], ["Read-only control view", "runtime/ui/ini-panel/control-page.html"], + ["Workflow overview", "runtime/ui/ini-panel/workflow-overview.html"], ]; for (const [label, path] of requiredPages) { diff --git a/wasm-port/tests/ui/node/verify_ini_panel_entry_manifest.mjs b/wasm-port/tests/ui/node/verify_ini_panel_entry_manifest.mjs index e38a740..47db5cd 100644 --- a/wasm-port/tests/ui/node/verify_ini_panel_entry_manifest.mjs +++ b/wasm-port/tests/ui/node/verify_ini_panel_entry_manifest.mjs @@ -17,6 +17,11 @@ assert.deepEqual(INI_PANEL_ENTRIES, [ title: "Open read-only control view", href: "./control-page.html", }, + { + id: "workflow-overview", + title: "Open shell handoff overview", + href: "./workflow-overview.html", + }, ]); const manifest = getIniPanelEntryManifest(); @@ -26,6 +31,7 @@ assert.notStrictEqual(manifest[0], INI_PANEL_ENTRIES[0]); assert.deepEqual(getIniPanelEntryByHref("./index.html"), INI_PANEL_ENTRIES[0]); assert.deepEqual(getIniPanelEntryByHref("./control-page.html"), INI_PANEL_ENTRIES[1]); +assert.deepEqual(getIniPanelEntryByHref("./workflow-overview.html"), INI_PANEL_ENTRIES[2]); assert.equal(getIniPanelEntryByHref("./missing.html"), null); manifest[0].title = "changed"; diff --git a/wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.mjs b/wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.mjs index 1ee4b9a..e7b8adc 100644 --- a/wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.mjs +++ b/wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.mjs @@ -91,6 +91,11 @@ assert.deepEqual(manifest, { href: "./control-page.html", title: "Open read-only control view", }, + { + id: "workflow-overview", + href: "./workflow-overview.html", + title: "Open shell handoff overview", + }, ], targetPages: [ { @@ -101,6 +106,10 @@ assert.deepEqual(manifest, { entryId: "control-view", href: "./control-page.html", }, + { + entryId: "workflow-overview", + href: "./workflow-overview.html", + }, ], controlPageApiMethods: createControlPageBrowserApiMethods(), persistenceCapabilities: [ diff --git a/wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.mjs b/wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.mjs index 3cc6223..47c6b26 100644 --- a/wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.mjs +++ b/wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.mjs @@ -159,8 +159,8 @@ assert.deepEqual(readiness, { }, missing: [], counts: { - pages: 2, - launcherLinks: 2, + pages: 3, + launcherLinks: 3, launchMethods: 39, controlPageMethods: 11, persistenceCapabilities: 3, @@ -221,8 +221,8 @@ assert.deepEqual(handoffSummary, { phase: "ready", missing: [], counts: { - pages: 2, - launcherLinks: 2, + pages: 3, + launcherLinks: 3, launchMethods: 39, controlPageMethods: 11, persistenceCapabilities: 3, @@ -1156,8 +1156,8 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), { }, missing: ["launchCompatibility"], counts: { - pages: 2, - launcherLinks: 2, + pages: 3, + launcherLinks: 3, launchMethods: 39, controlPageMethods: 11, persistenceCapabilities: 3, diff --git a/wasm-port/tests/ui/node/verify_ini_panel_ui_shell.mjs b/wasm-port/tests/ui/node/verify_ini_panel_ui_shell.mjs index 15cf04d..ac78f26 100644 --- a/wasm-port/tests/ui/node/verify_ini_panel_ui_shell.mjs +++ b/wasm-port/tests/ui/node/verify_ini_panel_ui_shell.mjs @@ -153,6 +153,11 @@ assert.deepEqual(createIniPanelLauncherLinkViewModel(), [ href: "./control-page.html", label: "Open read-only control view", }, + { + entryId: "workflow-overview", + href: "./workflow-overview.html", + label: "Open shell handoff overview", + }, ]); const launcherLinks = createIniPanelLauncherLinkViewModel(); launcherLinks[0].label = "changed"; @@ -169,6 +174,11 @@ assert.deepEqual(shellViewModel.pages, [ href: "./control-page.html", title: "Open read-only control view", }, + { + id: "workflow-overview", + href: "./workflow-overview.html", + title: "Open shell handoff overview", + }, ]); assert.deepEqual(shellViewModel.launcherLinks, createIniPanelLauncherLinkViewModel()); assert.deepEqual(shellViewModel.shellIntegrationSchema, createIniPanelShellIntegrationSchema());