shared chart module: canonical coop_chart.js + sync/check scripts
Hand-rolled chart rendering + exact-value hover tooltips as ONE module (no library, no CDN): tooltip machinery, niceStep (count vs 1/2/5 x 10^k), measured runs (NULL stays a gap), frame/date-marks/bars/lines/hover-targets. Byte-identical copies ship in admin-panel and member-dashboard (app/coop_chart.js), pinned by tests/test_chart_sync.py in each; check-chart-sync.py is the pre-deploy gate, sync-chart-module.sh re-copies + re-pins both apps. Vendored check-page-js.sh (skill copy + both apps) now splices the module into the extracted page JS exactly as the apps do at import time.
This commit is contained in:
1 parent
23d2fc0eb2
commit
65e3726d90
4 files changed
+491
-6
No files matched your search
@@ -68,13 +68,26 @@ CLI, and a pinned MkDocs toolchain at `/opt/docs-venv`. It **runs as root**
|
||||
`POST /api/repos?forge_remote_id=<gitea repo id>` (query param, not body);
|
||||
a manual run is `POST /api/repos/<id>/pipelines` with `{"branch": "..."}`.
|
||||
- **Enabled repos:** `co-op/docs` (id 1), `code/member-portal` (id 2),
|
||||
`code/admin-panel` (id 3). Note `co-op/member-portal` is a Gitea REDIRECT to
|
||||
`code/admin-panel` (id 3), `code/member-dashboard` (id 4, enabled
|
||||
2026-11-13 with the same push gate + `ci/woodpecker/push/woodpecker` status
|
||||
check as the panel). Note `co-op/member-portal` is a Gitea REDIRECT to
|
||||
`code/member-portal` — the canonical repo lives in the `code` org (Gitea id 6).
|
||||
- **Test gating (added 2026-11-11):** `.woodpecker.yml` on both apps' default
|
||||
branches runs their EXISTING suites on every push (12 portal test files;
|
||||
admin-panel guest-guard test + 4 page-JS harnesses via the vendored
|
||||
`tests/check-page-js.sh`). Gitea branch protection on `main` of both repos
|
||||
now requires the status context `ci/woodpecker/push/woodpecker` to merge.
|
||||
- **Test gating (added 2026-11-11):** `.woodpecker.yml` on the apps' default
|
||||
branches runs their EXISTING suites on every push (portal test files;
|
||||
admin-panel guest-guard + oidc/chart sync pins + 4 page-JS harnesses via the
|
||||
vendored `tests/check-page-js.sh`; member-dashboard oidc/chart sync pins + 2
|
||||
page-JS harnesses). Gitea branch protection on `main` of each app repo
|
||||
requires the status context `ci/woodpecker/push/woodpecker` to merge.
|
||||
- **Shared chart module (added 2026-11-13):** `ops-docs/scripts/shared/
|
||||
coop_chart.js` is the canonical chart rendering + hover-tooltip module;
|
||||
byte-identical copies live at `app/coop_chart.js` in both UI apps, spliced
|
||||
into each PAGE_HTML at import time. `tests/test_chart_sync.py` in each app
|
||||
pins the copy (same pattern as the oidc client);
|
||||
`scripts/check-chart-sync.py` is the pre-deploy gate and
|
||||
`scripts/sync-chart-module.sh` re-copies + re-pins both apps in one step.
|
||||
The vendored `tests/check-page-js.sh` in BOTH apps splices the module into
|
||||
the extracted page JS exactly as the app does — keep the two vendored
|
||||
copies byte-identical to the skill's script (md5 445cdcf59f193ff875bb634f6f790e73).
|
||||
- **Proven with real output:** first push runs green (portal tests step: 439
|
||||
log lines ending "all portal test suites green"; all four harnesses OK on
|
||||
the panel), and a deliberately broken assertion on a branch (`ci-red-test`)
|
||||
|
||||
Reference in new issue
Block a user