新增 INI 面板 session readiness workflow report

This commit is contained in:
2026-06-16 07:04:04 +08:00
parent eb50e6b455
commit ce3d08ef61
12 changed files with 225 additions and 5 deletions

View File

@@ -117,6 +117,7 @@
mountIniPanelShellSessionHandoffFromControlPage,
readIniPanelShellSessionHandoffStatusFromControlPage,
createIniPanelShellSessionHandoffWorkflowSummary,
createIniPanelShellSessionReadinessWorkflowReport,
createIniPanelShellSessionHandoffWorkflowDisplayViewModel,
createIniPanelShellSessionHandoffWorkflowRenderState,
createIniPanelShellSessionHandoffWorkflowDomContract,
@@ -245,6 +246,11 @@
}),
})
),
getShellSessionReadinessWorkflowReport: (options) => (
createIniPanelShellSessionReadinessWorkflowReport(options ?? {
workflowSummary: shellViewModel.shellSessionHandoffWorkflowSummary,
})
),
getShellSessionHandoffWorkflowDisplayViewModel: (options) => (
createIniPanelShellSessionHandoffWorkflowDisplayViewModel(
options ?? shellViewModel.shellSessionHandoffWorkflowSummary,

View File

@@ -160,6 +160,7 @@ export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntr
"mountShellSessionHandoffFromControlPage",
"readShellSessionHandoffStatusFromControlPage",
"getShellSessionHandoffWorkflowSummary",
"getShellSessionReadinessWorkflowReport",
"getShellSessionHandoffWorkflowDisplayViewModel",
"getShellSessionHandoffWorkflowRenderState",
"getShellSessionHandoffWorkflowDomContract",
@@ -1548,6 +1549,60 @@ export function createIniPanelShellSessionHandoffWorkflowDisplayViewModel(
};
}
export function createIniPanelShellSessionReadinessWorkflowReport({
workflowSummary = null,
readonlyStatusResult = null,
} = {}) {
const sessionReadiness = workflowSummary?.sessionReadiness
?? readonlyStatusResult?.readonlyStatus?.sessionReadiness
?? null;
const missing = Array.isArray(sessionReadiness?.missing)
? [...sessionReadiness.missing]
: [];
const ready = sessionReadiness?.ready === true;
const phase = sessionReadiness ? (ready ? "ready" : "blocked") : "blocked";
const statusLine = sessionReadiness
? (
ready
? "Ready: session readiness available"
: `Blocked: ${missing.length > 0 ? missing.join(", ") : "session readiness blocked"}`
)
: "Blocked: session readiness unavailable";
return {
apiName: "ini-panel-shell-session-readiness-workflow-report",
reportVersion: 1,
phase,
ready,
statusLine,
sessionReadiness: sessionReadiness
? {
phase: sessionReadiness.phase ?? phase,
ready,
missing,
}
: null,
missing,
rows: [
{
id: "session-readiness",
label: "Session readiness",
value: sessionReadiness ? (ready ? "ready" : "blocked") : "missing",
},
{
id: "session-readiness-phase",
label: "Session readiness phase",
value: sessionReadiness?.phase ?? "missing",
},
{
id: "session-readiness-missing",
label: "Session readiness missing",
value: missing.length > 0 ? missing.join(", ") : "none",
},
],
};
}
export function createIniPanelShellSessionHandoffWorkflowRenderState(
displayViewModel = createIniPanelShellSessionHandoffWorkflowDisplayViewModel(),
) {
@@ -1615,6 +1670,7 @@ export function createIniPanelShellWorkflowOverviewContract() {
"getWorkflowOverviewRenderState",
"getWorkflowOverviewDisplayViewModel",
"getWorkflowOverviewSummary",
"getWorkflowOverviewSessionReadinessReport",
"getWorkflowOverviewDomContract",
"getWorkflowOverviewDomReadiness",
"renderWorkflowOverview",
@@ -2521,6 +2577,9 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
handoffSummary: shellSessionHandoffSummary,
}),
});
const shellSessionReadinessWorkflowReport = createIniPanelShellSessionReadinessWorkflowReport({
workflowSummary: shellSessionHandoffWorkflowSummary,
});
const shellSessionHandoffWorkflowDisplayViewModel = createIniPanelShellSessionHandoffWorkflowDisplayViewModel(
shellSessionHandoffWorkflowSummary,
);
@@ -2558,6 +2617,7 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
shellSessionHandoffPackageMountRenderState,
shellSessionHandoffMountDomContract,
shellSessionHandoffWorkflowSummary,
shellSessionReadinessWorkflowReport,
shellSessionHandoffWorkflowDisplayViewModel,
shellSessionHandoffWorkflowRenderState,
shellSessionHandoffWorkflowDomContract,
@@ -2591,6 +2651,7 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
mountShellSessionHandoffFromControlPage: mountIniPanelShellSessionHandoffFromControlPage,
readShellSessionHandoffStatusFromControlPage: readIniPanelShellSessionHandoffStatusFromControlPage,
createShellSessionHandoffWorkflowSummary: createIniPanelShellSessionHandoffWorkflowSummary,
createShellSessionReadinessWorkflowReport: createIniPanelShellSessionReadinessWorkflowReport,
createShellSessionHandoffWorkflowDisplayViewModel: createIniPanelShellSessionHandoffWorkflowDisplayViewModel,
createShellSessionHandoffWorkflowRenderState: createIniPanelShellSessionHandoffWorkflowRenderState,
createShellSessionHandoffWorkflowDomContract: createIniPanelShellSessionHandoffWorkflowDomContract,

View File

@@ -87,6 +87,7 @@
createIniPanelShellSessionHandoffWorkflowDomContract,
createIniPanelShellSessionHandoffWorkflowDomReadiness,
createIniPanelShellSessionHandoffWorkflowRenderState,
createIniPanelShellSessionReadinessWorkflowReport,
createIniPanelShellWorkflowOverviewContract,
createIniPanelShellWorkflowOverviewReadiness,
createIniPanelShellWorkflowOverviewEmbeddingReport,
@@ -115,6 +116,11 @@
getWorkflowOverviewRenderState: () => shellViewModel.shellSessionHandoffWorkflowRenderState,
getWorkflowOverviewDisplayViewModel: () => shellViewModel.shellSessionHandoffWorkflowDisplayViewModel,
getWorkflowOverviewSummary: () => shellViewModel.shellSessionHandoffWorkflowSummary,
getWorkflowOverviewSessionReadinessReport: (options) => (
createIniPanelShellSessionReadinessWorkflowReport(options ?? {
workflowSummary: shellViewModel.shellSessionHandoffWorkflowSummary,
})
),
getWorkflowOverviewDomContract: (options) => (
createIniPanelShellSessionHandoffWorkflowDomContract(options)
),