codeburn/dash
ozymandiashh 7cd1f90631
fix(web): reject invalid dashboard periods without exiting (#554)
* fix(web): reject invalid dashboard periods without exiting

* test(web): assert invalid periods return 400 without exiting; drop redundant /api/devices re-parse

- Add tests/web-dashboard.test.ts: boots the dashboard on an ephemeral port and asserts
  /api/usage and /api/devices answer 400 (not process.exit) for a bad period, and that
  the server keeps serving afterward. runWebDashboard now returns the http.Server so it
  can be exercised in-process; callers that ignore the return value are unaffected.
- /api/devices: resolve periodInfo once instead of validating then re-parsing it inside
  localGetUsage (pullDevices invokes localGetUsage with the same already-validated query).

---------

Co-authored-by: AgentSeal <hello@agentseal.org>
2026-06-28 19:35:46 +02:00
..
public feat(web): in-dashboard device discovery, share-from-browser, redesign + hardening (#534) 2026-06-20 19:02:03 +02:00
src fix(web): reject invalid dashboard periods without exiting (#554) 2026-06-28 19:35:46 +02:00
index.html feat(web): in-dashboard device discovery, share-from-browser, redesign + hardening (#534) 2026-06-20 19:02:03 +02:00
package-lock.json feat(web): local React dashboard served by codeburn web (#531) 2026-06-20 16:21:25 +02:00
package.json feat(web): local React dashboard served by codeburn web (#531) 2026-06-20 16:21:25 +02:00
tsconfig.json feat(web): local React dashboard served by codeburn web (#531) 2026-06-20 16:21:25 +02:00
vite.config.ts feat(web): local React dashboard served by codeburn web (#531) 2026-06-20 16:21:25 +02:00