推进 INI 面板 workflow overview embedding mount DOM readiness

This commit is contained in:
2026-06-15 21:48:31 +08:00
parent 683f86c33c
commit 543609cbe7
13 changed files with 230 additions and 9 deletions

View File

@@ -113,6 +113,7 @@
!launchApi?.getWorkflowOverviewEmbeddingMountDisplayViewModel ||
!launchApi?.getWorkflowOverviewEmbeddingMountRenderState ||
!launchApi?.getWorkflowOverviewEmbeddingMountDomContract ||
!launchApi?.getWorkflowOverviewEmbeddingMountDomReadiness ||
!launchApi?.isSupportedShellSessionHandoffPackage ||
!launchApi?.getLauncherLinks ||
!launchApi?.getControlPageApiMethods
@@ -647,7 +648,8 @@
!workflowOverviewApi?.mountWorkflowOverviewEmbeddingState ||
!workflowOverviewApi?.getWorkflowOverviewEmbeddingMountDisplayViewModel ||
!workflowOverviewApi?.getWorkflowOverviewEmbeddingMountRenderState ||
!workflowOverviewApi?.getWorkflowOverviewEmbeddingMountDomContract
!workflowOverviewApi?.getWorkflowOverviewEmbeddingMountDomContract ||
!workflowOverviewApi?.getWorkflowOverviewEmbeddingMountDomReadiness
) {
throw new Error("workflow overview API namespace did not expose shell helpers");
}

View File

@@ -119,6 +119,7 @@ TOOL_TABLE = browser-shell-tool.tbl
!launchApi?.getWorkflowOverviewEmbeddingMountDisplayViewModel ||
!launchApi?.getWorkflowOverviewEmbeddingMountRenderState ||
!launchApi?.getWorkflowOverviewEmbeddingMountDomContract ||
!launchApi?.getWorkflowOverviewEmbeddingMountDomReadiness ||
!launchApi?.isSupportedShellSessionHandoffPackage
) {
throw new Error("launch API namespace did not expose shell integration helpers");
@@ -349,6 +350,10 @@ TOOL_TABLE = browser-shell-tool.tbl
rows: "[data-external-overview-embedding-mount-rows]",
},
});
const workflowOverviewEmbeddingMountDomReadiness = launchApi.getWorkflowOverviewEmbeddingMountDomReadiness({
contract: workflowOverviewEmbeddingMountDomContract,
documentRef: document,
});
assertEqual(workflowOverviewReadiness.ready, true, "shell workflow overview iframe readiness");
assertEqual(workflowOverviewReadiness.missing.join(","), "", "shell workflow overview iframe missing methods");
assertEqual(workflowOverviewEmbedding.apiName, "ini-panel-shell-workflow-overview-embedding", "shell workflow overview embedding API");
@@ -385,6 +390,8 @@ TOOL_TABLE = browser-shell-tool.tbl
assertEqual(workflowOverviewEmbeddingMountRenderState.dataset.handoffScope, "workflow-overview-embedding-mount", "shell workflow overview embedding mount render scope");
assertEqual(workflowOverviewEmbeddingMountDomContract.selectors.rows, "[data-external-overview-embedding-mount-rows]", "shell workflow overview embedding mount DOM rows selector");
assertEqual(workflowOverviewEmbeddingMountDomContract.rowDatasetKeys.detail[0], "externalOverviewEmbeddingMountValue", "shell workflow overview embedding mount DOM detail key");
assertEqual(workflowOverviewEmbeddingMountDomReadiness.ready, false, "shell workflow overview embedding mount DOM readiness");
assertEqual(workflowOverviewEmbeddingMountDomReadiness.missing.join(","), "mount,status,rows", "shell workflow overview embedding mount DOM missing");
const controlDoc = await loadFrame(`../../runtime/ui/ini-panel/${controlTarget.href.slice(2)}`);
const controlPageApi = controlDoc.defaultView.linuxCncIniPanelControlPageApi;

View File

