diff --git a/text13.txt b/text13.txt index 91c2dba..48971ce 100644 --- a/text13.txt +++ b/text13.txt @@ -807,3 +807,103 @@ host_wasm_opfs_browser_smokes=ok `createIniPanelShellSessionHandoffPackage()` 或等价 helper,把 snapshot、render-state、 action-plan、checklist 和 launch/control method manifests 打包成单次 browser shell 可读取的 handoff package,并补真实 browser workflow smoke;仍保持只读,不新增控制按钮,不解析 G-code。 + +七、2026-06-15 继续执行记录:INI panel shell handoff package + +本轮按“第一原则:加快实质性推进”继续推进 browser/UI workflow 与 OPFS/session persistence +的交界,新增只读 shell handoff package helper,把外部 shell 需要的 handoff artifacts 和方法 +manifest 聚合成单次 browser API 读取。 + +完成内容: + +- `ui-shell.js` 新增 `createIniPanelShellSessionHandoffPackage()`; +- package 输出: + - `apiName: "ini-panel-shell-session-handoff-package"`; + - `packageVersion: 1`; + - `phase`; + - `ready`; + - `statusLine`; + - `manifests.shellIntegration`; + - `manifests.launchApi`; + - `manifests.controlPageApi`; + - `manifests.launchMethods`; + - `manifests.controlPageMethods`; + - `snapshot`; + - `renderState`; + - `actionPlan`; + - `checklist`; +- `createIniPanelShellViewModel()` 新增: + - `shellSessionHandoffPackage`; + - `createShellSessionHandoffPackage`; +- `createIniPanelLaunchApiManifest().methods` 新增 + `getShellSessionHandoffPackage`; +- `launch.html` 的 `window.linuxCncIniPanelLaunchApi` 新增真实 browser 入口 + `getShellSessionHandoffPackage()`; +- `ini_panel_launch_smoke.html` 校验真实 launch iframe: + - package version 为 1; + - package `ready === true`; + - package launch methods 包含 `getShellSessionHandoffPackage`; + - package control methods 包含 `readControlPageStatus`; + - package checklist 与独立 checklist API 一致; +- `ini_panel_shell_integration_workflow_smoke.html` 校验外部 shell workflow 能单次读取 + package,并确认 checklist、action-plan 与 control-page methods; +- `verify_ini_panel_shell_integration_manifest.mjs` 覆盖: + - ready package 完整 shape; + - default package 包含新增 launch method; +- `verify_ini_panel_ui_shell.mjs` 覆盖 shell view-model 的 package 聚合关系; +- `verify_ini_panel_launch_api_manifest.mjs`、`verify_ini_panel_entry_docs.mjs` 与 + `docs/panel-entry.md` 同步记录和校验新 helper/API; +- 未新增控制按钮; +- 未执行 action-plan; +- 未解析 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 +``` + +下一步建议: + +继续推进 browser/UI workflow。下一批建议新增一个只读 +`createIniPanelShellSessionHandoffPackageSchema()` 与 +`isSupportedIniPanelShellSessionHandoffPackage()`,为 package 增加 versioned schema 与 focused +compatibility predicate,便于外部 shell 在消费 package 前做单点兼容性检查;仍保持只读,不新增 +控制按钮,不解析 G-code。 diff --git a/wasm-port/docs/panel-entry.md b/wasm-port/docs/panel-entry.md index 251fcbd..549445e 100644 --- a/wasm-port/docs/panel-entry.md +++ b/wasm-port/docs/panel-entry.md @@ -25,6 +25,7 @@ import { createIniPanelShellSessionHandoffChecklist, createIniPanelShellSessionHandoffCompatibilityReport, createIniPanelShellSessionHandoffDisplayViewModel, + createIniPanelShellSessionHandoffPackage, createIniPanelShellSessionHandoffRenderState, createIniPanelShellSessionHandoffSnapshot, createIniPanelShellSessionHandoffSummary, @@ -179,6 +180,11 @@ shell needs the same handoff state as stable health rows for display: render state, target page, load-session method, read-status method, blocking reasons, display rows, and next step ids. The checklist is read-only and does not execute the action plan. +Use `createIniPanelShellSessionHandoffPackage()` or +`linuxCncIniPanelLaunchApi.getShellSessionHandoffPackage()` when an outer shell +needs one browser API read containing the launch/control method manifests, +snapshot, render-state, action-plan, and checklist. The package is a read-only +handoff artifact and does not execute action-plan steps. 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 d89c825..05c0578 100644 --- a/wasm-port/runtime/ui/ini-panel/launch.html +++ b/wasm-port/runtime/ui/ini-panel/launch.html @@ -146,6 +146,7 @@ getShellSessionHandoffRenderState: () => shellViewModel.shellSessionHandoffRenderState, getShellSessionHandoffActionPlan: () => shellViewModel.shellSessionHandoffActionPlan, getShellSessionHandoffChecklist: () => shellViewModel.shellSessionHandoffChecklist, + getShellSessionHandoffPackage: () => shellViewModel.shellSessionHandoffPackage, getLauncherLinks: () => shellViewModel.launcherLinks, getControlPageApiMethods: () => shellViewModel.controlPage.browserApiMethods, }; diff --git a/wasm-port/runtime/ui/ini-panel/ui-shell.js b/wasm-port/runtime/ui/ini-panel/ui-shell.js index d612f1d..6aa0fb0 100644 --- a/wasm-port/runtime/ui/ini-panel/ui-shell.js +++ b/wasm-port/runtime/ui/ini-panel/ui-shell.js @@ -135,6 +135,7 @@ export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntr "getShellSessionHandoffRenderState", "getShellSessionHandoffActionPlan", "getShellSessionHandoffChecklist", + "getShellSessionHandoffPackage", "getLauncherLinks", "getControlPageApiMethods", ], @@ -715,6 +716,35 @@ export function createIniPanelShellSessionHandoffChecklist({ }; } +export function createIniPanelShellSessionHandoffPackage({ + shellIntegrationManifest = createIniPanelShellIntegrationManifest(), + launchApiManifest = shellIntegrationManifest.launchApiManifest ?? createIniPanelLaunchApiManifest(), + controlPageApiManifest = shellIntegrationManifest.controlPageApiManifest ?? createControlPageBrowserApiManifest(), + snapshot = createIniPanelShellSessionHandoffSnapshot(), + renderState = createIniPanelShellSessionHandoffRenderState(snapshot), + actionPlan = createIniPanelShellSessionHandoffActionPlan({ snapshot, renderState }), + checklist = createIniPanelShellSessionHandoffChecklist({ actionPlan, renderState }), +} = {}) { + return { + apiName: "ini-panel-shell-session-handoff-package", + packageVersion: 1, + phase: checklist.phase, + ready: Boolean(checklist.ready), + statusLine: checklist.statusLine, + manifests: { + shellIntegration: shellIntegrationManifest, + launchApi: launchApiManifest, + controlPageApi: controlPageApiManifest, + launchMethods: Array.isArray(launchApiManifest?.methods) ? [...launchApiManifest.methods] : [], + controlPageMethods: Array.isArray(controlPageApiManifest?.methods) ? [...controlPageApiManifest.methods] : [], + }, + snapshot, + renderState, + actionPlan, + checklist, + }; +} + export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries()) { const shellIntegrationManifest = createIniPanelShellIntegrationManifest(entries); const shellIntegrationReadiness = createIniPanelShellIntegrationReadiness(shellIntegrationManifest); @@ -750,6 +780,15 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries actionPlan: shellSessionHandoffActionPlan, renderState: shellSessionHandoffRenderState, }); + const shellSessionHandoffPackage = createIniPanelShellSessionHandoffPackage({ + shellIntegrationManifest, + launchApiManifest: shellIntegrationManifest.launchApiManifest, + controlPageApiManifest: shellIntegrationManifest.controlPageApiManifest, + snapshot: shellSessionHandoffSnapshot, + renderState: shellSessionHandoffRenderState, + actionPlan: shellSessionHandoffActionPlan, + checklist: shellSessionHandoffChecklist, + }); return { pages: entries.map(({ id, href, title }) => ({ id, @@ -769,6 +808,7 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries shellSessionHandoffRenderState, shellSessionHandoffActionPlan, shellSessionHandoffChecklist, + shellSessionHandoffPackage, launchApiSchema: createIniPanelLaunchApiSchema(), launchApiManifest: createIniPanelLaunchApiManifest(entries), isSupportedShellIntegrationManifest: isSupportedIniPanelShellIntegrationManifest, @@ -783,6 +823,7 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries createShellSessionHandoffRenderState: createIniPanelShellSessionHandoffRenderState, createShellSessionHandoffActionPlan: createIniPanelShellSessionHandoffActionPlan, createShellSessionHandoffChecklist: createIniPanelShellSessionHandoffChecklist, + createShellSessionHandoffPackage: createIniPanelShellSessionHandoffPackage, controlPage: { browserApiSchema: createControlPageBrowserApiSchema(), browserApiManifest: createControlPageBrowserApiManifest(), diff --git a/wasm-port/tests/browser/ini_panel_launch_smoke.html b/wasm-port/tests/browser/ini_panel_launch_smoke.html index 058df48..fa6cd58 100644 --- a/wasm-port/tests/browser/ini_panel_launch_smoke.html +++ b/wasm-port/tests/browser/ini_panel_launch_smoke.html @@ -82,6 +82,7 @@ !launchApi?.getShellSessionHandoffRenderState || !launchApi?.getShellSessionHandoffActionPlan || !launchApi?.getShellSessionHandoffChecklist || + !launchApi?.getShellSessionHandoffPackage || !launchApi?.getLauncherLinks || !launchApi?.getControlPageApiMethods ) { @@ -121,7 +122,7 @@ ); assertEqual( launchApiManifest.methods.join(","), - "isSupportedLaunchApiManifest,getLaunchApiSchema,getLaunchApiManifest,getShellIntegrationSchema,getShellIntegrationManifest,getShellIntegrationReadiness,getShellSessionHandoffSummarySchema,getShellSessionHandoffSummary,isSupportedShellSessionHandoffSummary,getShellSessionHandoffCompatibilityReport,getShellSessionHandoffDisplayViewModel,getShellSessionHandoffSnapshot,getShellSessionHandoffRenderState,getShellSessionHandoffActionPlan,getShellSessionHandoffChecklist,getLauncherLinks,getControlPageApiMethods", + "isSupportedLaunchApiManifest,getLaunchApiSchema,getLaunchApiManifest,getShellIntegrationSchema,getShellIntegrationManifest,getShellIntegrationReadiness,getShellSessionHandoffSummarySchema,getShellSessionHandoffSummary,isSupportedShellSessionHandoffSummary,getShellSessionHandoffCompatibilityReport,getShellSessionHandoffDisplayViewModel,getShellSessionHandoffSnapshot,getShellSessionHandoffRenderState,getShellSessionHandoffActionPlan,getShellSessionHandoffChecklist,getShellSessionHandoffPackage,getLauncherLinks,getControlPageApiMethods", "launch API manifest methods", ); const shellIntegrationSchema = launchApi.getShellIntegrationSchema(); @@ -135,6 +136,7 @@ const shellSessionHandoffRenderState = launchApi.getShellSessionHandoffRenderState(); const shellSessionHandoffActionPlan = launchApi.getShellSessionHandoffActionPlan(); const shellSessionHandoffChecklist = launchApi.getShellSessionHandoffChecklist(); + const shellSessionHandoffPackage = launchApi.getShellSessionHandoffPackage(); assertEqual( shellIntegrationSchema.manifestVersion, 1, @@ -285,6 +287,26 @@ "open-control-page,read-readonly-status", "shell session handoff checklist next step ids", ); + assertEqual( + shellSessionHandoffPackage.packageVersion, + 1, + "shell session handoff package version", + ); + assertEqual( + shellSessionHandoffPackage.ready, + true, + "shell session handoff package readiness", + ); + assertEqual( + shellSessionHandoffPackage.manifests.launchMethods.includes("getShellSessionHandoffPackage"), + true, + "shell session handoff package launch methods", + ); + assertEqual( + shellSessionHandoffPackage.manifests.controlPageMethods.includes("readControlPageStatus"), + true, + "shell session handoff package control methods", + ); assertEqual( JSON.stringify(shellSessionHandoffSnapshot.readiness), JSON.stringify(shellIntegrationReadiness), @@ -315,6 +337,11 @@ JSON.stringify(shellSessionHandoffRenderState.rows), "shell session handoff checklist rows", ); + assertEqual( + JSON.stringify(shellSessionHandoffPackage.checklist), + JSON.stringify(shellSessionHandoffChecklist), + "shell session handoff package checklist", + ); assertEqual( launchDoc.querySelector("[data-handoff-status]").textContent, "Ready: No blocking reasons", 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 index 127dbca..5bd2275 100644 --- a/wasm-port/tests/browser/ini_panel_shell_integration_workflow_smoke.html +++ b/wasm-port/tests/browser/ini_panel_shell_integration_workflow_smoke.html @@ -72,7 +72,8 @@ TOOL_TABLE = browser-shell-tool.tbl !launchApi?.getShellSessionHandoffSnapshot || !launchApi?.getShellSessionHandoffRenderState || !launchApi?.getShellSessionHandoffActionPlan || - !launchApi?.getShellSessionHandoffChecklist + !launchApi?.getShellSessionHandoffChecklist || + !launchApi?.getShellSessionHandoffPackage ) { throw new Error("launch API namespace did not expose shell integration helpers"); } @@ -87,6 +88,7 @@ TOOL_TABLE = browser-shell-tool.tbl const handoffRenderState = launchApi.getShellSessionHandoffRenderState(); const handoffActionPlan = launchApi.getShellSessionHandoffActionPlan(); const handoffChecklist = launchApi.getShellSessionHandoffChecklist(); + const handoffPackage = launchApi.getShellSessionHandoffPackage(); assertEqual(handoffSummarySchema.summaryVersion, 1, "shell handoff summary schema version"); assertEqual( launchApi.isSupportedShellSessionHandoffSummary(handoffSummary), @@ -122,6 +124,18 @@ TOOL_TABLE = browser-shell-tool.tbl "open-control-page,read-readonly-status", "shell handoff checklist next steps", ); + assertEqual(handoffPackage.ready, true, "shell handoff package readiness"); + assertEqual(handoffPackage.checklist.ready, handoffChecklist.ready, "shell handoff package checklist"); + assertEqual( + handoffPackage.actionPlan.nextSteps.map(({ id }) => id).join(","), + handoffActionPlan.nextSteps.map(({ id }) => id).join(","), + "shell handoff package action-plan", + ); + assertEqual( + handoffPackage.manifests.controlPageMethods.includes("readControlPageStatus"), + true, + "shell handoff package control method", + ); assertEqual(readiness.phase, "ready", "shell integration readiness phase"); assertEqual(readiness.ready, true, "shell integration readiness"); assertEqual(readiness.missing.join(","), "", "shell integration readiness missing checks"); 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 0e636ff..92d7aa8 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 @@ -22,6 +22,7 @@ import { createIniPanelShellSessionHandoffChecklist, createIniPanelShellSessionHandoffCompatibilityReport, createIniPanelShellSessionHandoffDisplayViewModel, + createIniPanelShellSessionHandoffPackage, createIniPanelShellSessionHandoffRenderState, createIniPanelShellSessionHandoffSnapshot, createIniPanelShellSessionHandoffSummary, @@ -78,6 +79,7 @@ const requiredShellExports = [ "createIniPanelShellSessionHandoffChecklist", "createIniPanelShellSessionHandoffCompatibilityReport", "createIniPanelShellSessionHandoffDisplayViewModel", + "createIniPanelShellSessionHandoffPackage", "createIniPanelShellSessionHandoffRenderState", "createIniPanelShellSessionHandoffSnapshot", "createIniPanelShellSessionHandoffSummary", @@ -208,6 +210,18 @@ assert.deepEqual( renderState: createIniPanelShellViewModel().shellSessionHandoffRenderState, }), ); +assert.deepEqual( + createIniPanelShellViewModel().shellSessionHandoffPackage, + createIniPanelShellSessionHandoffPackage({ + shellIntegrationManifest: createIniPanelShellViewModel().shellIntegrationManifest, + launchApiManifest: createIniPanelShellViewModel().shellIntegrationManifest.launchApiManifest, + controlPageApiManifest: createIniPanelShellViewModel().shellIntegrationManifest.controlPageApiManifest, + snapshot: createIniPanelShellViewModel().shellSessionHandoffSnapshot, + renderState: createIniPanelShellViewModel().shellSessionHandoffRenderState, + actionPlan: createIniPanelShellViewModel().shellSessionHandoffActionPlan, + checklist: createIniPanelShellViewModel().shellSessionHandoffChecklist, + }), +); assert.equal(isSupportedIniPanelShellIntegrationManifest(createIniPanelShellViewModel().shellIntegrationManifest), true); assert.deepEqual(createIniPanelShellViewModel().launchApiSchema, createIniPanelLaunchApiSchema()); assert.deepEqual(createIniPanelShellViewModel().launchApiManifest, createIniPanelLaunchApiManifest()); @@ -266,6 +280,7 @@ assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffActi assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffChecklist\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffCompatibilityReport\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffDisplayViewModel\b/); +assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackage\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffRenderState\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSnapshot\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSummary\b/); @@ -294,6 +309,7 @@ assert.match(launchText, /\bgetShellSessionHandoffSnapshot\b/); assert.match(launchText, /\bgetShellSessionHandoffRenderState\b/); assert.match(launchText, /\bgetShellSessionHandoffActionPlan\b/); assert.match(launchText, /\bgetShellSessionHandoffChecklist\b/); +assert.match(launchText, /\bgetShellSessionHandoffPackage\b/); assert.match(launchText, /\bdata-handoff-shell\b/); assert.match(launchText, /\bdata-handoff-status\b/); assert.match(launchText, /\bdata-handoff-rows\b/); @@ -319,6 +335,7 @@ assert.match(docText, /\bcreateIniPanelShellSessionHandoffActionPlan\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffChecklist\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffCompatibilityReport\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffDisplayViewModel\b/); +assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackage\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffRenderState\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffSnapshot\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffSummary\b/); @@ -342,6 +359,7 @@ assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffSnapsh assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffRenderState\b/); assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffActionPlan\b/); assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffChecklist\b/); +assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffPackage\b/); assert.match(docText, /\bdata-handoff-shell\b/); assert.match(docText, /\bdata-handoff-status\b/); assert.match(docText, /\bdata-handoff-rows\b/); @@ -357,6 +375,7 @@ assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffSnapsho assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffRenderState\b/); assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffActionPlan\b/); assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffChecklist\b/); +assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffPackage\b/); assert.match(shellIntegrationWorkflowSmokeText, /\bhandoffSummary\.handoffMethods\.readStatus\b/); assert.match(shellIntegrationWorkflowSmokeText, /\breadControlPageStatus\b/); assert.match(shellIntegrationWorkflowSmokeText, /\bbrowser_ini_shell_integration_workflow_smoke=ok\b/); 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 39821ae..5198b85 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 @@ -55,6 +55,7 @@ assert.deepEqual(manifest, { "getShellSessionHandoffRenderState", "getShellSessionHandoffActionPlan", "getShellSessionHandoffChecklist", + "getShellSessionHandoffPackage", "getLauncherLinks", "getControlPageApiMethods", ], @@ -164,6 +165,7 @@ assert.match(launchText, /\bgetShellSessionHandoffSnapshot\b/); assert.match(launchText, /\bgetShellSessionHandoffRenderState\b/); assert.match(launchText, /\bgetShellSessionHandoffActionPlan\b/); assert.match(launchText, /\bgetShellSessionHandoffChecklist\b/); +assert.match(launchText, /\bgetShellSessionHandoffPackage\b/); assert.match(launchText, /\blinuxCncIniPanelLaunchApi\b/); console.log("ini_panel_launch_api_manifest_node_smoke=ok"); 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 bf3653f..14f7047 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 @@ -18,6 +18,7 @@ import { createIniPanelShellSessionHandoffChecklist, createIniPanelShellSessionHandoffCompatibilityReport, createIniPanelShellSessionHandoffDisplayViewModel, + createIniPanelShellSessionHandoffPackage, createIniPanelShellSessionHandoffRenderState, createIniPanelShellSessionHandoffSnapshot, createIniPanelShellSessionHandoffSummary, @@ -56,6 +57,15 @@ const handoffChecklist = createIniPanelShellSessionHandoffChecklist({ actionPlan: handoffActionPlan, renderState: handoffRenderState, }); +const handoffPackage = createIniPanelShellSessionHandoffPackage({ + shellIntegrationManifest: manifest, + launchApiManifest: manifest.launchApiManifest, + controlPageApiManifest: manifest.controlPageApiManifest, + snapshot: handoffSnapshot, + renderState: handoffRenderState, + actionPlan: handoffActionPlan, + checklist: handoffChecklist, +}); assert.deepEqual(schema, { apiName: "ini-panel-shell-integration", @@ -111,7 +121,7 @@ assert.deepEqual(readiness, { counts: { pages: 2, launcherLinks: 2, - launchMethods: 17, + launchMethods: 18, controlPageMethods: 11, persistenceCapabilities: 3, }, @@ -173,7 +183,7 @@ assert.deepEqual(handoffSummary, { counts: { pages: 2, launcherLinks: 2, - launchMethods: 17, + launchMethods: 18, controlPageMethods: 11, persistenceCapabilities: 3, }, @@ -414,10 +424,29 @@ assert.deepEqual(handoffChecklist, { nextStepIds: ["open-control-page", "read-readonly-status"], blockingReasons: [], }); +assert.deepEqual(handoffPackage, { + apiName: "ini-panel-shell-session-handoff-package", + packageVersion: 1, + phase: "ready", + ready: true, + statusLine: "Ready: No blocking reasons", + manifests: { + shellIntegration: manifest, + launchApi: manifest.launchApiManifest, + controlPageApi: manifest.controlPageApiManifest, + launchMethods: manifest.launchApiManifest.methods, + controlPageMethods: manifest.controlPageApiManifest.methods, + }, + snapshot: handoffSnapshot, + renderState: handoffRenderState, + actionPlan: handoffActionPlan, + checklist: handoffChecklist, +}); assert.equal(createIniPanelShellSessionHandoffSnapshot().displayViewModel.rows.length, 5); assert.equal(createIniPanelShellSessionHandoffRenderState().statusLine, "Ready: No blocking reasons"); assert.equal(createIniPanelShellSessionHandoffActionPlan().nextSteps.length, 2); assert.equal(createIniPanelShellSessionHandoffChecklist().checks.length, 5); +assert.equal(createIniPanelShellSessionHandoffPackage().manifests.launchMethods.includes("getShellSessionHandoffPackage"), true); assert.deepEqual( createIniPanelShellSessionHandoffDisplayViewModel( createIniPanelShellSessionHandoffCompatibilityReport({ ...handoffSummary, summaryVersion: 2 }), @@ -634,7 +663,7 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), { counts: { pages: 2, launcherLinks: 2, - launchMethods: 17, + launchMethods: 18, controlPageMethods: 11, persistenceCapabilities: 3, }, @@ -798,6 +827,7 @@ assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffActi assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffChecklist\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffCompatibilityReport\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffDisplayViewModel\b/); +assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackage\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffRenderState\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSnapshot\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSummary\b/); @@ -814,6 +844,7 @@ assert.match(docText, /\bcreateIniPanelShellSessionHandoffActionPlan\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffChecklist\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffCompatibilityReport\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffDisplayViewModel\b/); +assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackage\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffRenderState\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffSnapshot\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffSummary\b/); 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 df2a5a1..761b20b 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 @@ -18,6 +18,7 @@ import { createIniPanelShellSessionHandoffChecklist, createIniPanelShellSessionHandoffCompatibilityReport, createIniPanelShellSessionHandoffDisplayViewModel, + createIniPanelShellSessionHandoffPackage, createIniPanelShellSessionHandoffRenderState, createIniPanelShellSessionHandoffSnapshot, createIniPanelShellSessionHandoffSummary, @@ -79,6 +80,7 @@ assert.equal(typeof createIniPanelShellSessionHandoffActionPlan, "function"); assert.equal(typeof createIniPanelShellSessionHandoffChecklist, "function"); assert.equal(typeof createIniPanelShellSessionHandoffCompatibilityReport, "function"); assert.equal(typeof createIniPanelShellSessionHandoffDisplayViewModel, "function"); +assert.equal(typeof createIniPanelShellSessionHandoffPackage, "function"); assert.equal(typeof createIniPanelShellSessionHandoffRenderState, "function"); assert.equal(typeof createIniPanelShellSessionHandoffSnapshot, "function"); assert.equal(typeof createIniPanelShellSessionHandoffSummary, "function"); @@ -185,6 +187,18 @@ assert.deepEqual( renderState: shellViewModel.shellSessionHandoffRenderState, }), ); +assert.deepEqual( + shellViewModel.shellSessionHandoffPackage, + createIniPanelShellSessionHandoffPackage({ + shellIntegrationManifest: shellViewModel.shellIntegrationManifest, + launchApiManifest: shellViewModel.shellIntegrationManifest.launchApiManifest, + controlPageApiManifest: shellViewModel.shellIntegrationManifest.controlPageApiManifest, + snapshot: shellViewModel.shellSessionHandoffSnapshot, + renderState: shellViewModel.shellSessionHandoffRenderState, + actionPlan: shellViewModel.shellSessionHandoffActionPlan, + checklist: shellViewModel.shellSessionHandoffChecklist, + }), +); assert.deepEqual(shellViewModel.shellSessionHandoffDisplayViewModel, { phase: "ready", title: "Shell handoff compatibility", @@ -310,6 +324,24 @@ assert.deepEqual(shellViewModel.shellSessionHandoffChecklist, { nextStepIds: ["open-control-page", "read-readonly-status"], blockingReasons: [], }); +assert.deepEqual(shellViewModel.shellSessionHandoffPackage, { + apiName: "ini-panel-shell-session-handoff-package", + packageVersion: 1, + phase: "ready", + ready: true, + statusLine: "Ready: No blocking reasons", + manifests: { + shellIntegration: shellViewModel.shellIntegrationManifest, + launchApi: shellViewModel.shellIntegrationManifest.launchApiManifest, + controlPageApi: shellViewModel.shellIntegrationManifest.controlPageApiManifest, + launchMethods: shellViewModel.shellIntegrationManifest.launchApiManifest.methods, + controlPageMethods: shellViewModel.shellIntegrationManifest.controlPageApiManifest.methods, + }, + snapshot: shellViewModel.shellSessionHandoffSnapshot, + renderState: shellViewModel.shellSessionHandoffRenderState, + actionPlan: shellViewModel.shellSessionHandoffActionPlan, + checklist: shellViewModel.shellSessionHandoffChecklist, +}); assert.equal( isSupportedIniPanelShellIntegrationManifest(shellViewModel.shellIntegrationManifest), true, @@ -357,6 +389,7 @@ assert.equal(shellViewModel.createShellSessionHandoffSnapshot, createIniPanelShe assert.equal(shellViewModel.createShellSessionHandoffRenderState, createIniPanelShellSessionHandoffRenderState); assert.equal(shellViewModel.createShellSessionHandoffActionPlan, createIniPanelShellSessionHandoffActionPlan); assert.equal(shellViewModel.createShellSessionHandoffChecklist, createIniPanelShellSessionHandoffChecklist); +assert.equal(shellViewModel.createShellSessionHandoffPackage, createIniPanelShellSessionHandoffPackage); assert.deepEqual(shellViewModel.controlPage.contract, createIniPanelShellControlPageContract()); assert.equal(shellViewModel.controlPage.isSupportedBrowserApiManifest, isSupportedIniPanelControlPageApiManifest); assert.equal(shellViewModel.controlPage.loadSessionState, loadMachineSessionForControlPageWorkflow);