推进 INI 面板 shell handoff package

This commit is contained in:
2026-06-15 10:14:25 +08:00
parent c92021fa82
commit 542b139477
10 changed files with 279 additions and 5 deletions

View File

@@ -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,

View File

@@ -146,6 +146,7 @@
getShellSessionHandoffRenderState: () => shellViewModel.shellSessionHandoffRenderState,
getShellSessionHandoffActionPlan: () => shellViewModel.shellSessionHandoffActionPlan,
getShellSessionHandoffChecklist: () => shellViewModel.shellSessionHandoffChecklist,
getShellSessionHandoffPackage: () => shellViewModel.shellSessionHandoffPackage,
getLauncherLinks: () => shellViewModel.launcherLinks,
getControlPageApiMethods: () => shellViewModel.controlPage.browserApiMethods,
};

View File

@@ -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(),

View File

@@ -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",

View File

@@ -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");

View File

@@ -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/);

View File

@@ -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");

View File

@@ -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/);

View File

@@ -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);