plc_control/web
caoqianming 08add0d087 refactor(api): embed runtime in unit list/get/detail responses
Remove the standalone GET /api/unit/runtimes endpoint in favour of
embedding runtime directly in existing responses:
- GET /api/unit          → each item now includes `runtime` field
- GET /api/unit/:id      → returns UnitWithRuntime
- GET /api/unit/:id/detail → UnitDetail now includes `runtime`

runtime is null when the engine has not yet initialised the unit.
Frontend loadUnits() reads the embedded runtime field to populate
state.runtimes — one request instead of two.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 09:18:14 +08:00
..
html fix(docs): widen API drawer and fix TOC scroll hijacking window 2026-03-25 14:41:17 +08:00
js refactor(api): embed runtime in unit list/get/detail responses 2026-03-26 09:18:14 +08:00
index.html refactor(web): unify toast — remove duplicate, reuse api.js showToast 2026-03-25 13:11:23 +08:00
styles.css refactor(engine): replace 500ms ticker with per-unit event-driven tasks 2026-03-26 08:33:00 +08:00