Commit Graph
4 Commits
Author SHA1 Message Date
sneak 02a503b9d7 feat(frontend): post collected samples to /api/v1/reports (closes #53)
check / check (push) Failing after 1s
A Reporter beside AppState POSTs a JSON delta report to the same-origin
/api/v1/reports every reportInterval (default 60s). buildReport is an
exported pure function of host state, emitting each host's unreported,
non-paused samples plus a per-browser clientId, geo null, and a UTC
timestamp; a per-host high-water mark advances only on a delivered POST,
so a failed send re-sends next interval within the history window.
Failure is quiet and never blocks probing.

The client id feature-detects crypto.randomUUID and otherwise builds a v4
id from crypto.getRandomValues, so insecure-context loads (plain HTTP to a
non-localhost host) work; reporter setup is isolated so it can never stop
probing. init() runs only when the #app page is present, so a test can
import buildReport.

vite.config.js proxies /api to 127.0.0.1:8080 for yarn dev.

Model: opus-4-8
2026-09-21 16:49:23 +00:00
sneak de98e74539 Add debug log panel, median stats, recovery probe, and UI improvements
- Debug log: togglable panel with timestamped, level-tagged, color-coded
  entries (error/warning/notice/info/debug) from throughout the app
- Median latency: added to per-host stats and summary (min/med/avg/max)
- Recovery probe: rapid 500ms polling of 4 random hosts when hard offline,
  triggers normal tick as soon as connectivity returns
- Health status: multi-level (healthy/slow/degraded/offline) with
  hard-offline detection for recovery probe activation
- First tick discarded to avoid DNS/TLS cold-start latency skew
- Added Google, S3 ap-southeast-1 (Singapore) to monitored hosts
- UI: reduced row padding, larger sparkline canvas, bigger axis labels,
  pin icon hidden (but space preserved) for local network hosts
- Commit hash shown in footer via vite define plugin
2026-02-26 17:23:30 +07:00
sneak 818accc454 Bring repo up to REPO_POLICIES.md standards
- Add prettier (4-space indents) and reformat all files
- Add Makefile with test/lint/fmt/fmt-check/check/docker targets
- Add MIT LICENSE file
- Add REPO_POLICIES.md
- Fix Dockerfile: listen on 8080 with PORT env var via envsubst
- Restructure README.md with all required sections
- Set up pre-commit hook (make check)
- Update .prettierignore, .gitignore, .dockerignore
2026-02-22 15:59:10 +01:00
sneak 65cc2014c6 Initial implementation of NetWatch network latency monitor
SPA for real-time latency monitoring to 10 internet hosts:
- 250ms update interval with 300s history sparkline graphs
- Color-coded latency display (green <50ms to red >500ms)
- HEAD request timing with no-cors mode for cross-origin support
- Built with Vite + Tailwind CSS v4, all dependencies bundled
- Designed for static bucket deployment
2026-01-29 21:32:19 -08:00