推进 INI 面板 shell handoff workflow summary helper

This commit is contained in:
2026-06-15 13:58:17 +08:00
parent 859d01356b
commit 4c02f33d57
9 changed files with 256 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ import {
mountIniPanelShellSessionHandoff,
mountIniPanelShellSessionHandoffFromControlPage,
readIniPanelShellSessionHandoffStatusFromControlPage,
createIniPanelShellSessionHandoffWorkflowSummary,
renderIniPanelShellSessionHandoffMountState,
createIniPanelShellSessionHandoffPackageReport,
createIniPanelShellSessionHandoffPackageRenderState,
@@ -103,6 +104,7 @@ const requiredShellExports = [
"mountIniPanelShellSessionHandoff",
"mountIniPanelShellSessionHandoffFromControlPage",
"readIniPanelShellSessionHandoffStatusFromControlPage",
"createIniPanelShellSessionHandoffWorkflowSummary",
"renderIniPanelShellSessionHandoffMountState",
"createIniPanelShellSessionHandoffPackageReport",
"createIniPanelShellSessionHandoffPackageRenderState",
@@ -309,6 +311,10 @@ assert.equal(
readIniPanelShellSessionHandoffStatusFromControlPage().phase,
"blocked",
);
assert.equal(
createIniPanelShellSessionHandoffWorkflowSummary().phase,
"blocked",
);
assert.equal(isSupportedIniPanelShellSessionHandoffPackage(createIniPanelShellViewModel().shellSessionHandoffPackage), true);
assert.equal(isSupportedIniPanelShellIntegrationManifest(createIniPanelShellViewModel().shellIntegrationManifest), true);
assert.deepEqual(createIniPanelShellViewModel().launchApiSchema, createIniPanelLaunchApiSchema());
@@ -471,6 +477,7 @@ assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffMountD
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.mountShellSessionHandoff\b/);
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.mountShellSessionHandoffFromControlPage\b/);
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.readShellSessionHandoffStatusFromControlPage\b/);
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffWorkflowSummary\b/);
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getControlPageApiMethods\b/);
assert.match(docText, /\bini_panel_shell_integration_workflow_smoke\.html\b/);
assert.match(browserIniPanelText, /\bini_panel_shell_integration_workflow_smoke\.html\b/);
@@ -492,6 +499,7 @@ assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffMountDo
assert.match(shellIntegrationWorkflowSmokeText, /\bmountShellSessionHandoff\b/);
assert.match(shellIntegrationWorkflowSmokeText, /\bmountShellSessionHandoffFromControlPage\b/);
assert.match(shellIntegrationWorkflowSmokeText, /\breadShellSessionHandoffStatusFromControlPage\b/);
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffWorkflowSummary\b/);
assert.match(shellIntegrationWorkflowSmokeText, /\brenderShellSessionHandoffMountState\b/);
assert.match(shellIntegrationWorkflowSmokeText, /\bdata-external-shell-mount\b/);
assert.match(shellIntegrationWorkflowSmokeText, /\bdata-external-mount-value\b/);

View File

