推进 INI 面板 machine session state report helper
This commit is contained in:
@@ -62,6 +62,25 @@ The INI panel updates this state after save, restore, load, run, and error
|
||||
paths so browser tests and future API consumers can read one machine-readable
|
||||
state object instead of collecting DOM fields and log text.
|
||||
|
||||
## `createMachineSessionStateReport(state)`
|
||||
|
||||
This helper converts the richer state snapshot into a stable consumer report
|
||||
with four sections:
|
||||
|
||||
```js
|
||||
{
|
||||
readiness: { ini: "...", interp: "...", opfs: "..." },
|
||||
session: { snapshotLabel: "...", workflow: "...", ini: "...", parameters: "...", toolTable: "...", gcode: "..." },
|
||||
loaded: { iniWasmPath: "...", parameterWasmPath: "...", toolTableWasmPath: "..." },
|
||||
program: { source: "snapshot", opfsPath: "...", wasmPath: "..." },
|
||||
run: { status: "ok", canonicalEventCount: 2, motionSnapshotCount: 2, iniWasmPath: "..." },
|
||||
status: { lastAction: "run-gcode", error: null, fiveaxisRemap: "ok" }
|
||||
}
|
||||
```
|
||||
|
||||
The report is intended for upper-level UI consumers or export paths that want a
|
||||
stable summary shape without touching DOM nodes.
|
||||
|
||||
## Boundary Rules
|
||||
|
||||
- Do not parse G-code text in this helper.
|
||||
|
||||
Reference in New Issue
Block a user