Uses /api/control with direct command actions (CALL, CAPTURE_START, CAPTURE_STOP, RESET_METRICS, raw command input)
Files changed
data/webui/index.html
data/webui/script.js
data/webui/style.css
Validation
Confirmed frontend no longer references removed endpoints.
Firmware build check passed:
platformio run -e esp32dev -> SUCCESS
Impact
Web UI becomes operational again against the current firmware API without backend changes.
## Context
The static web UI in `data/webui/` was out of sync with the firmware HTTP API currently exposed by `WebServerManager`.
## Problem
UI sections were calling endpoints that do not exist in firmware:
- `/api/contacts`
- `/api/config`
- `/api/logs`
This 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
- Dashboard:
- Reads `/api/status`
- Configuration:
- Reads `/api/config/pins`, `/api/config/audio`, `/api/config/mqtt`
- Network:
- WiFi: `/api/network/wifi`, `/api/network/wifi/connect`, `/api/network/wifi/disconnect`, `/api/network/wifi/scan`
- MQTT: `/api/network/mqtt`, `/api/network/mqtt/connect`, `/api/network/mqtt/disconnect`
- ESP-NOW: `/api/network/espnow`, `/api/network/espnow/peer`, `/api/network/espnow/send`
- Control:
- Uses `/api/control` with direct command actions (`CALL`, `CAPTURE_START`, `CAPTURE_STOP`, `RESET_METRICS`, raw command input)
## Files changed
- `data/webui/index.html`
- `data/webui/script.js`
- `data/webui/style.css`
## Validation
- Confirmed frontend no longer references removed endpoints.
- Firmware build check passed:
- `platformio run -e esp32dev` -> SUCCESS
## Impact
Web UI becomes operational again against the current firmware API without backend changes.
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".
### 💡 Codex Review
Here are some automated review suggestions for this pull request.
**Reviewed commit:** `8ef445eac3`
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
[Your team has set up Codex to review pull requests in this repo](http://chatgpt.com/codex/settings/general). Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
</details>
The prefilled ESP-NOW payload is escaped as {"cmd":"STATUS"}, which is not valid JSON for parsePayloadValue in data/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 👍 / 👎.
**<sub><sub></sub></sub> Set valid JSON default for ESP-NOW payload**
The prefilled ESP-NOW payload is escaped as `{"cmd":"STATUS"}`, which is not valid JSON for `parsePayloadValue` in `data/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 👍 / 👎.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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 👍 / 👎.