Skip to content

Conversation

@Sgw32
Copy link
Owner

@Sgw32 Sgw32 commented Jan 29, 2026

Motivation

  • Provide a visible WebSocket connection indicator on the Control tab so users can see connection state and reload the page when the socket is not connected.

Description

  • Added CSS for a .ws-status area and minor styling updates in ESP32/Digifiz/main/data/digifiz_ws_connect.html.
  • Inserted a new status row in the Control tab including #wsStatusDot, #wsStatusText, and a conditional #wsRefreshButton that is hidden while connected.
  • Implemented setWsStatus() and wired it to the WebSocket lifecycle (socket.onopen, socket.onclose, socket.onerror) to update the status text, dot color classes (gbg, ybg, rbg), and show/hide the refresh button.
  • The refresh button reloads the page when clicked and the initial status is set to Connecting when the socket is created.

Testing

  • Started a local static server with python -m http.server 8000 and fetched the page header with curl -I http://127.0.0.1:8000/digifiz_ws_connect.html, which returned HTTP/1.0 200 OK (success).
  • Attempted automated page rendering and screenshot capture with Playwright to validate the Control tab UI, but the browser runs timed out or crashed in this environment so screenshots could not be produced (fail).
  • Changes were saved and committed to the repository file ESP32/Digifiz/main/data/digifiz_ws_connect.html.

Codex Task

@Sgw32 Sgw32 merged commit 89544a2 into main Jan 29, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants