接入 INI 面板只读 session readiness handoff

This commit is contained in:
2026-06-16 06:47:48 +08:00
parent 03db34485e
commit 68ff2fb5d6
16 changed files with 164 additions and 8 deletions

View File

@@ -9,7 +9,7 @@ turn-by-turn continuation notes and next-batch execution records.
## Current Status ## Current Status
- Active continuation file: `text14.txt` - Active continuation file: `text14.txt`
- Latest completed batch: INI panel session readiness workflow - Latest completed batch: INI panel readonly session readiness handoff
- Latest relevant commit: use `git log -1 --oneline` after each committed batch - Latest relevant commit: use `git log -1 --oneline` after each committed batch
- Working tree at tracker creation: clean - Working tree at tracker creation: clean
- Required policy: LinuxCNC remains the only CNC semantic source - Required policy: LinuxCNC remains the only CNC semantic source
@@ -44,7 +44,7 @@ The project is complete for the current scope when all of the following are true
| Native sim configs baseline | Stable | Last recorded Layer 2: `total 159`, `pass 151`, `expected_fail 8`, `unexpected_fail 0`. | | Native sim configs baseline | Stable | Last recorded Layer 2: `total 159`, `pass 151`, `expected_fail 8`, `unexpected_fail 0`. |
| OPFS/session persistence | Stable for current scope | Browser smoke passes, SDK re-exports OPFS/session helpers including `readMachineSessionReadiness()`, and `docs/opfs-session-persistence.md` defines the project-level release gate. | | OPFS/session persistence | Stable for current scope | Browser smoke passes, SDK re-exports OPFS/session helpers including `readMachineSessionReadiness()`, and `docs/opfs-session-persistence.md` defines the project-level release gate. |
| SDK/API surface | Stable for current scope | SDK re-exports core, OPFS/session readiness/load helpers, sim-config staging, and INI panel shell/workflow overview helpers with a Node surface smoke. | | SDK/API surface | Stable for current scope | SDK re-exports core, OPFS/session readiness/load helpers, sim-config staging, and INI panel shell/workflow overview helpers with a Node surface smoke. |
| Browser/UI workflow | Stable for current scope | Workflow overview embedding mount DOM closure is complete, and INI panel session workflows expose OPFS/session readiness before loading WASM session state. | | Browser/UI workflow | Stable for current scope | Workflow overview embedding mount DOM closure is complete, and INI panel session workflows plus read-only control/shell handoff expose OPFS/session readiness before loading or reading WASM session state. |
| Workflow overview embedding | Stable for current scope | Report/display/render, DOM contract/readiness/renderer, mount result/display/render, mount DOM contract/readiness/renderer/wrapper exist. | | Workflow overview embedding | Stable for current scope | Report/display/render, DOM contract/readiness/renderer, mount result/display/render, mount DOM contract/readiness/renderer/wrapper exist. |
| Host/runtime boundary proof | Stable blocked state | Host smoke passes; runtime families remain blocked and `docs/host-runtime-boundary-handoff.md` records host readiness, promotion blockers, dispatch, and evidence gates. | | Host/runtime boundary proof | Stable blocked state | Host smoke passes; runtime families remain blocked and `docs/host-runtime-boundary-handoff.md` records host readiness, promotion blockers, dispatch, and evidence gates. |
| Documentation/release gate | Stable for current scope | `docs/project-release-handoff.md` links README, panel entry, SDK, OPFS/session, sim-config, host/runtime, source reuse, drift, and tracker acceptance paths. | | Documentation/release gate | Stable for current scope | `docs/project-release-handoff.md` links README, panel entry, SDK, OPFS/session, sim-config, host/runtime, source reuse, drift, and tracker acceptance paths. |

View File