@@ -69,6 +69,7 @@ assert.deepEqual(manifest, {
"mountShellSessionHandoff",
"mountShellSessionHandoffFromControlPage",
"readShellSessionHandoffStatusFromControlPage",
"getShellSessionHandoffWorkflowSummary",
"isSupportedShellSessionHandoffPackage",
"getLauncherLinks",
"getControlPageApiMethods",
@@ -193,6 +194,7 @@ assert.match(launchText, /\brenderShellSessionHandoffMountState\b/);
assert.match(launchText, /\bmountShellSessionHandoff\b/);
assert.match(launchText, /\bmountShellSessionHandoffFromControlPage\b/);
assert.match(launchText, /\breadShellSessionHandoffStatusFromControlPage\b/);
assert.match(launchText, /\bgetShellSessionHandoffWorkflowSummary\b/);
assert.match(launchText, /\bisSupportedShellSessionHandoffPackage\b/);
assert.match(launchText, /\bdata-handoff-mount\b/);
assert.match(launchText, /\bdata-handoff-mount-status\b/);

View File

@@ -28,6 +28,7 @@ import {
mountIniPanelShellSessionHandoff,
mountIniPanelShellSessionHandoffFromControlPage,
readIniPanelShellSessionHandoffStatusFromControlPage,
createIniPanelShellSessionHandoffWorkflowSummary,
createIniPanelShellSessionHandoffPackageReport,
createIniPanelShellSessionHandoffPackageRenderState,
createIniPanelShellSessionHandoffPackageSchema,
@@ -154,7 +155,7 @@ assert.deepEqual(readiness, {
counts: {
pages: 2,
launcherLinks: 2,
launchMethods: 32,
launchMethods: 33,
controlPageMethods: 11,
persistenceCapabilities: 3,
},
@@ -216,7 +217,7 @@ assert.deepEqual(handoffSummary, {
counts: {
pages: 2,
launcherLinks: 2,
launchMethods: 32,
launchMethods: 33,
controlPageMethods: 11,
persistenceCapabilities: 3,
},
@@ -716,6 +717,10 @@ assert.equal(
readIniPanelShellSessionHandoffStatusFromControlPage().readError,
"Missing readControlPageStatus",
);
assert.equal(
createIniPanelShellSessionHandoffWorkflowSummary().phase,
"blocked",
);
assert.deepEqual(
createIniPanelShellSessionHandoffPackageMountState({
handoffPackage,
@@ -1127,7 +1132,7 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), {
counts: {
pages: 2,
launcherLinks: 2,
launchMethods: 32,
launchMethods: 33,
controlPageMethods: 11,
persistenceCapabilities: 3,
},
@@ -1301,6 +1306,7 @@ assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffMoun
assert.match(shellText, /\bexport function mountIniPanelShellSessionHandoff\b/);
assert.match(shellText, /\bexport function mountIniPanelShellSessionHandoffFromControlPage\b/);
assert.match(shellText, /\bexport function readIniPanelShellSessionHandoffStatusFromControlPage\b/);
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffWorkflowSummary\b/);
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageReport\b/);
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageRenderState\b/);
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageSchema\b/);
@@ -1331,6 +1337,7 @@ assert.match(docText, /\bcreateIniPanelShellSessionHandoffMountDomReadiness\b/);
assert.match(docText, /\bmountIniPanelShellSessionHandoff\b/);
assert.match(docText, /\bmountIniPanelShellSessionHandoffFromControlPage\b/);
assert.match(docText, /\breadIniPanelShellSessionHandoffStatusFromControlPage\b/);
assert.match(docText, /\bcreateIniPanelShellSessionHandoffWorkflowSummary\b/);
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageReport\b/);
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageRenderState\b/);
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageSchema\b/);

View File

@@ -28,6 +28,7 @@ import {
mountIniPanelShellSessionHandoff,
mountIniPanelShellSessionHandoffFromControlPage,
readIniPanelShellSessionHandoffStatusFromControlPage,
createIniPanelShellSessionHandoffWorkflowSummary,
renderIniPanelShellSessionHandoffMountState,
createIniPanelShellSessionHandoffPackageReport,
createIniPanelShellSessionHandoffPackageRenderState,
@@ -104,6 +105,7 @@ assert.equal(typeof createIniPanelShellSessionHandoffMountDomReadiness, "functio
assert.equal(typeof mountIniPanelShellSessionHandoff, "function");
assert.equal(typeof mountIniPanelShellSessionHandoffFromControlPage, "function");
assert.equal(typeof readIniPanelShellSessionHandoffStatusFromControlPage, "function");
assert.equal(typeof createIniPanelShellSessionHandoffWorkflowSummary, "function");
assert.equal(typeof renderIniPanelShellSessionHandoffMountState, "function");
assert.equal(typeof createIniPanelShellSessionHandoffPackageReport, "function");
assert.equal(typeof createIniPanelShellSessionHandoffPackageRenderState, "function");
@@ -714,6 +716,10 @@ assert.equal(
shellViewModel.readShellSessionHandoffStatusFromControlPage,
readIniPanelShellSessionHandoffStatusFromControlPage,
);
assert.equal(
shellViewModel.createShellSessionHandoffWorkflowSummary,
createIniPanelShellSessionHandoffWorkflowSummary,
);
assert.equal(shellViewModel.createShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageReport);
assert.equal(shellViewModel.createShellSessionHandoffPackageSchema, createIniPanelShellSessionHandoffPackageSchema);
assert.equal(shellViewModel.isSupportedShellSessionHandoffPackage, isSupportedIniPanelShellSessionHandoffPackage);
@@ -937,6 +943,29 @@ assert.equal(
}).readError,
"Missing readControlPageStatus",
);
const workflowSummaryResult = createIniPanelShellSessionHandoffWorkflowSummary({
mountWorkflow: mountWorkflowResult,
controlPageMountWorkflow,
readonlyStatusResult,
});
assert.equal(workflowSummaryResult.apiName, "ini-panel-shell-session-handoff-workflow-summary");
assert.equal(workflowSummaryResult.summaryVersion, 1);
assert.equal(workflowSummaryResult.phase, "blocked");
assert.equal(workflowSummaryResult.ready, false);
assert.equal(workflowSummaryResult.rows.length, 5);
assert.equal(workflowSummaryResult.blockingReasons[0], "mount:blocked");
const readyWorkflowSummaryResult = createIniPanelShellSessionHandoffWorkflowSummary({
mountWorkflow: {
phase: "ready",
ready: true,
statusLine: "Ready: mount workflow available",
},
controlPageMountWorkflow,
readonlyStatusResult,
});
assert.equal(readyWorkflowSummaryResult.phase, "ready");
assert.equal(readyWorkflowSummaryResult.ready, true);
assert.equal(readyWorkflowSummaryResult.blockingReasons.length, 0);
assert.deepEqual(
mountIniPanelShellSessionHandoff({ documentRef: mountDocument }).renderResult,
null,