Commit Graph
2 Commits
Author SHA1 Message Date
Michael A. CojocariandCopilot c3f13faa53 feat(web): Lua app settings in the web console; Cyberspace 1.1 (#854)
- An app's manifest can list "config" fields (text, password, bool, number).
  The Settings tab shows an Apps group with a page for each such app, and
  saves the values into the app's own wada.store keys: the live store when
  the app is open, the .sav file otherwise. Only declared keys can be
  written; passwords are never sent back to the browser.
- Text that reads as a number (an all-digit password) is saved with a mark
  so it loads back as the same string. Other values keep the old typing.
- Cyberspace 1.1: email, a one-time password (signs in at the next open,
  then erased) and "Stay signed in". Fixes "remember" stored as the
  number 0 being read as on. Host test covers both.
- SDK page, apps README and LUA_APPS.md document "config".

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-15 19:42:09 -05:00
Michael A. CojocariandClaude Opus 5.5 d1571d91ca lua: Cyberspace app, wada.net.request over verified https, wada.json, label:on_press
A client for cyberspace.online (cIRC rooms, C-Mail, the Feed) as a store app,
and the SDK pieces it needed:

- wada.net.request{url, method, headers, body, max}: any method, request
  headers, the real status code. https:// runs in a one-shot TLS task with the
  chain verified against the ISRG roots (CAP_LUA_HTTPS: off on the P4 boards,
  where TLS runs on the C6 unverified, and on the 2 MB Heltec V4).
- wada.json.decode/encode in C; 64-bit integers come back as exact text.
- label:on_press(fn): a label becomes a tap / long-press / cursor target.
- wada.store: get(key) with no default returned the store table for a missing
  key; flush wrote past its 192-byte line buffer; changes now reach the card
  within 2 s instead of only on close.

Host tests: test/test_lua_json.cpp and scripts/lua-harness/cyberspace/run.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01He9DHEuLWYQHXVBnNzzD6E
2026-10-30 20:36:57 -04:00