推进 INI 面板 shell handoff action plan

This commit is contained in:
2026-06-15 10:00:40 +08:00
parent b1f23e6641
commit 2a7485c14d
10 changed files with 392 additions and 5 deletions

View File

@@ -80,6 +80,7 @@
!launchApi?.getShellSessionHandoffDisplayViewModel ||
!launchApi?.getShellSessionHandoffSnapshot ||
!launchApi?.getShellSessionHandoffRenderState ||
!launchApi?.getShellSessionHandoffActionPlan ||
!launchApi?.getLauncherLinks ||
!launchApi?.getControlPageApiMethods
) {
@@ -119,7 +120,7 @@
);
assertEqual(
launchApiManifest.methods.join(","),
"isSupportedLaunchApiManifest,getLaunchApiSchema,getLaunchApiManifest,getShellIntegrationSchema,getShellIntegrationManifest,getShellIntegrationReadiness,getShellSessionHandoffSummarySchema,getShellSessionHandoffSummary,isSupportedShellSessionHandoffSummary,getShellSessionHandoffCompatibilityReport,getShellSessionHandoffDisplayViewModel,getShellSessionHandoffSnapshot,getShellSessionHandoffRenderState,getLauncherLinks,getControlPageApiMethods",
"isSupportedLaunchApiManifest,getLaunchApiSchema,getLaunchApiManifest,getShellIntegrationSchema,getShellIntegrationManifest,getShellIntegrationReadiness,getShellSessionHandoffSummarySchema,getShellSessionHandoffSummary,isSupportedShellSessionHandoffSummary,getShellSessionHandoffCompatibilityReport,getShellSessionHandoffDisplayViewModel,getShellSessionHandoffSnapshot,getShellSessionHandoffRenderState,getShellSessionHandoffActionPlan,getLauncherLinks,getControlPageApiMethods",
"launch API manifest methods",
);
const shellIntegrationSchema = launchApi.getShellIntegrationSchema();
@@ -131,6 +132,7 @@
const shellSessionHandoffDisplayViewModel = launchApi.getShellSessionHandoffDisplayViewModel();
const shellSessionHandoffSnapshot = launchApi.getShellSessionHandoffSnapshot();
const shellSessionHandoffRenderState = launchApi.getShellSessionHandoffRenderState();
const shellSessionHandoffActionPlan = launchApi.getShellSessionHandoffActionPlan();
assertEqual(
shellIntegrationSchema.manifestVersion,
1,
@@ -241,6 +243,26 @@
"Ready: No blocking reasons",
"shell session handoff render-state status",
);
assertEqual(
shellSessionHandoffActionPlan.planVersion,
1,
"shell session handoff action-plan version",
);
assertEqual(
shellSessionHandoffActionPlan.ready,
true,
"shell session handoff action-plan readiness",
);
assertEqual(
shellSessionHandoffActionPlan.nextSteps.map(({ id }) => id).join(","),
"open-control-page,read-readonly-status",
"shell session handoff action-plan next steps",
);
assertEqual(
shellSessionHandoffActionPlan.requiredMethods.readStatus,
"readControlPageStatus",
"shell session handoff action-plan read method",
);
assertEqual(
JSON.stringify(shellSessionHandoffSnapshot.readiness),
JSON.stringify(shellIntegrationReadiness),
@@ -261,6 +283,11 @@
JSON.stringify(shellSessionHandoffDisplayViewModel.rows),
"shell session handoff render-state rows",
);
assertEqual(
JSON.stringify(shellSessionHandoffActionPlan.displayRows),
JSON.stringify(shellSessionHandoffRenderState.rows),
"shell session handoff action-plan rows",
);
assertEqual(
launchDoc.querySelector("[data-handoff-status]").textContent,
"Ready: No blocking reasons",