[codex] fix web ui to match exposed firmware api #7
Reference in New Issue
Block a user
Delete Branch "codex/webui-align-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The static web UI in
data/webui/was out of sync with the firmware HTTP API currently exposed byWebServerManager.Problem
UI sections were calling endpoints that do not exist in firmware:
/api/contacts/api/config/api/logsThis made key sections effectively broken despite the backend being healthy.
Root Cause
Legacy frontend assumptions drifted from backend route evolution.
Fix
Reworked the web UI to map 1:1 to currently exposed firmware routes.
Updated UI behavior
/api/status/api/config/pins,/api/config/audio,/api/config/mqtt/api/network/wifi,/api/network/wifi/connect,/api/network/wifi/disconnect,/api/network/wifi/scan/api/network/mqtt,/api/network/mqtt/connect,/api/network/mqtt/disconnect/api/network/espnow,/api/network/espnow/peer,/api/network/espnow/send/api/controlwith direct command actions (CALL,CAPTURE_START,CAPTURE_STOP,RESET_METRICS, raw command input)Files changed
data/webui/index.htmldata/webui/script.jsdata/webui/style.cssValidation
platformio run -e esp32dev-> SUCCESSImpact
Web UI becomes operational again against the current firmware API without backend changes.
Cross-repo coordination links:\n- Zacus issue: https://github.com/electron-rare/le-mystere-professeur-zacus/issues/90\n- Kill_LIFE gate proposal: (issue opened in electron-rare/Kill_LIFE)
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
8ef445eac3ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The prefilled ESP-NOW payload is escaped as
{"cmd":"STATUS"}, which is not valid JSON forparsePayloadValueindata/webui/script.js; when users submit without editing, the UI sends an escaped string payload rather than a JSON object, so peers that expect an object command receive malformed content. This affects the default/quick-send path directly.Useful? React with 👍 / 👎.