feat(frontend): post collected samples to /api/v1/reports (closes #53)
check / check (push) Successful in 13s
check / check (push) Successful in 13s
A Reporter class beside AppState POSTs a JSON report to the same-origin
/api/v1/reports every reportInterval (default 60s, a new CONFIG value).
buildReport is a pure function of host state: it emits each host's
unreported, non-paused samples ({t, latency, error}) plus a random
per-browser clientId from localStorage, geo null, and an ISO 8601 UTC
timestamp. A per-host high-water mark keyed on sample time makes every
report a delta and only advances on a delivered POST, so a failed send
re-sends next interval, bounded by the existing history window. Failure
is quiet: one debug-log line per outage, one on recovery, no alert, no
tight retry loop, never blocking probing. While paused nothing is sent.
vite.config.js proxies /api to 127.0.0.1:8080 so yarn dev exercises the
real path against a local netwatch-server. Backend and schema unchanged.
Model: opus-4-8
This commit is contained in:
@@ -22,6 +22,10 @@ files, so merging it also closes most compliance gaps.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-09-21: frontend reporting client — a `Reporter` class posts collected
|
||||
samples to `/api/v1/reports` every `reportInterval` (default 60s) as a
|
||||
per-host delta, with the report-building step a pure function of host state;
|
||||
`vite.config.js` proxies `/api` to the local backend for `yarn dev`
|
||||
- 2026-08-10: every interactive control now meets the 44x44 CSS px minimum tap
|
||||
target (`.pin-btn`, `#interval-select`, the debug-log label and, on narrow
|
||||
viewports, `#pause-btn`). The pin button's hit area grows via matching
|
||||
|
||||
Reference in New Issue
Block a user