feat(services): wire computeFindingAcceptance into the operator dashboard - #5684
Conversation
…oard AcceptanceRateCard has shown its "not yet available" empty state since #2197 landed because nothing populated the acceptance field it expects. computeFindingAcceptance (#1967) was fully implemented but only wired into computeStats/StatsPayload, which powers a route the dashboard doesn't read from. Call it from buildOperatorDashboardPayload following the existing Promise.all + fail-safe-aggregate pattern, and map its flagged/addressed/unaddressed/acceptanceRate fields onto the card's windowDays/accepted/total/rate shape. Closes #5213
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5684 +/- ##
=======================================
Coverage 95.04% 95.04%
=======================================
Files 576 576
Lines 45977 45978 +1
Branches 14724 14724
=======================================
+ Hits 43699 43700 +1
Misses 1525 1525
Partials 753 753
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-14 04:05:24 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
AcceptanceRateCardon/app/analyticshas shown its "not yet available" empty state since feat(ui): finding acceptance-rate card (did the contributor act on it) #2197 landed because nothing populated theacceptancefield it expects.computeFindingAcceptance(Maintainer analytics dashboard (gate precision, calibration, acceptance rate) #1967) was fully implemented but only wired intocomputeStats/StatsPayload, which powers a route (handleStats/GET /stats/data) that the dashboard doesn't read from.computeFindingAcceptanceintobuildOperatorDashboardPayload(src/services/operator-dashboard.ts), the function that actually feeds the operator dashboard, following the exactPromise.all+ fail-safe-aggregate pattern already used forcomputeCycleTimeAggregate/computeGateEvalin that file.FindingAcceptanceAggregate's field names (flagged/addressed/unaddressed/acceptanceRate) onto the UI card's expected shape (windowDays/accepted/total/rate) via a newOperatorDashboardFindingAcceptancetype, and addsacceptancetoOperatorDashboardPayload.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateAll of the above ran as part of the full
npm run test:cigate.Safety
OperatorDashboardPayload's response is a loose/generic OpenAPI schema; regeneratedapps/gittensory-ui/public/openapi.jsonand it is byte-identical.)AcceptanceRateCardalready consumed this exact shape.)UI Evidencesection below with JPG/JPEG or PNG screenshots — N/A, this PR touches no UI files; it only populates a backend field an already-shipped UI component already renders.Notes
AcceptanceRateCardand its tests (acceptance-rate-card.test.tsx) required no changes, as anticipated in the issue.npm run ui:openapi; output is byte-identical since/v1/app/operator-dashboard's OpenAPI schema is a genericadditionalPropertiesobject, not a field-enumerated schema.Closes #5213