Skip to content

Fix console log toggles drifting out of sync with device state#921

Merged
IgorYbema merged 1 commit into
heishamon:mainfrom
IgorYbema:main
Jul 2, 2026
Merged

Fix console log toggles drifting out of sync with device state#921
IgorYbema merged 1 commit into
heishamon:mainfrom
IgorYbema:main

Conversation

@IgorYbema

Copy link
Copy Markdown
Member

The MQTT-log and hexdump switches were initialized from a browser session cookie that survived device reboots, so after a reboot they could show "on" while the runtime flag was actually "off" — and clicking "off" would then flip the device "on".

Drive both switches from the device's live runtime state via /getsettings instead: read it on page load and again after each /togglelog /togglehexdump call so the switch always reflects the actual resulting position. Drop the now-unused session-cookie helpers.

The MQTT-log and hexdump switches were initialized from a browser session
cookie that survived device reboots, so after a reboot they could show
"on" while the runtime flag was actually "off" — and clicking "off" would
then flip the device "on".

Drive both switches from the device's live runtime state via /getsettings
instead: read it on page load and again after each /togglelog /togglehexdump
call so the switch always reflects the actual resulting position. Drop the
now-unused session-cookie helpers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@IgorYbema IgorYbema merged commit 907982e into heishamon:main Jul 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant