Phase 43: /admin/ops operations dashboard (D-3) + checklist findings in reports (KI-015)#253
Merged
Conversation
…indings in reports - New lib/services/ops-dashboard.service.ts: read-only roll-up reusing invoiceService.summary/list (Phase 39 AR), Task groupBy by owner, visitRequest awaiting-action counts (UNTRIAGED/READY_FOR_REVIEW), recall counts with dental/vaccination split + competition priority, and inventoryService.reorderList (low stock). Pure helpers (buildTaskOwnerRows, topShortfallRows, moneyString) unit-tested. - New GET /api/admin/ops-dashboard (ADMIN) + /admin/ops page: mobile-first cards, each block = count + top-5 list + link through (/finance/invoices, /tasks, /triage, /recalls, /admin/inventory). Sidebar entry after the go-live readiness board. - KI-015: reports findingFrequency now folds DentalChart.checklist JSON findings in at read time via lib/dental/checklist-finding-stats.ts (section->FindingCategory map, one count per present section per chart, de-dup against the chart's own linked in-range ClinicalFinding rows; malformed/legacy JSON contributes nothing and never throws). - i18n: new opsDashboard namespace + nav.opsDashboard (EN/FR parity 1741=1741); reports.findings.subtitle updated to stop claiming checklist findings are excluded. - Tests: +31 (18 checklist stats, 9 ops service, 4 route gating) and 3 new reports KI-015 cases; reports mock gains dentalChart.findMany.
- BUILD_PLAN: Phase 43 entry — /admin/ops operations dashboard (D-3) placement rationale (new ADMIN page, not more /reports tiles; WP-E OpsRollup stays as the all-staff quick tiles), KI-015 read-time fold summary, gate results (2,621 -> 2,655 tests, en/fr parity 1,741 = 1,741) and deferred notes (digests, per-practitioner metrics, chart libraries, per-row remaining balance). - KNOWN_ISSUES: KI-015 struck through and marked resolved in Phase 43 with the approximation notes (once-per-chart section counting, per-chart+category de-dup against linked findings, deliberate slight undercount on the double-fracture edge, malformed JSON never throws). https://claude.ai/code/session_01VzJJTUcvzZgS9jN8aap9iv
Pushed via API — the container's git push path is intermittently failing (remote end hung up); content identical to the local commit. https://claude.ai/code/session_01VzJJTUcvzZgS9jN8aap9iv
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7578845. Configure here.
…petition per action row Bugbot findings on #253: raw lt/gte/lte date windows disagreed with the floored-day buckets /recalls uses at the edges, and competition counted distinct horses where /recalls counts action rows. The recall block now fetches the same row set as /api/recalls and classifies through bucketFor in a pure, tested tallyRecallRows helper. Gates green locally (2,656 tests). Pushed via API per the documented git-proxy workaround. https://claude.ai/code/session_01VzJJTUcvzZgS9jN8aap9iv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Phase 43 —
/admin/opsoperations dashboard (June-10 deferral D-3) + KI-015Overnight multi-agent build authorised by Freddie (2026-06-12). Read-only operations roll-up + the reports completeness fix.
Scope
/admin/ops(ADMIN-gated, mobile-first cards, sidebar entry after the go-live readiness board): overdue/pending invoices (Phase 39 AR queries →/finance/invoices), open tasks by owner (→/tasks), visit requests awaiting action incl. urgent count (→/triage), recalls due with dental/vaccination split + competition count (→/recalls), low-stock products (→/admin/inventory). Every block = count + top-5 + link through. Zero new write paths;prisma/and.github/diffs vs main are empty./reportsfinding-frequency now foldsDentalChart.checklistJSON findings in at read time (lib/dental/checklist-finding-stats.ts) — one count per present section per chart, de-duped per chart+category against linked in-rangeClinicalFindingrows; malformed/legacy JSON contributes nothing and never throws. Deliberate slight undercount on the double-fracture edge, documented in the KI entry.Verification
Gates all green: lint ✓ typecheck ✓ prisma validate ✓ build ✓ (
/[locale]/admin/ops+/api/admin/ops-dashboardin the manifest), tests 2,621 → 2,655 (+34). EN/FR parity independently verified 1,741 = 1,741.Notes for reviewers
successResponsehas nodataenvelope) — pinned by a route test; don't "fix" the page to read.data.reports.servicemust armdentalChart.findManyin the prisma mock.docs/JUN10_OVERNIGHT_BUILD.mdedits with the Phase 42 PR (adjacent deferral rows) — I'll rebase whichever merges second. The last commit here was pushed via the GitHub API during a transient git-proxy outage; content matches the local branch exactly.Suggested merge order tonight: Phase 44 PR → this → Phase 41 → Phase 42. Final merge with Richard / Freddie as always.
https://claude.ai/code/session_01VzJJTUcvzZgS9jN8aap9iv
Generated by Claude Code