推进 INI 面板 workflow status helper
This commit is contained in:
@@ -18,6 +18,10 @@ directly. The legacy `window.getMachineSessionStateReport()` and
|
||||
`window.getMachineSessionStateReportExport()` globals remain as compatibility
|
||||
shims.
|
||||
|
||||
For control-page polling, use
|
||||
`window.linuxCncIniPanelApi.getMachineSessionWorkflowStatus()`. It returns a
|
||||
smaller workflow-facing object derived from the same report data.
|
||||
|
||||
## `createIniPanelStateSummary(input)`
|
||||
|
||||
`input` may contain:
|
||||
@@ -103,6 +107,23 @@ This helper wraps the report in a stable export payload:
|
||||
|
||||
It is a small export-layer helper for future copy/download/UI SDK wrappers.
|
||||
|
||||
## `createMachineSessionWorkflowStatus(state)`
|
||||
|
||||
This helper derives a lightweight status object for upper-level control pages:
|
||||
|
||||
```js
|
||||
{
|
||||
readiness: { ini: "...", interp: "...", opfs: "..." },
|
||||
lastAction: "run-gcode",
|
||||
error: null,
|
||||
session: { snapshotLabel: "...", workflow: "...", gcode: "..." },
|
||||
run: { status: "ok", canonicalEventCount: 2, motionSnapshotCount: 2, iniWasmPath: "..." }
|
||||
}
|
||||
```
|
||||
|
||||
It is intended for polling or status panels that need current UI workflow
|
||||
state without parsing logs, DOM nodes, or transient window state.
|
||||
|
||||
## Boundary Rules
|
||||
|
||||
- Do not parse G-code text in this helper.
|
||||
|
||||
Reference in New Issue
Block a user