diff --git a/text12.txt b/text12.txt index 72b8e0e..e7cb7b7 100644 --- a/text12.txt +++ b/text12.txt @@ -2407,3 +2407,85 @@ host_wasm_opfs_browser_smokes=ok render-state helper,把 mount-state checks 压缩为外部 shell 可直接显示的 rows,并在 shell integration browser workflow 中校验 waiting/ready mount-state 显示;仍保持只读,不新增控制按钮, 不解析 G-code。 + +三十、2026-06-15 继续执行记录:INI panel shell handoff mount-state display/render-state + +本轮按“第一原则:加快实质性推进”继续推进 browser/UI workflow 与 SDK/API surface,新增 +mount-state display view-model 与 render-state,让外部 shell 可直接显示 waiting/ready mount-state +checks。 + +完成内容: + +- `ui-shell.js` 新增 `createIniPanelShellSessionHandoffPackageMountDisplayViewModel()`; +- `ui-shell.js` 新增 `createIniPanelShellSessionHandoffPackageMountRenderState()`; +- `createIniPanelShellViewModel()` 新增: + - `shellSessionHandoffPackageMountDisplayViewModel`; + - `shellSessionHandoffPackageMountRenderState`; +- shell view-model 暴露: + - `createShellSessionHandoffPackageMountDisplayViewModel`; + - `createShellSessionHandoffPackageMountRenderState`; +- `createIniPanelLaunchApiManifest().methods` 新增: + - `getShellSessionHandoffPackageMountDisplayViewModel`; + - `getShellSessionHandoffPackageMountRenderState`; +- `launch.html` 的 `window.linuxCncIniPanelLaunchApi` 新增真实 browser 入口: + - `getShellSessionHandoffPackageMountDisplayViewModel(mountState?)`; + - `getShellSessionHandoffPackageMountRenderState(mountState?)`; +- `ini_panel_launch_smoke.html` 校验默认 waiting mount-state 的 display detail 与 render status; +- `ini_panel_shell_integration_workflow_smoke.html` 在真实 control page iframe ready 后校验 ready + mount display/render-state; +- `verify_ini_panel_ui_shell.mjs` 覆盖 helper 导出、shell view-model 字段、waiting display/render + state 与 ready display; +- `verify_ini_panel_shell_integration_manifest.mjs` 覆盖 waiting/ready mount render-state; +- `verify_ini_panel_launch_api_manifest.mjs` 覆盖 launch manifest 与 launch page API 暴露; +- `verify_ini_panel_entry_docs.mjs` 与 `docs/panel-entry.md` 同步记录和校验新 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_shell_integration_manifest.sh +wasm-port/tests/ui/node/verify_ini_panel_launch_api_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_shell_integration_manifest_node_smoke=ok +ini_panel_launch_api_manifest_node_smoke=ok +ini_panel_entry_docs_node_smoke=ok +browser_ini_opfs_smoke=ok +browser_ini_control_page_smoke=ok +browser_ini_launch_smoke=ok +browser_ini_shell_integration_workflow_smoke=ok +ui_node_smokes=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 与 OPFS/session persistence。下一批建议把 mount render-state 接入 +launch 页面一个独立的 `[data-handoff-mount-*]` 只读区域,或在 shell integration workflow 中增加 +mount-state ready DOM rendering smoke;仍保持只读,不新增控制按钮,不解析 G-code。 diff --git a/wasm-port/docs/panel-entry.md b/wasm-port/docs/panel-entry.md index c19ae81..bcda879 100644 --- a/wasm-port/docs/panel-entry.md +++ b/wasm-port/docs/panel-entry.md @@ -27,6 +27,8 @@ import { createIniPanelShellSessionHandoffDisplayViewModel, createIniPanelShellSessionHandoffPackage, createIniPanelShellSessionHandoffPackageDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountRenderState, createIniPanelShellSessionHandoffPackageMountState, createIniPanelShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageRenderState, @@ -216,6 +218,13 @@ Use `createIniPanelShellSessionHandoffPackageMountState()` or outer shell needs one read-only mount-state that combines package render-state, the control-page target, required readonly methods, and the current control-page session readiness snapshot. +Use `createIniPanelShellSessionHandoffPackageMountDisplayViewModel()` or +`linuxCncIniPanelLaunchApi.getShellSessionHandoffPackageMountDisplayViewModel()` +when an outer shell needs mount-state checks as stable read-only label/value +rows. Use `createIniPanelShellSessionHandoffPackageMountRenderState()` or +`linuxCncIniPanelLaunchApi.getShellSessionHandoffPackageMountRenderState()` +when those rows need a status line and `[data-handoff-shell]` style dataset +flags for DOM rendering. 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 9768e9f..d5463d9 100644 --- a/wasm-port/runtime/ui/ini-panel/launch.html +++ b/wasm-port/runtime/ui/ini-panel/launch.html @@ -161,6 +161,18 @@ }) : shellViewModel.shellSessionHandoffPackageMountState ), + getShellSessionHandoffPackageMountDisplayViewModel: (mountState) => ( + shellViewModel.createShellSessionHandoffPackageMountDisplayViewModel( + mountState ?? shellViewModel.shellSessionHandoffPackageMountState, + ) + ), + getShellSessionHandoffPackageMountRenderState: (mountState) => ( + shellViewModel.createShellSessionHandoffPackageMountRenderState( + shellViewModel.createShellSessionHandoffPackageMountDisplayViewModel( + mountState ?? shellViewModel.shellSessionHandoffPackageMountState, + ), + ) + ), isSupportedShellSessionHandoffPackage: shellViewModel.isSupportedShellSessionHandoffPackage, 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 e6b81a9..eebc748 100644 --- a/wasm-port/runtime/ui/ini-panel/ui-shell.js +++ b/wasm-port/runtime/ui/ini-panel/ui-shell.js @@ -141,6 +141,8 @@ export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntr "getShellSessionHandoffPackageDisplayViewModel", "getShellSessionHandoffPackageRenderState", "getShellSessionHandoffPackageMountState", + "getShellSessionHandoffPackageMountDisplayViewModel", + "getShellSessionHandoffPackageMountRenderState", "isSupportedShellSessionHandoffPackage", "getLauncherLinks", "getControlPageApiMethods", @@ -1018,6 +1020,64 @@ export function createIniPanelShellSessionHandoffPackageMountState({ }; } +export function createIniPanelShellSessionHandoffPackageMountDisplayViewModel( + mountState = createIniPanelShellSessionHandoffPackageMountState(), +) { + const checks = Array.isArray(mountState?.checks) ? mountState.checks : []; + const blockingChecks = checks.filter(({ status }) => status !== "pass"); + const blockingReasons = Array.isArray(mountState?.blockingReasons) ? mountState.blockingReasons : []; + const problems = [ + ...blockingReasons, + ...blockingChecks.map(({ id }) => id), + ]; + + return { + phase: mountState?.phase === "ready" ? "ready" : "blocked", + title: "Shell handoff mount", + statusText: mountState?.ready ? "Ready" : "Blocked", + detailText: problems.length === 0 ? "No blocking reasons" : problems.join(", "), + rows: checks.map(({ id, label, status, value }) => ({ + id, + label, + value, + status, + })), + }; +} + +export function createIniPanelShellSessionHandoffPackageMountRenderState( + displayViewModel = createIniPanelShellSessionHandoffPackageMountDisplayViewModel(), +) { + const rows = Array.isArray(displayViewModel?.rows) + ? displayViewModel.rows.map(({ id, label, value, status }) => ({ + id, + label, + value: value == null ? "" : String(value), + status: status ?? "blocked", + })) + : []; + const ready = displayViewModel?.phase === "ready" && displayViewModel?.statusText === "Ready"; + const statusText = displayViewModel?.statusText ?? (ready ? "Ready" : "Blocked"); + const detailText = displayViewModel?.detailText ?? "No blocking reasons"; + + return { + apiName: "ini-panel-shell-session-handoff-package-mount-render-state", + renderStateVersion: 1, + phase: ready ? "ready" : "blocked", + ready, + title: displayViewModel?.title ?? "Shell handoff mount", + statusText, + detailText, + statusLine: `${statusText}: ${detailText}`, + rows, + dataset: { + handoffPhase: ready ? "ready" : "blocked", + handoffReady: ready ? "true" : "false", + handoffScope: "mount", + }, + }; +} + export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries()) { const shellIntegrationManifest = createIniPanelShellIntegrationManifest(entries); const shellIntegrationReadiness = createIniPanelShellIntegrationReadiness(shellIntegrationManifest); @@ -1075,6 +1135,12 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries handoffPackage: shellSessionHandoffPackage, packageRenderState: shellSessionHandoffPackageRenderState, }); + const shellSessionHandoffPackageMountDisplayViewModel = createIniPanelShellSessionHandoffPackageMountDisplayViewModel( + shellSessionHandoffPackageMountState, + ); + const shellSessionHandoffPackageMountRenderState = createIniPanelShellSessionHandoffPackageMountRenderState( + shellSessionHandoffPackageMountDisplayViewModel, + ); return { pages: entries.map(({ id, href, title }) => ({ id, @@ -1100,6 +1166,8 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries shellSessionHandoffPackageDisplayViewModel, shellSessionHandoffPackageRenderState, shellSessionHandoffPackageMountState, + shellSessionHandoffPackageMountDisplayViewModel, + shellSessionHandoffPackageMountRenderState, launchApiSchema: createIniPanelLaunchApiSchema(), launchApiManifest: createIniPanelLaunchApiManifest(entries), isSupportedShellIntegrationManifest: isSupportedIniPanelShellIntegrationManifest, @@ -1120,6 +1188,8 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries createShellSessionHandoffPackageDisplayViewModel: createIniPanelShellSessionHandoffPackageDisplayViewModel, createShellSessionHandoffPackageRenderState: createIniPanelShellSessionHandoffPackageRenderState, createShellSessionHandoffPackageMountState: createIniPanelShellSessionHandoffPackageMountState, + createShellSessionHandoffPackageMountDisplayViewModel: createIniPanelShellSessionHandoffPackageMountDisplayViewModel, + createShellSessionHandoffPackageMountRenderState: createIniPanelShellSessionHandoffPackageMountRenderState, isSupportedShellSessionHandoffPackage: isSupportedIniPanelShellSessionHandoffPackage, controlPage: { browserApiSchema: createControlPageBrowserApiSchema(), diff --git a/wasm-port/tests/browser/ini_panel_launch_smoke.html b/wasm-port/tests/browser/ini_panel_launch_smoke.html index 04b9011..ce9b524 100644 --- a/wasm-port/tests/browser/ini_panel_launch_smoke.html +++ b/wasm-port/tests/browser/ini_panel_launch_smoke.html @@ -88,6 +88,8 @@ !launchApi?.getShellSessionHandoffPackageDisplayViewModel || !launchApi?.getShellSessionHandoffPackageRenderState || !launchApi?.getShellSessionHandoffPackageMountState || + !launchApi?.getShellSessionHandoffPackageMountDisplayViewModel || + !launchApi?.getShellSessionHandoffPackageMountRenderState || !launchApi?.isSupportedShellSessionHandoffPackage || !launchApi?.getLauncherLinks || !launchApi?.getControlPageApiMethods @@ -128,7 +130,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,isSupportedShellSessionHandoffPackage,getLauncherLinks,getControlPageApiMethods", + "isSupportedLaunchApiManifest,getLaunchApiSchema,getLaunchApiManifest,getShellIntegrationSchema,getShellIntegrationManifest,getShellIntegrationReadiness,getShellSessionHandoffSummarySchema,getShellSessionHandoffSummary,isSupportedShellSessionHandoffSummary,getShellSessionHandoffCompatibilityReport,getShellSessionHandoffDisplayViewModel,getShellSessionHandoffSnapshot,getShellSessionHandoffRenderState,getShellSessionHandoffActionPlan,getShellSessionHandoffChecklist,getShellSessionHandoffPackageSchema,getShellSessionHandoffPackage,getShellSessionHandoffPackageReport,getShellSessionHandoffPackageDisplayViewModel,getShellSessionHandoffPackageRenderState,getShellSessionHandoffPackageMountState,getShellSessionHandoffPackageMountDisplayViewModel,getShellSessionHandoffPackageMountRenderState,isSupportedShellSessionHandoffPackage,getLauncherLinks,getControlPageApiMethods", "launch API manifest methods", ); const shellIntegrationSchema = launchApi.getShellIntegrationSchema(); @@ -148,6 +150,8 @@ const shellSessionHandoffPackageDisplayViewModel = launchApi.getShellSessionHandoffPackageDisplayViewModel(); const shellSessionHandoffPackageRenderState = launchApi.getShellSessionHandoffPackageRenderState(); const shellSessionHandoffPackageMountState = launchApi.getShellSessionHandoffPackageMountState(); + const shellSessionHandoffPackageMountDisplayViewModel = launchApi.getShellSessionHandoffPackageMountDisplayViewModel(); + const shellSessionHandoffPackageMountRenderState = launchApi.getShellSessionHandoffPackageMountRenderState(); assertEqual( shellIntegrationSchema.manifestVersion, 1, @@ -383,6 +387,16 @@ "waiting-panel", "shell session handoff package mount-state default session", ); + assertEqual( + shellSessionHandoffPackageMountDisplayViewModel.detailText, + "session-load-state", + "shell session handoff package mount display detail", + ); + assertEqual( + shellSessionHandoffPackageMountRenderState.statusLine, + "Blocked: session-load-state", + "shell session handoff package mount render-state status", + ); assertEqual( shellSessionHandoffPackage.ready, true, 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 7cb7667..b8c07a4 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 @@ -79,6 +79,8 @@ TOOL_TABLE = browser-shell-tool.tbl !launchApi?.getShellSessionHandoffPackageDisplayViewModel || !launchApi?.getShellSessionHandoffPackageRenderState || !launchApi?.getShellSessionHandoffPackageMountState || + !launchApi?.getShellSessionHandoffPackageMountDisplayViewModel || + !launchApi?.getShellSessionHandoffPackageMountRenderState || !launchApi?.isSupportedShellSessionHandoffPackage ) { throw new Error("launch API namespace did not expose shell integration helpers"); @@ -100,6 +102,8 @@ TOOL_TABLE = browser-shell-tool.tbl const handoffPackageDisplay = launchApi.getShellSessionHandoffPackageDisplayViewModel(); const handoffPackageRenderState = launchApi.getShellSessionHandoffPackageRenderState(); const handoffPackageMountState = launchApi.getShellSessionHandoffPackageMountState(); + const handoffPackageMountDisplay = launchApi.getShellSessionHandoffPackageMountDisplayViewModel(); + const handoffPackageMountRenderState = launchApi.getShellSessionHandoffPackageMountRenderState(); assertEqual(handoffSummarySchema.summaryVersion, 1, "shell handoff summary schema version"); assertEqual( launchApi.isSupportedShellSessionHandoffSummary(handoffSummary), @@ -162,6 +166,8 @@ TOOL_TABLE = browser-shell-tool.tbl assertEqual(handoffPackageMountState.packageReady, true, "shell handoff package mount-state package readiness"); assertEqual(handoffPackageMountState.targetPage.href, "./control-page.html", "shell handoff package mount-state target"); assertEqual(handoffPackageMountState.sessionLoadState.phase, "waiting-panel", "shell handoff package mount-state default session"); + assertEqual(handoffPackageMountDisplay.detailText, "session-load-state", "shell handoff package mount display detail"); + assertEqual(handoffPackageMountRenderState.statusLine, "Blocked: session-load-state", "shell handoff package mount render-state status"); assertEqual(handoffPackage.checklist.ready, handoffChecklist.ready, "shell handoff package checklist"); assertEqual( handoffPackage.actionPlan.nextSteps.map(({ id }) => id).join(","), @@ -237,8 +243,12 @@ TOOL_TABLE = browser-shell-tool.tbl const readyMountState = launchApi.getShellSessionHandoffPackageMountState( controlPageApi[handoffSummary.handoffMethods.loadSessionState](), ); + const readyMountDisplay = launchApi.getShellSessionHandoffPackageMountDisplayViewModel(readyMountState); + const readyMountRenderState = launchApi.getShellSessionHandoffPackageMountRenderState(readyMountState); assertEqual(readyMountState.ready, true, "shell handoff package mount-state readiness"); assertEqual(readyMountState.sessionLoadState.phase, "ready", "shell handoff package mount-state ready session"); + assertEqual(readyMountDisplay.detailText, "No blocking reasons", "shell handoff package ready mount display"); + assertEqual(readyMountRenderState.statusLine, "Ready: No blocking reasons", "shell handoff package ready mount render-state"); assertEqual( controlPageApi[handoffSummary.handoffMethods.readStatus]().status.lastAction, null, 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 2d19c61..37a9309 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 @@ -24,6 +24,8 @@ import { createIniPanelShellSessionHandoffDisplayViewModel, createIniPanelShellSessionHandoffPackage, createIniPanelShellSessionHandoffPackageDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountRenderState, createIniPanelShellSessionHandoffPackageMountState, createIniPanelShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageRenderState, @@ -87,6 +89,8 @@ const requiredShellExports = [ "createIniPanelShellSessionHandoffDisplayViewModel", "createIniPanelShellSessionHandoffPackage", "createIniPanelShellSessionHandoffPackageDisplayViewModel", + "createIniPanelShellSessionHandoffPackageMountDisplayViewModel", + "createIniPanelShellSessionHandoffPackageMountRenderState", "createIniPanelShellSessionHandoffPackageMountState", "createIniPanelShellSessionHandoffPackageReport", "createIniPanelShellSessionHandoffPackageRenderState", @@ -261,6 +265,18 @@ assert.deepEqual( packageRenderState: createIniPanelShellViewModel().shellSessionHandoffPackageRenderState, }), ); +assert.deepEqual( + createIniPanelShellViewModel().shellSessionHandoffPackageMountDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountDisplayViewModel( + createIniPanelShellViewModel().shellSessionHandoffPackageMountState, + ), +); +assert.deepEqual( + createIniPanelShellViewModel().shellSessionHandoffPackageMountRenderState, + createIniPanelShellSessionHandoffPackageMountRenderState( + createIniPanelShellViewModel().shellSessionHandoffPackageMountDisplayViewModel, + ), +); assert.equal(isSupportedIniPanelShellSessionHandoffPackage(createIniPanelShellViewModel().shellSessionHandoffPackage), true); assert.equal(isSupportedIniPanelShellIntegrationManifest(createIniPanelShellViewModel().shellIntegrationManifest), true); assert.deepEqual(createIniPanelShellViewModel().launchApiSchema, createIniPanelLaunchApiSchema()); 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 ea025bc..2b7be8a 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 @@ -61,6 +61,8 @@ assert.deepEqual(manifest, { "getShellSessionHandoffPackageDisplayViewModel", "getShellSessionHandoffPackageRenderState", "getShellSessionHandoffPackageMountState", + "getShellSessionHandoffPackageMountDisplayViewModel", + "getShellSessionHandoffPackageMountRenderState", "isSupportedShellSessionHandoffPackage", "getLauncherLinks", "getControlPageApiMethods", @@ -177,6 +179,8 @@ assert.match(launchText, /\bgetShellSessionHandoffPackageReport\b/); assert.match(launchText, /\bgetShellSessionHandoffPackageDisplayViewModel\b/); assert.match(launchText, /\bgetShellSessionHandoffPackageRenderState\b/); assert.match(launchText, /\bgetShellSessionHandoffPackageMountState\b/); +assert.match(launchText, /\bgetShellSessionHandoffPackageMountDisplayViewModel\b/); +assert.match(launchText, /\bgetShellSessionHandoffPackageMountRenderState\b/); assert.match(launchText, /\bisSupportedShellSessionHandoffPackage\b/); assert.match(launchText, /\blinuxCncIniPanelLaunchApi\b/); 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 b14fef2..f332e24 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 @@ -20,6 +20,8 @@ import { createIniPanelShellSessionHandoffDisplayViewModel, createIniPanelShellSessionHandoffPackage, createIniPanelShellSessionHandoffPackageDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountRenderState, createIniPanelShellSessionHandoffPackageMountState, createIniPanelShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageRenderState, @@ -85,6 +87,12 @@ const handoffPackageMountState = createIniPanelShellSessionHandoffPackageMountSt handoffPackage, packageRenderState: handoffPackageRenderState, }); +const handoffPackageMountDisplayViewModel = createIniPanelShellSessionHandoffPackageMountDisplayViewModel( + handoffPackageMountState, +); +const handoffPackageMountRenderState = createIniPanelShellSessionHandoffPackageMountRenderState( + handoffPackageMountDisplayViewModel, +); assert.deepEqual(schema, { apiName: "ini-panel-shell-integration", @@ -140,7 +148,7 @@ assert.deepEqual(readiness, { counts: { pages: 2, launcherLinks: 2, - launchMethods: 24, + launchMethods: 26, controlPageMethods: 11, persistenceCapabilities: 3, }, @@ -202,7 +210,7 @@ assert.deepEqual(handoffSummary, { counts: { pages: 2, launcherLinks: 2, - launchMethods: 24, + launchMethods: 26, controlPageMethods: 11, persistenceCapabilities: 3, }, @@ -635,6 +643,29 @@ assert.deepEqual(handoffPackageMountState, { }, ], }); +assert.deepEqual(handoffPackageMountDisplayViewModel, { + phase: "blocked", + title: "Shell handoff mount", + statusText: "Blocked", + detailText: "session-load-state", + rows: handoffPackageMountState.checks, +}); +assert.deepEqual(handoffPackageMountRenderState, { + apiName: "ini-panel-shell-session-handoff-package-mount-render-state", + renderStateVersion: 1, + phase: "blocked", + ready: false, + title: "Shell handoff mount", + statusText: "Blocked", + detailText: "session-load-state", + statusLine: "Blocked: session-load-state", + rows: handoffPackageMountDisplayViewModel.rows, + dataset: { + handoffPhase: "blocked", + handoffReady: "false", + handoffScope: "mount", + }, +}); assert.deepEqual( createIniPanelShellSessionHandoffPackageMountState({ handoffPackage, @@ -675,6 +706,38 @@ assert.deepEqual( }, ], ); +const readyMountState = createIniPanelShellSessionHandoffPackageMountState({ + handoffPackage, + packageRenderState: handoffPackageRenderState, + sessionLoadState: createControlPageSessionLoadState({ + phase: "ready", + panelReady: true, + apiReady: true, + controlViewReady: true, + controlView: { status: { runStatus: "not-run" } }, + }), +}); +assert.deepEqual( + createIniPanelShellSessionHandoffPackageMountRenderState( + createIniPanelShellSessionHandoffPackageMountDisplayViewModel(readyMountState), + ), + { + apiName: "ini-panel-shell-session-handoff-package-mount-render-state", + renderStateVersion: 1, + phase: "ready", + ready: true, + title: "Shell handoff mount", + statusText: "Ready", + detailText: "No blocking reasons", + statusLine: "Ready: No blocking reasons", + rows: readyMountState.checks, + dataset: { + handoffPhase: "ready", + handoffReady: "true", + handoffScope: "mount", + }, + }, +); assert.equal(isSupportedIniPanelShellSessionHandoffPackage(handoffPackage), true); assert.equal( isSupportedIniPanelShellSessionHandoffPackage({ ...handoffPackage, packageVersion: 2 }), @@ -1014,7 +1077,7 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), { counts: { pages: 2, launcherLinks: 2, - launchMethods: 24, + launchMethods: 26, controlPageMethods: 11, persistenceCapabilities: 3, }, @@ -1180,6 +1243,8 @@ assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffComp assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffDisplayViewModel\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackage\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageDisplayViewModel\b/); +assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageMountDisplayViewModel\b/); +assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageMountRenderState\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageMountState\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageReport\b/); assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageRenderState\b/); @@ -1203,6 +1268,8 @@ assert.match(docText, /\bcreateIniPanelShellSessionHandoffCompatibilityReport\b/ assert.match(docText, /\bcreateIniPanelShellSessionHandoffDisplayViewModel\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackage\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageDisplayViewModel\b/); +assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageMountDisplayViewModel\b/); +assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageMountRenderState\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageMountState\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageReport\b/); assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageRenderState\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 d5387bb..64b33f8 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 @@ -20,6 +20,8 @@ import { createIniPanelShellSessionHandoffDisplayViewModel, createIniPanelShellSessionHandoffPackage, createIniPanelShellSessionHandoffPackageDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountRenderState, createIniPanelShellSessionHandoffPackageMountState, createIniPanelShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageRenderState, @@ -88,6 +90,8 @@ assert.equal(typeof createIniPanelShellSessionHandoffCompatibilityReport, "funct assert.equal(typeof createIniPanelShellSessionHandoffDisplayViewModel, "function"); assert.equal(typeof createIniPanelShellSessionHandoffPackage, "function"); assert.equal(typeof createIniPanelShellSessionHandoffPackageDisplayViewModel, "function"); +assert.equal(typeof createIniPanelShellSessionHandoffPackageMountDisplayViewModel, "function"); +assert.equal(typeof createIniPanelShellSessionHandoffPackageMountRenderState, "function"); assert.equal(typeof createIniPanelShellSessionHandoffPackageMountState, "function"); assert.equal(typeof createIniPanelShellSessionHandoffPackageReport, "function"); assert.equal(typeof createIniPanelShellSessionHandoffPackageRenderState, "function"); @@ -231,6 +235,16 @@ assert.deepEqual( packageRenderState: shellViewModel.shellSessionHandoffPackageRenderState, }), ); +assert.deepEqual( + shellViewModel.shellSessionHandoffPackageMountDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountDisplayViewModel(shellViewModel.shellSessionHandoffPackageMountState), +); +assert.deepEqual( + shellViewModel.shellSessionHandoffPackageMountRenderState, + createIniPanelShellSessionHandoffPackageMountRenderState( + shellViewModel.shellSessionHandoffPackageMountDisplayViewModel, + ), +); assert.equal(isSupportedIniPanelShellSessionHandoffPackage(shellViewModel.shellSessionHandoffPackage), true); assert.deepEqual(shellViewModel.shellSessionHandoffDisplayViewModel, { phase: "ready", @@ -527,6 +541,29 @@ assert.deepEqual(shellViewModel.shellSessionHandoffPackageMountState, { }, ], }); +assert.deepEqual(shellViewModel.shellSessionHandoffPackageMountDisplayViewModel, { + phase: "blocked", + title: "Shell handoff mount", + statusText: "Blocked", + detailText: "session-load-state", + rows: shellViewModel.shellSessionHandoffPackageMountState.checks, +}); +assert.deepEqual(shellViewModel.shellSessionHandoffPackageMountRenderState, { + apiName: "ini-panel-shell-session-handoff-package-mount-render-state", + renderStateVersion: 1, + phase: "blocked", + ready: false, + title: "Shell handoff mount", + statusText: "Blocked", + detailText: "session-load-state", + statusLine: "Blocked: session-load-state", + rows: shellViewModel.shellSessionHandoffPackageMountDisplayViewModel.rows, + dataset: { + handoffPhase: "blocked", + handoffReady: "false", + handoffScope: "mount", + }, +}); assert.equal( createIniPanelShellSessionHandoffPackageMountState({ handoffPackage: shellViewModel.shellSessionHandoffPackage, @@ -541,6 +578,20 @@ assert.equal( }).ready, true, ); +assert.deepEqual( + createIniPanelShellSessionHandoffPackageMountDisplayViewModel(createIniPanelShellSessionHandoffPackageMountState({ + handoffPackage: shellViewModel.shellSessionHandoffPackage, + packageRenderState: shellViewModel.shellSessionHandoffPackageRenderState, + sessionLoadState: createControlPageSessionLoadState({ + phase: "ready", + panelReady: true, + apiReady: true, + controlViewReady: true, + controlView: { status: { runStatus: "not-run" } }, + }), + })).detailText, + "No blocking reasons", +); assert.equal( isSupportedIniPanelShellIntegrationManifest(shellViewModel.shellIntegrationManifest), true, @@ -601,6 +652,14 @@ assert.equal( shellViewModel.createShellSessionHandoffPackageMountState, createIniPanelShellSessionHandoffPackageMountState, ); +assert.equal( + shellViewModel.createShellSessionHandoffPackageMountDisplayViewModel, + createIniPanelShellSessionHandoffPackageMountDisplayViewModel, +); +assert.equal( + shellViewModel.createShellSessionHandoffPackageMountRenderState, + createIniPanelShellSessionHandoffPackageMountRenderState, +); assert.equal(shellViewModel.createShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageReport); assert.equal(shellViewModel.createShellSessionHandoffPackageSchema, createIniPanelShellSessionHandoffPackageSchema); assert.equal(shellViewModel.isSupportedShellSessionHandoffPackage, isSupportedIniPanelShellSessionHandoffPackage);