@@ -45,7 +45,8 @@
!workflowApi?.mountWorkflowOverviewEmbeddingState ||
!workflowApi?.getWorkflowOverviewEmbeddingMountDisplayViewModel ||
!workflowApi?.getWorkflowOverviewEmbeddingMountRenderState ||
!workflowApi?.getWorkflowOverviewEmbeddingMountDomContract
!workflowApi?.getWorkflowOverviewEmbeddingMountDomContract ||
!workflowApi?.getWorkflowOverviewEmbeddingMountDomReadiness
) {
throw new Error("workflow overview API namespace did not expose overview helpers");
}
@@ -116,6 +117,7 @@
embeddingMountDisplay,
);
const embeddingMountDomContract = workflowApi.getWorkflowOverviewEmbeddingMountDomContract();
const embeddingMountDomReadinessMissing = workflowApi.getWorkflowOverviewEmbeddingMountDomReadiness();
assertEqual(embeddingRenderResult.rendered, true, "workflow overview embedding render result");
assertEqual(embeddingRenderResult.rowCount, 6, "workflow overview embedding render row count");
assertEqual(embeddingRenderResult.dataset.handoffScope, "workflow-overview-embedding", "workflow overview embedding render scope");
@@ -129,6 +131,19 @@
assertEqual(embeddingMountRenderState.rows.length, 7, "workflow overview embedding mount render rows");
assertEqual(embeddingMountDomContract.selectors.mount, "[data-workflow-overview-embedding-mount]", "workflow overview embedding mount DOM selector");
assertEqual(embeddingMountDomContract.rowDatasetKeys.term[0], "workflowOverviewEmbeddingMountRow", "workflow overview embedding mount row key");
assertEqual(embeddingMountDomReadinessMissing.ready, false, "workflow overview embedding mount missing DOM readiness");
assertEqual(embeddingMountDomReadinessMissing.missing.join(","), "mount,status,rows", "workflow overview embedding mount missing DOM nodes");
const embeddingMountStateNode = workflowDoc.createElement("section");
embeddingMountStateNode.dataset.workflowOverviewEmbeddingMount = "";
const embeddingMountStatus = workflowDoc.createElement("p");
embeddingMountStatus.dataset.workflowOverviewEmbeddingMountStatus = "";
const embeddingMountRows = workflowDoc.createElement("dl");
embeddingMountRows.dataset.workflowOverviewEmbeddingMountRows = "";
embeddingMountStateNode.append(embeddingMountStatus, embeddingMountRows);
workflowDoc.body.append(embeddingMountStateNode);
const embeddingMountDomReadinessReady = workflowApi.getWorkflowOverviewEmbeddingMountDomReadiness();
assertEqual(embeddingMountDomReadinessReady.ready, true, "workflow overview embedding mount ready DOM readiness");
assertEqual(embeddingMountDomReadinessReady.missing.join(","), "", "workflow overview embedding mount ready DOM missing");
assertEqual(
workflowDoc.querySelector("[data-handoff-workflow]").dataset.handoffScope,
"workflow",

View File

@@ -50,6 +50,7 @@ import {
createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel,
createIniPanelShellWorkflowOverviewEmbeddingMountRenderState,
createIniPanelShellWorkflowOverviewEmbeddingMountDomContract,
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness,
renderIniPanelShellSessionHandoffWorkflowState,
mountIniPanelShellSessionHandoffWorkflow,
renderIniPanelShellSessionHandoffMountState,
@@ -141,6 +142,7 @@ const requiredShellExports = [
"createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel",
"createIniPanelShellWorkflowOverviewEmbeddingMountRenderState",
"createIniPanelShellWorkflowOverviewEmbeddingMountDomContract",
"createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness",
"renderIniPanelShellSessionHandoffWorkflowState",
"mountIniPanelShellSessionHandoffWorkflow",
"renderIniPanelShellSessionHandoffMountState",
@@ -450,6 +452,7 @@ assert.match(shellText, /\bexport function mountIniPanelShellWorkflowOverviewEmb
assert.match(shellText, /\bexport function createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel\b/);
assert.match(shellText, /\bexport function createIniPanelShellWorkflowOverviewEmbeddingMountRenderState\b/);
assert.match(shellText, /\bexport function createIniPanelShellWorkflowOverviewEmbeddingMountDomContract\b/);
assert.match(shellText, /\bexport function createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness\b/);
assert.match(shellText, /\bexport function isSupportedIniPanelControlPageApiManifest\b/);
assert.match(shellText, /\bexport function isSupportedIniPanelLaunchApiManifest\b/);
assert.match(shellText, /\bexport function isSupportedIniPanelShellIntegrationManifest\b/);
@@ -488,6 +491,7 @@ assert.match(launchText, /\bmountWorkflowOverviewEmbeddingState\b/);
assert.match(launchText, /\bgetWorkflowOverviewEmbeddingMountDisplayViewModel\b/);
assert.match(launchText, /\bgetWorkflowOverviewEmbeddingMountRenderState\b/);
assert.match(launchText, /\bgetWorkflowOverviewEmbeddingMountDomContract\b/);
assert.match(launchText, /\bgetWorkflowOverviewEmbeddingMountDomReadiness\b/);
assert.match(launchText, /\bisSupportedShellSessionHandoffPackage\b/);
assert.match(launchText, /\bdata-handoff-shell\b/);
assert.match(launchText, /\bdata-handoff-status\b/);
@@ -531,6 +535,7 @@ assert.match(docText, /\bmountIniPanelShellWorkflowOverviewEmbeddingState\b/);
assert.match(docText, /\bcreateIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel\b/);
assert.match(docText, /\bcreateIniPanelShellWorkflowOverviewEmbeddingMountRenderState\b/);
assert.match(docText, /\bcreateIniPanelShellWorkflowOverviewEmbeddingMountDomContract\b/);
assert.match(docText, /\bcreateIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness\b/);
assert.match(docText, /\bisSupportedIniPanelControlPageApiManifest\b/);
assert.match(docText, /\bisSupportedIniPanelLaunchApiManifest\b/);
assert.match(docText, /\bisSupportedIniPanelShellIntegrationManifest\b/);
@@ -564,6 +569,7 @@ assert.match(docText, /\blinuxCncIniPanelLaunchApi\.mountWorkflowOverviewEmbeddi
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getWorkflowOverviewEmbeddingMountDisplayViewModel\b/);
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getWorkflowOverviewEmbeddingMountRenderState\b/);
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getWorkflowOverviewEmbeddingMountDomContract\b/);
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getWorkflowOverviewEmbeddingMountDomReadiness\b/);
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.isSupportedShellSessionHandoffPackage\b/);
assert.match(docText, /\bdata-handoff-shell\b/);
assert.match(docText, /\bdata-handoff-status\b/);

