Repository navigation
feat(web): add privacy-redacted diagnostic report to monitor tool - #211
Conversation
|
Hi @FhDBro, thanks a lot for this PR and for picking up #198. I really appreciate it. While reviewing it, I realized the CLI is likely the wrong home for this feature. Most people who hit calibration or detection problems (like #165 and #188) use Home Assistant or the web tools. They never clone the repo or run The Web Monitor is a much better fit, and it already does half the work:
What I have in mind is a Diagnostic report button in the Web Monitor that:
Your redaction rules would carry over almost as-is. I would add or adjust a few:
Would you like to take on the Web Monitor version? You can rework this PR or open a new one, whichever you prefer. Thanks again, and sorry for the rework request after you put effort into the CLI version. @HyeonbinJung, as the author of #198, I’d love your thoughts on this too. |
2562ea1 to
8b4feb1
Compare
8f75a0d to
a794fa5
Compare
|
Hi @francescopace, Thank you for the detailed feedback! Moving this into the Web Monitor makes total sense—having it right where users already monitor and troubleshoot eliminates the friction of CLI setup. I have reworked the PR for the Web Monitor following your blueprint:
All 254 web tests ( |
3fc3c22 to
e703d4a
Compare
0403201 to
9bb671a
Compare
e703d4a to
63e0af3
Compare
9bb671a to
9143f1a
Compare
Move the diagnostic report generation directly into the browser-based Web Monitor tool per maintainer blueprint. When running diagnostics, the monitor samples four key rates (csi_occupancy, csi_accepted_pps, csi_filtered_pps, and csi_hw_error_pps) over a configurable duration (default 30 seconds) and computes their min, median, and max values. The final report aggregates the rate statistics alongside device capabilities, health, sensing, Wi-Fi, and session SSE fault events, plus client browser context. Identifiers are redacted client-side before export: device names, labels, hostnames, .local domains, SSIDs, and unicast MAC/IPv4 addresses are masked, while credential objects are stripped. Multicast, broadcast, and loopback addresses remain intact for networking diagnosis. The panel provides an in-browser preview, a one-click copy button formatted as fenced JSON for GitHub issues, and a JSON download button. Signed-off-by: Tawhidul Islam <276017696+FhDBro@users.noreply.github.com>
Collect and redact device state, session faults, and sampled CSI rates using the existing API. Include client versions and fix Micro CORS headers for browser reports. Signed-off-by: Francesco Pace <francesco.pace@gmail.com>
63e0af3 to
a8ac26b
Compare
|
Thanks, @FhDBro, I tightened privacy redaction, fixed how the report handles missing samples, and resolved a connection issue on MicroEspectre. |
Resolves #198.
Summary
Reworks the diagnostic report feature into the browser-based Web Monitor (
docs/web/assets/js/monitor-tool.jsanddocs/web/content/tools/monitor.html) per maintainer blueprint in #211 (comment).Key Changes
csi_occupancy,csi_accepted_pps,csi_filtered_pps, andcsi_hw_error_pps) over 30 seconds and computesmin,median, andmax.capabilities,device,health,sensing, andwifi.faultevents recorded during the session.siteanduser_agent)..localdomains (including appearances across free-text fields likeapply_message).aa:bb:**:**:**:**) and unicast IPv4 host octets (192.168.x.x).224.0.0.0/4,01:00:5e:*,33:33:*), broadcast (255.255.255.255,ff:ff:ff:ff:ff:ff), and loopback (127.0.0.1,::1).credentials,*_credentials) while preserving boolean flags likepassword_configured.[REDACTED]).1234...5678).docs/TROUBLESHOOTING.mdanddocs/web/content/guides/troubleshooting.html.test/web/test_site_tools.mjsverifying rate computation, privacy boundaries, redaction rules, sampling lifecycle, and UI controls..github/scripts/web_asset_versions.py.Verification
cd docs/web && npm test: 254 passed across 27 suites (100% pass).pytest test/python/host: 920 passed.