Dashboard¶
Product behavior and URL: Dashboard (default http://localhost:58008).
| Layer | Path |
|---|---|
| Front-end | skills/sr-search/src/stockroom/dashboard/static/ — native ES modules, vendored Chart.js + markdown-it, no bundler / no npm install |
| JS tests | skills/sr-search/tests-js/*.test.mjs |
| Server | skills/sr-search/src/stockroom/dashboard/ |
| CLI | skills/sr-search/src/stockroom/dashboard/__main__.py |
| Python tests | skills/sr-search/tests/test_dashboard_*.py |
Development Loop¶
Static ESM is read from disk on each request; Python changes only get picked up after the dashboard server process is replaced.
- Edit server/metrics (and any other Python under
dashboard/) plus the static modules that consume the API. -
Bounce so this checkout's Python is what is listening:
-
Hard-refresh the browser so cached ESM is not stale.
-
Run the dashboard contract gates:
Relevant Make targets¶
| Target | Role |
|---|---|
test-dashboard-js |
Dashboard ES-module tests (node --test; Node 22; no sync; no lcov) |
coverage-dashboard-js |
Same tests with Node coverage → skills/sr-search/coverage-js/lcov.info (CI upload flag dashboard-js) |
test-dashboard-py |
tests/test_dashboard_*.py only (torch-safe; no sync) |
test |
Full pytest (xdist -n auto) + JS (runs sync first — strips torch) |
local-dashboard |
Force-replace stockroom dashboard for this checkout (--replace) |
make test-dashboard-js stays the human-readable default. Use make coverage-dashboard-js (or make coverage) when you need the Codecov-ready lcov artifact. Uploads happen in GitHub Actions via CODECOV_TOKEN; the aggregate README badge 404s until that secret exists and CI has uploaded at least once.