3 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
Ronny Eia
6468dddc05 Scaffold kvida-sdk: Vite + TypeScript web client for device settings
First real content in this repo. Runs as a standalone web app (not on
the ESP32 -- Blockly is far too large for the device's flash),
talking to a device already on the LAN via the JSON API kvida-os now
exposes (see kvida-os's transport README, "JSON API" section).

One page: enter a device address, fetch /api/status + /api/mqtt,
edit and save MQTT broker/credentials back via POST /api/mqtt. Proves
the API end-to-end from a real standalone app before any Blockly work
starts.

No framework yet -- kept minimal until the Blockly editor itself is
designed. Verified: npm install/build are clean (no TS errors), and
the dev server was confirmed reachable with the device's CORS headers
allowing cross-origin fetch() calls from it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-11 14:59:14 +02:00
Ronny Eia
8017e0b834 init commit 2026-07-07 21:53:13 +02:00