plc_control/web
caoqianming 42cdbbc0cc fix(web): fetch all unit runtimes on page load
Root cause: state.runtimes was empty after refresh because the engine
only pushes UnitRuntimeChanged on state transitions — if the engine
is mid-wait-phase, no push occurs and badges show OFFLINE.

Fix: add GET /api/unit/runtimes batch endpoint (returns all known
runtimes as { unit_id: UnitRuntime }) and call it in parallel with
the unit list fetch inside loadUnits(), so runtime badges are correct
immediately after page load.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 09:11:47 +08:00
..
html fix(docs): widen API drawer and fix TOC scroll hijacking window 2026-03-25 14:41:17 +08:00
js fix(web): fetch all unit runtimes on page load 2026-03-26 09:11:47 +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