推进 INI 面板 workflow overview embedding mount display
This commit is contained in:
@@ -302,6 +302,9 @@
|
||||
documentRef: document,
|
||||
})
|
||||
),
|
||||
getWorkflowOverviewEmbeddingMountDisplayViewModel: (mountResult) => (
|
||||
shellViewModel.createWorkflowOverviewEmbeddingMountDisplayViewModel(mountResult)
|
||||
),
|
||||
isSupportedShellSessionHandoffPackage: shellViewModel.isSupportedShellSessionHandoffPackage,
|
||||
getLauncherLinks: () => shellViewModel.launcherLinks,
|
||||
getControlPageApiMethods: () => shellViewModel.controlPage.browserApiMethods,
|
||||
|
||||
@@ -166,6 +166,7 @@ export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntr
|
||||
"getWorkflowOverviewEmbeddingDomReadiness",
|
||||
"renderWorkflowOverviewEmbeddingState",
|
||||
"mountWorkflowOverviewEmbeddingState",
|
||||
"getWorkflowOverviewEmbeddingMountDisplayViewModel",
|
||||
"isSupportedShellSessionHandoffPackage",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
@@ -2127,6 +2128,71 @@ export function mountIniPanelShellWorkflowOverviewEmbeddingState({
|
||||
}
|
||||
}
|
||||
|
||||
export function createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel(
|
||||
mountResult = mountIniPanelShellWorkflowOverviewEmbeddingState(),
|
||||
) {
|
||||
const domMissing = Array.isArray(mountResult?.domReadiness?.missing)
|
||||
? mountResult.domReadiness.missing
|
||||
: [];
|
||||
const renderResult = mountResult?.renderResult && typeof mountResult.renderResult === "object"
|
||||
? mountResult.renderResult
|
||||
: {};
|
||||
const renderState = mountResult?.renderState && typeof mountResult.renderState === "object"
|
||||
? mountResult.renderState
|
||||
: {};
|
||||
const error = mountResult?.error ?? null;
|
||||
const ready = mountResult?.ready === true;
|
||||
const problems = [
|
||||
...(ready ? [] : [`mount:${mountResult?.phase ?? "blocked"}`]),
|
||||
...domMissing.map((name) => `dom:${name}`),
|
||||
...(error ? [`error:${error}`] : []),
|
||||
];
|
||||
|
||||
return {
|
||||
phase: ready ? "ready" : "blocked",
|
||||
title: "Workflow overview embedding mount",
|
||||
statusText: ready ? "Ready" : "Blocked",
|
||||
detailText: problems.length === 0 ? "No blocking reasons" : problems.join(", "),
|
||||
rows: [
|
||||
{
|
||||
id: "mount-ready",
|
||||
label: "Mount readiness",
|
||||
value: ready ? "ready" : "blocked",
|
||||
},
|
||||
{
|
||||
id: "dom-readiness",
|
||||
label: "DOM readiness",
|
||||
value: mountResult?.domReadiness?.ready ? "ready" : "blocked",
|
||||
},
|
||||
{
|
||||
id: "missing-dom",
|
||||
label: "Missing DOM",
|
||||
value: domMissing.length === 0 ? "none" : domMissing.join(", "),
|
||||
},
|
||||
{
|
||||
id: "render-state",
|
||||
label: "Render state",
|
||||
value: renderState.statusLine ?? "missing",
|
||||
},
|
||||
{
|
||||
id: "render-result",
|
||||
label: "Render result",
|
||||
value: renderResult.rendered ? "rendered" : "missing",
|
||||
},
|
||||
{
|
||||
id: "render-row-count",
|
||||
label: "Render row count",
|
||||
value: Number.isFinite(renderResult.rowCount) ? String(renderResult.rowCount) : "0",
|
||||
},
|
||||
{
|
||||
id: "error",
|
||||
label: "Error",
|
||||
value: error ?? "none",
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries()) {
|
||||
const shellIntegrationManifest = createIniPanelShellIntegrationManifest(entries);
|
||||
const shellIntegrationReadiness = createIniPanelShellIntegrationReadiness(shellIntegrationManifest);
|
||||
@@ -2292,6 +2358,8 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
|
||||
createWorkflowOverviewEmbeddingDomReadiness: createIniPanelShellWorkflowOverviewEmbeddingDomReadiness,
|
||||
renderWorkflowOverviewEmbeddingState: renderIniPanelShellWorkflowOverviewEmbeddingState,
|
||||
mountWorkflowOverviewEmbeddingState: mountIniPanelShellWorkflowOverviewEmbeddingState,
|
||||
createWorkflowOverviewEmbeddingMountDisplayViewModel:
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel,
|
||||
isSupportedShellSessionHandoffPackage: isSupportedIniPanelShellSessionHandoffPackage,
|
||||
controlPage: {
|
||||
browserApiSchema: createControlPageBrowserApiSchema(),
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
mountIniPanelShellWorkflowOverviewEmbedding,
|
||||
renderIniPanelShellWorkflowOverviewEmbeddingState,
|
||||
mountIniPanelShellWorkflowOverviewEmbeddingState,
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel,
|
||||
renderIniPanelShellSessionHandoffWorkflowState,
|
||||
mountIniPanelShellSessionHandoffWorkflow,
|
||||
} from "./ui-shell.js";
|
||||
@@ -161,6 +162,9 @@
|
||||
documentRef: document,
|
||||
})
|
||||
),
|
||||
getWorkflowOverviewEmbeddingMountDisplayViewModel: (mountResult) => (
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel(mountResult)
|
||||
),
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user