View File

@@ -89,6 +89,7 @@ assert.deepEqual(manifest, {
"getWorkflowOverviewEmbeddingMountDisplayViewModel",
"getWorkflowOverviewEmbeddingMountRenderState",
"getWorkflowOverviewEmbeddingMountDomContract",
"getWorkflowOverviewEmbeddingMountDomReadiness",
"isSupportedShellSessionHandoffPackage",
"getLauncherLinks",
"getControlPageApiMethods",
@@ -242,6 +243,7 @@ assert.match(launchText, /\bmountWorkflowOverviewEmbeddingState\b/);
assert.match(launchText, /\bgetWorkflowOverviewEmbeddingMountDisplayViewModel\b/);
assert.match(launchText, /\bgetWorkflowOverviewEmbeddingMountRenderState\b/);
assert.match(launchText, /\bgetWorkflowOverviewEmbeddingMountDomContract\b/);
assert.match(launchText, /\bgetWorkflowOverviewEmbeddingMountDomReadiness\b/);
assert.match(launchText, /\bisSupportedShellSessionHandoffPackage\b/);
assert.match(launchText, /\bdata-handoff-workflow\b/);
assert.match(launchText, /\bdata-handoff-workflow-status\b/);

View File

@@ -46,6 +46,7 @@ import {
createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel,
createIniPanelShellWorkflowOverviewEmbeddingMountRenderState,
createIniPanelShellWorkflowOverviewEmbeddingMountDomContract,
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness,
renderIniPanelShellSessionHandoffWorkflowState,
mountIniPanelShellSessionHandoffWorkflow,
createIniPanelShellSessionHandoffPackageReport,
@@ -174,7 +175,7 @@ assert.deepEqual(readiness, {
counts: {
pages: 3,
launcherLinks: 3,
launchMethods: 52,
launchMethods: 53,
controlPageMethods: 11,
persistenceCapabilities: 3,
},
@@ -236,7 +237,7 @@ assert.deepEqual(handoffSummary, {
counts: {
pages: 3,
launcherLinks: 3,
launchMethods: 52,
launchMethods: 53,
controlPageMethods: 11,
persistenceCapabilities: 3,
},
@@ -802,6 +803,7 @@ assert.equal(typeof mountIniPanelShellWorkflowOverviewEmbeddingState, "function"
assert.equal(typeof createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel, "function");
assert.equal(typeof createIniPanelShellWorkflowOverviewEmbeddingMountRenderState, "function");
assert.equal(typeof createIniPanelShellWorkflowOverviewEmbeddingMountDomContract, "function");
assert.equal(typeof createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness, "function");
assert.deepEqual(
createIniPanelShellWorkflowOverviewReadiness({
overviewApi: {
@@ -1230,7 +1232,7 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), {
counts: {
pages: 3,
launcherLinks: 3,
launchMethods: 52,
launchMethods: 53,
controlPageMethods: 11,
persistenceCapabilities: 3,
},
@@ -1422,6 +1424,7 @@ assert.match(shellText, /\bexport function mountIniPanelShellWorkflowOverviewEmb
assert.match(shellText, /\bexport function createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel\b/);
assert.match(shellText, /\bexport function createIniPanelShellWorkflowOverviewEmbeddingMountRenderState\b/);
assert.match(shellText, /\bexport function createIniPanelShellWorkflowOverviewEmbeddingMountDomContract\b/);
assert.match(shellText, /\bexport function createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness\b/);
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageRenderState\b/);
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageSchema\b/);
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffRenderState\b/);
@@ -1469,6 +1472,7 @@ assert.match(docText, /\bmountIniPanelShellWorkflowOverviewEmbeddingState\b/);
assert.match(docText, /\bcreateIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel\b/);
assert.match(docText, /\bcreateIniPanelShellWorkflowOverviewEmbeddingMountRenderState\b/);
assert.match(docText, /\bcreateIniPanelShellWorkflowOverviewEmbeddingMountDomContract\b/);
assert.match(docText, /\bcreateIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness\b/);
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageRenderState\b/);
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageSchema\b/);
assert.match(docText, /\bcreateIniPanelShellSessionHandoffRenderState\b/);

View File

@@ -46,6 +46,7 @@ import {
createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel,
createIniPanelShellWorkflowOverviewEmbeddingMountRenderState,
createIniPanelShellWorkflowOverviewEmbeddingMountDomContract,
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness,
renderIniPanelShellSessionHandoffWorkflowState,
mountIniPanelShellSessionHandoffWorkflow,
renderIniPanelShellSessionHandoffMountState,
@@ -142,6 +143,7 @@ assert.equal(typeof mountIniPanelShellWorkflowOverviewEmbeddingState, "function"
assert.equal(typeof createIniPanelShellWorkflowOverviewEmbeddingMountDisplayViewModel, "function");
assert.equal(typeof createIniPanelShellWorkflowOverviewEmbeddingMountRenderState, "function");
assert.equal(typeof createIniPanelShellWorkflowOverviewEmbeddingMountDomContract, "function");
assert.equal(typeof createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness, "function");
assert.equal(typeof renderIniPanelShellSessionHandoffWorkflowState, "function");
assert.equal(typeof mountIniPanelShellSessionHandoffWorkflow, "function");
assert.equal(typeof renderIniPanelShellSessionHandoffMountState, "function");
@@ -847,6 +849,10 @@ assert.equal(
shellViewModel.createWorkflowOverviewEmbeddingMountDomContract,
createIniPanelShellWorkflowOverviewEmbeddingMountDomContract,
);
assert.equal(
shellViewModel.createWorkflowOverviewEmbeddingMountDomReadiness,
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness,
);
assert.equal(shellViewModel.createShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageReport);
assert.equal(shellViewModel.createShellSessionHandoffPackageSchema, createIniPanelShellSessionHandoffPackageSchema);
assert.equal(shellViewModel.isSupportedShellSessionHandoffPackage, isSupportedIniPanelShellSessionHandoffPackage);
@@ -1581,6 +1587,47 @@ assert.deepEqual(
}).rowDatasetKeys.detail,
["externalEmbeddingMountValue", "externalEmbeddingMountStatus"],
);
assert.deepEqual(
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness({ documentRef: null }),
{
apiName: "ini-panel-shell-workflow-overview-embedding-mount-dom-readiness",
readinessVersion: 1,
phase: "blocked",
ready: false,
missing: ["document", "mount", "status", "rows"],
checks: {
document: false,
mount: false,
status: false,
rows: false,
rowDatasetPrefix: true,
},
contract: createIniPanelShellWorkflowOverviewEmbeddingMountDomContract(),
},
);
assert.deepEqual(
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness({
documentRef: mountDocument,
mountNode,
statusNode: mountStatusNode,
rowsNode: mountRowsNode,
}),
{
apiName: "ini-panel-shell-workflow-overview-embedding-mount-dom-readiness",
readinessVersion: 1,
phase: "ready",
ready: true,
missing: [],
checks: {
document: true,
mount: true,
status: true,
rows: true,
rowDatasetPrefix: true,
},
contract: createIniPanelShellWorkflowOverviewEmbeddingMountDomContract(),
},
);
assert.deepEqual(
mountIniPanelShellWorkflowOverviewEmbedding({ overviewApi: null }).readiness.missing,
shellViewModel.shellWorkflowOverviewContract.methodNames,