@@ -1776,3 +1776,71 @@ browser_ini_shell_integration_workflow_smoke=ok
继续做实质能力推进。下一批建议把 session readiness report 纳入 read-only control page status 或 继续做实质能力推进。下一批建议把 session readiness report 纳入 read-only control page status 或
shell handoff package/display view-model让外部 shell 不进入 editor 页面也能读取 session shell handoff package/display view-model让外部 shell 不进入 editor 页面也能读取 session
ready/blocked 原因;仍保持只读,不新增控制按钮,不解析 G-code不扩大 LinuxCNC 语义边界。 ready/blocked 原因;仍保持只读,不新增控制按钮,不解析 G-code不扩大 LinuxCNC 语义边界。
二十二、2026-06-16 继续执行记录INI panel readonly session readiness handoff
本轮继续以功能实质性推进为主,把上一批 session readiness report 纳入只读 control page status
和 external shell handoff contract。现在外部 shell 不进入 editor 页面,也能通过 read-only status
读取 machine-session ready/blocked 原因。
完成内容:
- `wasm-port/runtime/ui/ini-panel/panel-state-summary.js` 将 `sessionReadiness` 纳入:
- `createIniPanelStateSummary()`
- `createMachineSessionStateSnapshot()`
- `createMachineSessionStateReport()`
- `createMachineSessionWorkflowStatus()`
- `wasm-port/runtime/ui/ini-panel/readonly-status-api.js` 新增只读 `sessionReadiness` 字段;
- readonly status API manifest 的 `statusFields` 新增 `sessionReadiness`
- `wasm-port/runtime/ui/ini-panel/control-page-session-workflow.js` 在 waiting/ready session load state
中透出 `sessionReadiness`
- `wasm-port/docs/panel-entry.md` 记录外部 shell 可通过 read-only status 和 control-page session
workflow 获取 machine-session ready/blocked 状态;
- Node 测试覆盖 state summary、readonly status API、control-page session workflow、control-page
controller、shell control-page contract、shell integration manifest、entry docs、ui shell
- Browser smoke 覆盖真实 control page readonly status 和 shell handoff readonly status 中的
`sessionReadiness`
- 未新增控制按钮;
- 未执行 action-plan
- 未解析 G-code
- 未解释 canonical events
- 未新增 JS CNC 语义;
- 未运行 opt-in runtime probes
- 未 promotion blocked runtime family
- 未改变 LinuxCNC interpreter、tool、parameter、planner、kinematics、remap 或 LinuxCNC-owned
runtime semantics。
验证已通过:
```bash
git diff --check
wasm-port/tools/verify_vendor_sync.sh
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
wasm-port/tests/ui/node/verify_ui_node_smokes.sh
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
wasm-port/tests/host/verify_host_smokes.sh
```
关键输出:
```text
vendor sync up to date
standalone CNC semantics guard complete
interp_wasm_node_smoke=ok
sim_configs_wasm_node_inventory_unexpected_fail=0
ui_node_smokes=ok
browser_ini_opfs_smoke=ok
browser_ini_control_page_smoke=ok
browser_ini_launch_smoke=ok
browser_ini_workflow_overview_smoke=ok
browser_ini_shell_integration_workflow_smoke=ok
host_wasm_opfs_browser_smokes=ok
```
下一步工作计划:
继续以实质能力推进为主。下一批可把 `sessionReadiness` 纳入 shell handoff workflow display/render rows
让外部 shell 的已挂载 handoff 面板直接展示 ready/blocked 原因;仍保持只读,不新增控制按钮,不解析
G-code不扩大 LinuxCNC 语义边界。

View File

