Skip to content

fix(web): stop telemetry poll from overwriting config edits - #185

Merged
stritti merged 1 commit into
mainfrom
fix/webui-poll-edit-overwrite
Aug 20, 2026
Merged

stritti merged 1 commit into
mainfrom
fix/webui-poll-edit-overwrite

Conversation

@stritti

@stritti stritti commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Problem

The 2-second telemetry poll (loadTelemetry()) unconditionally wrote the Pool/Time tab form fields from /api/status — even while the user was authenticated and editing. Any in-progress edit was reset to the server value within 2 seconds, and if the poll fired between the edit and the Save click, the save even persisted the reverted original value.

Fix

Only populate these fields when unauthenticated (read-only display). Once logged in, /api/config (via loadConfig()) is the authoritative source and the poll no longer touches the form fields. Invalid input is still rejected by the existing frontend validation (validateSettings()).

Verification

  • node --check data/web/app.js passes
  • Deployed via OTA to NORVI (192.168.178.24); served app.js confirmed to contain the guard

loadTelemetry() polls /api/status every 2s and unconditionally wrote the
Pool/Time tab form fields from the status JSON, even while the user was
authenticated and editing. Any edit reverted within 2 seconds, and if the
poll fired between the edit and the Save click, the save even persisted
the reverted original value.

Only populate these fields when unauthenticated (read-only display);
/api/config via loadConfig() is the authoritative source once logged in.
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 8 0 0 0.75s
✅ BASH bash-exec 2 0 0 0.62s
✅ BASH shellcheck 2 0 0 0.61s
✅ BASH shfmt 2 0 0 0.01s
✅ C clang-format 1 0 0 0.05s
✅ C cppcheck 1 0 0 0.05s
✅ C cpplint 1 0 0 0.36s
✅ CPP clang-format 82 0 0 0.77s
✅ CPP cppcheck 82 0 0 6.38s
✅ CPP cpplint 82 0 0 7.39s
✅ EDITORCONFIG editorconfig-checker 262 0 0 0.65s
✅ JSON jsonlint 6 0 0 0.17s
✅ JSON v8r 6 0 0 4.37s
⚠️ MARKDOWN markdownlint 103 3 0 4.18s
✅ YAML yamllint 25 0 0 0.83s

Detailed Issues

⚠️ MARKDOWN / markdownlint - 3 errors
.opencode/skills/web-ui/SKILL.md:34 error MD028/no-blanks-blockquote Blank line inside blockquote
docs/superpowers/plans/2026-08-10-olimex-c6-local-ui-implementation.md:106:401 error MD013/line-length Line length [Expected: 400; Actual: 452]
docs/superpowers/plans/2026-08-16-norvi-button-calibration.md:7:401 error MD013/line-length Line length [Expected: 400; Actual: 412]

Notices

⚠️ Your configuration references items that have been removed from MegaLinter and are ignored: MAKEFILE, MAKEFILE_CHECKMAKE, MARKDOWN_MARKDOWN_LINK_CHECK. See Removed linters to find their replacements.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.0.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,C_CPPCHECK,C_CPPLINT,C_CLANG_FORMAT,CPP_CPPCHECK,CPP_CPPLINT,CPP_CLANG_FORMAT,EDITORCONFIG_EDITORCONFIG_CHECKER,JSON_JSONLINT,JSON_V8R,MARKDOWN_MARKDOWNLINT,YAML_YAMLLINT

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

Copy link
Copy Markdown
Contributor

Native Test Coverage

Metric Value
Line Coverage 44.5%
Branch Coverage 73.2%
Lines Hit/Total 335/752
Branches Hit/Total 156/213

Report from native unit tests (ASan + gcov).

@stritti
stritti merged commit 71ee560 into main Aug 20, 2026
15 checks 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