Commit Graph

1 Commits

Author SHA1 Message Date
Ronny Eia
7bb77a93a7 Add CodeMirror-based script editor, verified against real hardware
New Script section: loads the device's current Lua script (GET
/api/script), edits it in a real code editor (CodeMirror 6 with Lua
syntax highlighting via @codemirror/legacy-modes -- no dedicated
@codemirror/lang-lua package exists, verified against the npm
registry), and saves it back (POST /api/script) as raw text, not
JSON, matching the device's endpoint. Not Blockly yet -- that's its
own, much larger task; this is the raw-text step toward it.

Verified end-to-end against a real ESP32-C6: load, edit, save
hot-reloads on-device within one tick, and the change survives a
power cycle.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-12 10:27:13 +02:00