@@ -126,7 +126,8 @@ read-only model with `pages`, `launcherLinks`, and `controlPage` helpers for
mounting the existing control-page controller, refresh workflow, and renderer. mounting the existing control-page controller, refresh workflow, and renderer.
Use `controlPage.readStatus` or `readMachineSessionReadonlyStatus()` when an Use `controlPage.readStatus` or `readMachineSessionReadonlyStatus()` when an
outer shell needs one stable read of `stateBundle`, `workflowStatus`, outer shell needs one stable read of `stateBundle`, `workflowStatus`,
`overview`, `controlView`, `session`, `runReadiness`, and `run`. `overview`, `controlView`, `sessionReadiness`, `session`, `runReadiness`, and
`run`.
Use `createMachineSessionReadonlyStatusApiManifest()` or Use `createMachineSessionReadonlyStatusApiManifest()` or
`controlPage.readonlyStatusApiManifest` when you only need the API shape and `controlPage.readonlyStatusApiManifest` when you only need the API shape and
method names. method names.
@@ -433,7 +434,8 @@ state-shape helper used by the workflow.
The control-page session workflow lives in The control-page session workflow lives in
`runtime/ui/ini-panel/control-page-session-workflow.js`. Use `runtime/ui/ini-panel/control-page-session-workflow.js`. Use
`loadMachineSessionForControlPageWorkflow()` when an outer shell needs a `loadMachineSessionForControlPageWorkflow()` when an outer shell needs a
read-only readiness snapshot for the embedded panel API and first control view. read-only readiness snapshot for the embedded panel API, machine-session
ready/blocked state, and first control view.
`createControlPageSessionLoadState()` is the stable state-shape helper for `createControlPageSessionLoadState()` is the stable state-shape helper for
`waiting-panel`, `waiting-api`, `waiting-session`, `ready`, and `error` phases. `waiting-panel`, `waiting-api`, `waiting-session`, `ready`, and `error` phases.

View File

