feat(ui): move the calibration tools into a Calibration section of the configuration tab #130

Closed
opened 2026-09-26 10:04:52 +00:00 by gabogg · 2 comments
Owner

Decided with the maintainer on 2026-09-25 (recorded on #80): when the statistics deck replaces the admin analytics tab, the calibration tools on that tab move into the configuration tab (occupancy-admin, where the schedules, exceptions and occupancy settings already are), in a collapsible Calibration section.

What moves

Everything calibration-related on today's analytics tab (content-analytics):

  • the proportional calibration inspector (/api/analytics/calibration/status, /api/occupancy/multiplier);
  • the historical drift chart and the calibration log with its trust badges (/api/analytics/calibration/history);
  • the trust toggles (POST /api/analytics/calibration/trust);
  • the manual calibration modal (POST /api/analytics/calibration/manual-adjust);
  • the retroactive guard audit (POST /api/analytics/calibration/retroactive-audit) and camera diagnostics (/api/analytics/calibration/camera-diagnostics).

The occupancy confidence margin stays available here (the calibration inspector), not on the deck (decided 2026-09-26).

What does not move

The three operational charts on the same tab are dropped, not moved (decided 2026-09-25): flow curves and net flow, estimated occupancy with its confidence margin, and the multi-day comparison. The deck covers their content. Retiring their routes is a separate issue.

Timing

Do this in the deck UI work, in the same change that swaps the admin analytics tab for the deck (per the #123 decision, the analytics tab stays until the deck is real). Admin only: the section keeps today's require_admin routes and the admin-only UI gating.

Acceptance

  • An admin can do every calibration action listed above from the configuration tab, with the same routes and permissions.
  • The section is collapsible and collapsed by default, and the configuration tab still fits the UI guidelines (docs/standards/ui-design-guidelines.md).
  • calibration_desk.js and its frontend tests keep passing; nothing on the moved tools depends on content-analytics.
  • Admin tab swap (moved here from #133 by #144): for admins the statistics deck replaces the analytics tab. analytics leaves ROLE_ALLOWED_DECKS.admin and #deck-btn-analytics is gone, and F5 opens the deck (KEY_DECK_MAP.F5 = 'statistics'). No admin tool becomes unreachable.

Refs #80, #121.

🤖 Generated with Claude Code

Decided with the maintainer on 2026-09-25 (recorded on #80): when the statistics deck replaces the admin `analytics` tab, the calibration tools on that tab move into the configuration tab (`occupancy-admin`, where the schedules, exceptions and occupancy settings already are), in a collapsible **Calibration** section. ## What moves Everything calibration-related on today's `analytics` tab (`content-analytics`): - the proportional calibration inspector (`/api/analytics/calibration/status`, `/api/occupancy/multiplier`); - the historical drift chart and the calibration log with its trust badges (`/api/analytics/calibration/history`); - the trust toggles (`POST /api/analytics/calibration/trust`); - the manual calibration modal (`POST /api/analytics/calibration/manual-adjust`); - the retroactive guard audit (`POST /api/analytics/calibration/retroactive-audit`) and camera diagnostics (`/api/analytics/calibration/camera-diagnostics`). The occupancy confidence margin stays available here (the calibration inspector), not on the deck (decided 2026-09-26). ## What does not move The three operational charts on the same tab are **dropped**, not moved (decided 2026-09-25): flow curves and net flow, estimated occupancy with its confidence margin, and the multi-day comparison. The deck covers their content. Retiring their routes is a separate issue. ## Timing Do this in the deck UI work, in the same change that swaps the admin `analytics` tab for the deck (per the #123 decision, the analytics tab stays until the deck is real). Admin only: the section keeps today's `require_admin` routes and the `admin-only` UI gating. ## Acceptance - An admin can do every calibration action listed above from the configuration tab, with the same routes and permissions. - The section is collapsible and collapsed by default, and the configuration tab still fits the UI guidelines (`docs/standards/ui-design-guidelines.md`). - `calibration_desk.js` and its frontend tests keep passing; nothing on the moved tools depends on `content-analytics`. - **Admin tab swap (moved here from #133 by #144):** for admins the statistics deck replaces the `analytics` tab. `analytics` leaves `ROLE_ALLOWED_DECKS.admin` and `#deck-btn-analytics` is gone, and F5 opens the deck (`KEY_DECK_MAP.F5 = 'statistics'`). No admin tool becomes unreachable. Refs #80, #121. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

Heads-up from #144 (the deck shell for #133): as #133 specifies, the admin analytics → deck swap belongs with this issue, so no admin tool becomes unreachable. Once the calibration tools have moved here:

  • drop analytics from ROLE_ALLOWED_DECKS.admin and hide #deck-btn-analytics in app/static/js/app.js;
  • map F5 to statistics in KEY_DECK_MAP.

The deck itself already works for admins on F8.

Heads-up from #144 (the deck shell for #133): as #133 specifies, the **admin analytics → deck swap** belongs with this issue, so no admin tool becomes unreachable. Once the calibration tools have moved here: - drop `analytics` from `ROLE_ALLOWED_DECKS.admin` and hide `#deck-btn-analytics` in `app/static/js/app.js`; - map F5 to `statistics` in `KEY_DECK_MAP`. The deck itself already works for admins on F8.
Author
Owner

PR opened: #146 (branch: feat/calibration-config-tab)

PR opened: #146 (branch: feat/calibration-config-tab)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gabogg/hikcentral#130
No description provided.