推进 INI 面板 shell handoff mount-state display

This commit is contained in:
2026-06-15 11:31:16 +08:00
parent f548f24fb8
commit df0773b431
10 changed files with 347 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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