@@ -5,6 +5,7 @@ export function createControlPageSessionLoadState({
controlViewReady = false, controlViewReady = false,
stateBundle = null, stateBundle = null,
workflowStatus = null, workflowStatus = null,
sessionReadiness = null,
controlView = null, controlView = null,
error = null, error = null,
} = {}) { } = {}) {
@@ -15,11 +16,19 @@ export function createControlPageSessionLoadState({
controlViewReady, controlViewReady,
stateBundle, stateBundle,
workflowStatus, workflowStatus,
sessionReadiness,
controlView, controlView,
error, error,
}; };
} }
function getSessionReadiness(stateBundle, workflowStatus) {
return workflowStatus?.sessionReadiness
?? stateBundle?.workflowStatus?.sessionReadiness
?? stateBundle?.report?.sessionReadiness
?? null;
}
export function loadMachineSessionForControlPageWorkflow({ export function loadMachineSessionForControlPageWorkflow({
getPanelWindow, getPanelWindow,
getPanelApi, getPanelApi,
@@ -63,22 +72,28 @@ export function loadMachineSessionForControlPageWorkflow({
} }
if (!controlView) { if (!controlView) {
const stateBundle = panelApi.getMachineSessionStateBundle?.() ?? null;
const workflowStatus = panelApi.getMachineSessionWorkflowStatus?.() ?? null;
return createControlPageSessionLoadState({ return createControlPageSessionLoadState({
phase: "waiting-session", phase: "waiting-session",
panelReady: true, panelReady: true,
apiReady: true, apiReady: true,
stateBundle: panelApi.getMachineSessionStateBundle?.() ?? null, stateBundle,
workflowStatus: panelApi.getMachineSessionWorkflowStatus?.() ?? null, workflowStatus,
sessionReadiness: getSessionReadiness(stateBundle, workflowStatus),
}); });
} }
const stateBundle = panelApi.getMachineSessionStateBundle?.() ?? null;
const workflowStatus = panelApi.getMachineSessionWorkflowStatus?.() ?? null;
return createControlPageSessionLoadState({ return createControlPageSessionLoadState({
phase: "ready", phase: "ready",
panelReady: true, panelReady: true,
apiReady: true, apiReady: true,
controlViewReady: true, controlViewReady: true,
stateBundle: panelApi.getMachineSessionStateBundle?.() ?? null, stateBundle,
workflowStatus: panelApi.getMachineSessionWorkflowStatus?.() ?? null, workflowStatus,
sessionReadiness: getSessionReadiness(stateBundle, workflowStatus),
controlView, controlView,
}); });
} }

View File

@@ -3,6 +3,7 @@ export function createIniPanelStateSummary({
machine = null, machine = null,
machineFiles = null, machineFiles = null,
sessionSnapshot = null, sessionSnapshot = null,
sessionReadiness = null,
sessionLoad = null, sessionLoad = null,
runReadiness = null, runReadiness = null,
run = null, run = null,
@@ -17,6 +18,7 @@ export function createIniPanelStateSummary({
machine, machine,
machineFiles, machineFiles,
sessionSnapshot, sessionSnapshot,
sessionReadiness,
sessionLoad, sessionLoad,
runReadiness, runReadiness,
run, run,
@@ -29,6 +31,7 @@ export function createMachineSessionStateSnapshot({
machine = null, machine = null,
machineFiles = null, machineFiles = null,
sessionSnapshot = null, sessionSnapshot = null,
sessionReadiness = null,
sessionLoad = null, sessionLoad = null,
runReadiness = null, runReadiness = null,
selectedProgram = null, selectedProgram = null,
@@ -44,6 +47,7 @@ export function createMachineSessionStateSnapshot({
machine, machine,
machineFiles, machineFiles,
sessionSnapshot, sessionSnapshot,
sessionReadiness,
sessionLoad, sessionLoad,
runReadiness, runReadiness,
run, run,
@@ -72,6 +76,7 @@ export function createMachineSessionStateReport(state = {}) {
const badges = state.badges ?? {}; const badges = state.badges ?? {};
const fields = state.fields ?? {}; const fields = state.fields ?? {};
const sessionSnapshot = state.sessionSnapshot ?? {}; const sessionSnapshot = state.sessionSnapshot ?? {};
const sessionReadiness = state.sessionReadiness ?? null;
const sessionLoad = state.sessionLoad ?? {}; const sessionLoad = state.sessionLoad ?? {};
const runReadiness = state.runReadiness ?? {}; const runReadiness = state.runReadiness ?? {};
const selectedProgram = state.selectedProgram ?? {}; const selectedProgram = state.selectedProgram ?? {};
@@ -90,6 +95,7 @@ export function createMachineSessionStateReport(state = {}) {
toolTable: fields.sessionToolTable ?? sessionSnapshot.toolTableOpfsPath ?? sessionLoad.toolTableWasmPath ?? null, toolTable: fields.sessionToolTable ?? sessionSnapshot.toolTableOpfsPath ?? sessionLoad.toolTableWasmPath ?? null,
gcode: fields.sessionGcode ?? sessionSnapshot.gcodeOpfsPath ?? null, gcode: fields.sessionGcode ?? sessionSnapshot.gcodeOpfsPath ?? null,
}, },
sessionReadiness,
loaded: { loaded: {
iniWasmPath: sessionLoad.iniWasmPath ?? null, iniWasmPath: sessionLoad.iniWasmPath ?? null,
parameterWasmPath: sessionLoad.parameterWasmPath ?? null, parameterWasmPath: sessionLoad.parameterWasmPath ?? null,
@@ -141,6 +147,7 @@ export function createMachineSessionWorkflowStatus(state = {}) {
return { return {
readiness: report.readiness, readiness: report.readiness,
overview, overview,
sessionReadiness: report.sessionReadiness ?? null,
runReadiness: report.runReadiness, runReadiness: report.runReadiness,
lastAction: report.status.lastAction, lastAction: report.status.lastAction,
error: report.status.error, error: report.status.error,

View File

@@ -4,12 +4,17 @@ export function createMachineSessionReadonlyStatus({
controlView = null, controlView = null,
} = {}) { } = {}) {
const overview = stateBundle?.overview ?? workflowStatus?.overview ?? null; const overview = stateBundle?.overview ?? workflowStatus?.overview ?? null;
const sessionReadiness = workflowStatus?.sessionReadiness
?? stateBundle?.workflowStatus?.sessionReadiness
?? stateBundle?.report?.sessionReadiness
?? null;
return { return {
stateBundle, stateBundle,
workflowStatus, workflowStatus,
overview, overview,
controlView, controlView,
report: stateBundle?.report ?? null, report: stateBundle?.report ?? null,
sessionReadiness,
runReadiness: workflowStatus?.runReadiness ?? stateBundle?.report?.runReadiness ?? null, runReadiness: workflowStatus?.runReadiness ?? stateBundle?.report?.runReadiness ?? null,
run: workflowStatus?.run ?? stateBundle?.report?.run ?? null, run: workflowStatus?.run ?? stateBundle?.report?.run ?? null,
session: workflowStatus?.session ?? stateBundle?.report?.session ?? null, session: workflowStatus?.session ?? stateBundle?.report?.session ?? null,
@@ -42,6 +47,7 @@ export function createMachineSessionReadonlyStatusApiManifest() {
"overview", "overview",
"controlView", "controlView",
"report", "report",
"sessionReadiness",
"runReadiness", "runReadiness",
"run", "run",
"session", "session",

View File

@@ -218,6 +218,11 @@ TOOL_TABLE = browser-tool.tbl
"load-session", "load-session",
"control page readonly status workflow last action after load", "control page readonly status workflow last action after load",
); );
assertEqual(
loadedStatus.sessionReadiness.ready,
true,
"control page readonly status session readiness",
);
assertEqual( assertEqual(
loadedStatus.controlView.status.lastAction, loadedStatus.controlView.status.lastAction,
"load-session", "load-session",

View File

@@ -268,6 +268,11 @@ TOOL_TABLE = browser-shell-tool.tbl
assertEqual(handoffSummary.handoffMethods.loadSessionState, "loadControlPageSessionState", "shell handoff load method"); assertEqual(handoffSummary.handoffMethods.loadSessionState, "loadControlPageSessionState", "shell handoff load method");
assertEqual(handoffSummary.handoffMethods.readStatus, "readControlPageStatus", "shell handoff status method"); assertEqual(handoffSummary.handoffMethods.readStatus, "readControlPageStatus", "shell handoff status method");
assertEqual(handoffSummary.readonlyStatusFields.includes("session"), true, "shell handoff readonly session field"); assertEqual(handoffSummary.readonlyStatusFields.includes("session"), true, "shell handoff readonly session field");
assertEqual(
handoffSummary.readonlyStatusFields.includes("sessionReadiness"),
true,
"shell handoff readonly session readiness field",
);
assertEqual(handoffSummary.persistenceCapabilities.length, 3, "shell handoff persistence capabilities"); assertEqual(handoffSummary.persistenceCapabilities.length, 3, "shell handoff persistence capabilities");
assertEqual(readiness.apiNames.launch, "ini-panel-launch", "shell integration launch API name"); assertEqual(readiness.apiNames.launch, "ini-panel-launch", "shell integration launch API name");
assertEqual( assertEqual(
@@ -531,6 +536,11 @@ TOOL_TABLE = browser-shell-tool.tbl
}); });
assertEqual(readonlyStatusResult.phase, "ready", "shell handoff readonly status result phase"); assertEqual(readonlyStatusResult.phase, "ready", "shell handoff readonly status result phase");
assertEqual(readonlyStatusResult.ready, true, "shell handoff readonly status result readiness"); assertEqual(readonlyStatusResult.ready, true, "shell handoff readonly status result readiness");
assertEqual(
readonlyStatus.sessionReadiness.ready,
true,
"shell handoff readonly status session readiness",
);
assertEqual( assertEqual(
readonlyStatusResult.missingStatusFields.join(","), readonlyStatusResult.missingStatusFields.join(","),
"", "",

View File

@@ -93,6 +93,7 @@ assert.deepEqual(controller.readStatus(), {
overview: null, overview: null,
controlView: expectedView, controlView: expectedView,
report: expectedStateBundle.report, report: expectedStateBundle.report,
sessionReadiness: null,
runReadiness: null, runReadiness: null,
run: null, run: null,
session: null, session: null,
@@ -109,6 +110,7 @@ assert.deepEqual(controller.loadSessionState(), {
controlViewReady: true, controlViewReady: true,
stateBundle: expectedStateBundle, stateBundle: expectedStateBundle,
workflowStatus: expectedWorkflowStatus, workflowStatus: expectedWorkflowStatus,
sessionReadiness: null,
controlView: expectedView, controlView: expectedView,
error: null, error: null,
}); });

View File

@@ -21,6 +21,11 @@ const workflowStatus = {
overview: { overview: {
phase: "ready", phase: "ready",
}, },
sessionReadiness: {
phase: "ready",
ready: true,
missing: [],
},
lastAction: "load-session", lastAction: "load-session",
error: null, error: null,
}; };
@@ -40,6 +45,7 @@ assert.deepEqual(createControlPageSessionLoadState({ phase: "waiting-panel" }),
controlViewReady: false, controlViewReady: false,
stateBundle: null, stateBundle: null,
workflowStatus: null, workflowStatus: null,
sessionReadiness: null,
controlView: null, controlView: null,
error: null, error: null,
}); });
@@ -81,6 +87,7 @@ assert.deepEqual(
apiReady: true, apiReady: true,
stateBundle, stateBundle,
workflowStatus, workflowStatus,
sessionReadiness: workflowStatus.sessionReadiness,
}), }),
); );
@@ -101,6 +108,7 @@ assert.deepEqual(
controlViewReady: true, controlViewReady: true,
stateBundle, stateBundle,
workflowStatus, workflowStatus,
sessionReadiness: workflowStatus.sessionReadiness,
controlView, controlView,
}), }),
); );

View File

@@ -430,6 +430,7 @@ assert.deepEqual(createControlPageSessionLoadState({ phase: "waiting-panel" }),
controlViewReady: false, controlViewReady: false,
stateBundle: null, stateBundle: null,
workflowStatus: null, workflowStatus: null,
sessionReadiness: null,
controlView: null, controlView: null,
error: null, error: null,
}); });

View File

@@ -30,6 +30,11 @@ const stateBundle = {
}; };
const workflowStatus = { const workflowStatus = {
overview: stateBundle.overview, overview: stateBundle.overview,
sessionReadiness: {
phase: "ready",
ready: true,
missing: [],
},
runReadiness: stateBundle.report.runReadiness, runReadiness: stateBundle.report.runReadiness,
session: stateBundle.report.session, session: stateBundle.report.session,
run: stateBundle.report.run, run: stateBundle.report.run,
@@ -56,6 +61,7 @@ assert.deepEqual(
overview: stateBundle.overview, overview: stateBundle.overview,
controlView, controlView,
report: stateBundle.report, report: stateBundle.report,
sessionReadiness: workflowStatus.sessionReadiness,
runReadiness: stateBundle.report.runReadiness, runReadiness: stateBundle.report.runReadiness,
run: stateBundle.report.run, run: stateBundle.report.run,
session: stateBundle.report.session, session: stateBundle.report.session,
@@ -73,6 +79,7 @@ assert.deepEqual(createMachineSessionReadonlyStatus(), {
overview: null, overview: null,
controlView: null, controlView: null,
report: null, report: null,
sessionReadiness: null,
runReadiness: null, runReadiness: null,
run: null, run: null,
session: null, session: null,
@@ -103,6 +110,7 @@ assert.deepEqual(createMachineSessionReadonlyStatusApiManifest(), {
"overview", "overview",
"controlView", "controlView",
"report", "report",
"sessionReadiness",
"runReadiness", "runReadiness",
"run", "run",
"session", "session",

View File

@@ -59,6 +59,7 @@ assert.deepEqual(contract, {
"overview", "overview",
"controlView", "controlView",
"report", "report",
"sessionReadiness",
"runReadiness", "runReadiness",
"run", "run",
"session", "session",

View File

@@ -217,6 +217,7 @@ assert.deepEqual(workflowPlan, {
"overview", "overview",
"controlView", "controlView",
"report", "report",
"sessionReadiness",
"runReadiness", "runReadiness",
"run", "run",
"session", "session",
@@ -272,6 +273,7 @@ assert.deepEqual(handoffSummary, {
"overview", "overview",
"controlView", "controlView",
"report", "report",
"sessionReadiness",
"runReadiness", "runReadiness",
"run", "run",
"session", "session",

View File

@@ -68,6 +68,12 @@ const expectedEmptyRunReadinessReport = {
iniWasmPath: null, iniWasmPath: null,
}; };
const sessionReadinessFixture = {
phase: "ready",
ready: true,
missing: [],
};
const expectedWorkflowOverview = { const expectedWorkflowOverview = {
phase: "ran", phase: "ran",
missing: [], missing: [],
@@ -120,6 +126,7 @@ const summary = createIniPanelStateSummary({
snapshotLabel: "ui-machine-session/ui-machine-session.json", snapshotLabel: "ui-machine-session/ui-machine-session.json",
workflow: "save-session-snapshot", workflow: "save-session-snapshot",
}, },
sessionReadiness: sessionReadinessFixture,
sessionLoad: { sessionLoad: {
iniOpfsPath: "linuxcnc/machines/xyzab-tdr/machine.ini", iniOpfsPath: "linuxcnc/machines/xyzab-tdr/machine.ini",
iniWasmPath: "/work/session-machine.ini", iniWasmPath: "/work/session-machine.ini",
@@ -152,6 +159,7 @@ assert.deepEqual(summary, {
snapshotLabel: "ui-machine-session/ui-machine-session.json", snapshotLabel: "ui-machine-session/ui-machine-session.json",
workflow: "save-session-snapshot", workflow: "save-session-snapshot",
}, },
sessionReadiness: sessionReadinessFixture,
sessionLoad: { sessionLoad: {
iniOpfsPath: "linuxcnc/machines/xyzab-tdr/machine.ini", iniOpfsPath: "linuxcnc/machines/xyzab-tdr/machine.ini",
iniWasmPath: "/work/session-machine.ini", iniWasmPath: "/work/session-machine.ini",
@@ -175,6 +183,7 @@ assert.deepEqual(
machine: null, machine: null,
machineFiles: null, machineFiles: null,
sessionSnapshot: null, sessionSnapshot: null,
sessionReadiness: null,
sessionLoad: null, sessionLoad: null,
runReadiness: null, runReadiness: null,
run: null, run: null,
@@ -195,6 +204,7 @@ assert.deepEqual(
sessionSnapshot: { sessionSnapshot: {
snapshotLabel: "ui-machine-session/ui-machine-session.json", snapshotLabel: "ui-machine-session/ui-machine-session.json",
}, },
sessionReadiness: sessionReadinessFixture,
sessionLoad: { sessionLoad: {
iniWasmPath: "/work/session-machine.ini", iniWasmPath: "/work/session-machine.ini",
}, },
@@ -237,6 +247,7 @@ assert.deepEqual(
sessionSnapshot: { sessionSnapshot: {
snapshotLabel: "ui-machine-session/ui-machine-session.json", snapshotLabel: "ui-machine-session/ui-machine-session.json",
}, },
sessionReadiness: sessionReadinessFixture,
sessionLoad: { sessionLoad: {
iniWasmPath: "/work/session-machine.ini", iniWasmPath: "/work/session-machine.ini",
}, },
@@ -311,6 +322,7 @@ assert.deepEqual(
parameterWasmPath: "/work/session-linuxcnc.var", parameterWasmPath: "/work/session-linuxcnc.var",
toolTableWasmPath: "/work/session-tool.tbl", toolTableWasmPath: "/work/session-tool.tbl",
}, },
sessionReadiness: sessionReadinessFixture,
runReadiness: runReadinessFixture, runReadiness: runReadinessFixture,
selectedProgram: { selectedProgram: {
source: "snapshot", source: "snapshot",
@@ -344,6 +356,7 @@ assert.deepEqual(
toolTable: "/work/session-tool.tbl", toolTable: "/work/session-tool.tbl",
gcode: "linuxcnc/gcode/ui-session.ngc", gcode: "linuxcnc/gcode/ui-session.ngc",
}, },
sessionReadiness: sessionReadinessFixture,
loaded: { loaded: {
iniWasmPath: "/work/session-machine.ini", iniWasmPath: "/work/session-machine.ini",
parameterWasmPath: "/work/session-linuxcnc.var", parameterWasmPath: "/work/session-linuxcnc.var",
@@ -383,6 +396,7 @@ const expectedExportReport = {
toolTable: null, toolTable: null,
gcode: null, gcode: null,
}, },
sessionReadiness: null,
loaded: { loaded: {
iniWasmPath: "/work/session-machine.ini", iniWasmPath: "/work/session-machine.ini",
parameterWasmPath: null, parameterWasmPath: null,
@@ -446,6 +460,7 @@ assert.deepEqual(
runWorkflow: "save-session-snapshot", runWorkflow: "save-session-snapshot",
}, },
runReadiness: runReadinessFixture, runReadiness: runReadinessFixture,
sessionReadiness: sessionReadinessFixture,
run: { run: {
runStatus: "ok", runStatus: "ok",
canonicalEventCount: 2, canonicalEventCount: 2,
@@ -492,6 +507,7 @@ assert.deepEqual(
}, },
}, },
runReadiness: expectedRunReadinessReport, runReadiness: expectedRunReadinessReport,
sessionReadiness: sessionReadinessFixture,
lastAction: "run-gcode", lastAction: "run-gcode",
error: null, error: null,
session: { session: {
@@ -525,6 +541,7 @@ const expectedBundleReport = {
toolTable: null, toolTable: null,
gcode: "linuxcnc/gcode/ui-session.ngc", gcode: "linuxcnc/gcode/ui-session.ngc",
}, },
sessionReadiness: sessionReadinessFixture,
loaded: { loaded: {
iniWasmPath: null, iniWasmPath: null,
parameterWasmPath: null, parameterWasmPath: null,
@@ -569,6 +586,7 @@ assert.deepEqual(
runWorkflow: "save-session-snapshot", runWorkflow: "save-session-snapshot",
}, },
runReadiness: runReadinessFixture, runReadiness: runReadinessFixture,
sessionReadiness: sessionReadinessFixture,
run: { run: {
runStatus: "ok", runStatus: "ok",
canonicalEventCount: 2, canonicalEventCount: 2,
@@ -593,6 +611,7 @@ assert.deepEqual(
opfs: "OPFS: ready", opfs: "OPFS: ready",
}, },
overview: expectedWorkflowOverview, overview: expectedWorkflowOverview,
sessionReadiness: sessionReadinessFixture,
lastAction: "run-gcode", lastAction: "run-gcode",
error: null, error: null,
runReadiness: expectedRunReadinessReport, runReadiness: expectedRunReadinessReport,

View File

@@ -96,6 +96,7 @@ assert.deepEqual(createControlPageSessionLoadState({ phase: "waiting-panel" }),
controlViewReady: false, controlViewReady: false,
stateBundle: null, stateBundle: null,
workflowStatus: null, workflowStatus: null,
sessionReadiness: null,
controlView: null, controlView: null,
error: null, error: null,
}); });
@@ -1078,6 +1079,7 @@ assert.deepEqual(missingStatusResult.missingStatusFields, [
"overview", "overview",
"controlView", "controlView",
"report", "report",
"sessionReadiness",
"runReadiness", "runReadiness",
"run", "run",
"session", "session",