You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(analytics): the code quality overview reads fields its endpoints don't return #20498
Found by code review of the first #20491 change. Read from the code; not run.
Problem
loadCodeQuality in autobot-frontend/src/composables/analytics/useDashboardLoaders.ts reads fields the backend does not put where it looks:
It reads healthData.health_score, but the handler in api/analytics_quality.py:1080-1090 returns overall and breakdown. The overall score falls back to the performance breakdown.
It reads debtData.total_debt_hours and total_items at the top level, but /api/debt/summary in api/analytics_debt.py nests its figures under summary. Technical debt is probably always 0.
The duplicate count had the same defect (total_count), and the #20491 change fixes that one.
Acceptance criteria
The overview score and technical debt show the values the endpoints return (test against the real response shapes).
Merged via #21397, in main as merge commit 650d062 (train #21398), 2026-11-12 ~21:30 Riga. Evidence read from origin/main.
AC
Status
Evidence
Overview score and debt show endpoint values, tested against real response shapes
Delivered
autobot-frontend/src/composables/analytics/codeQualityOverview.tsbuildCodeQuality: score from health.overall, debt from debt.summary.total_hours; wired in useDashboardLoaders.ts. Tests: __tests__/codeQualityOverview.test.ts, useDashboardLoaders.codeQuality.test.ts ("populates the state from the endpoints' real response shapes").
Missing value shows as not available, not 0
Delivered
num() returns null for non-numbers; tests "reports missing values as null (not available), never 0", "keeps a real zero as 0", "every endpoint failing yields four nulls".
UI rendering of "not available" and the live dashboard were not seen on the install (still pre-update, #21343); the ACs are test-based, so the issue stays closed.
Closure evidence read from origin/main at 650d062. Gate 2 (check-issue-close-refs.sh) was not run in this read-only pass; instead a grep of origin/main for forward-tracking references (TODO / deferred to / tracked in / follow-up) naming this issue found none.
Criterion
Evidence on main
Status
"The overview score and technical debt show the values the endpoints return (test against the real response shapes)."
autobot-frontend/src/composables/analytics/codeQualityOverview.ts:46overall_score from health.overall, :49 technical_debt from debt.summary.total_hours; backend shapes match: autobot-backend/api/analytics_quality.py:871 returns "overall", analytics_debt.py:154-156 nests total_hours under "summary". Wired at useDashboardLoaders.ts:207 (buildCodeQuality). Tests __tests__/codeQualityOverview.test.ts:31 (score from overall), :36 (hours from summary.total_hours), :56 (total_items not used as hours); __tests__/useDashboardLoaders.codeQuality.test.ts:35 "populates the state from the endpoints' real response shapes".
met
"A missing value shows as not available, not as 0."
codeQualityOverview.ts:30-31num() returns null for a non-number; panels render null as not available: components/analytics/CodebaseOverviewPanel.vue:95 and :109, AnalyticsGrid.vue:88 and :102 (?? $t('...notAvailable')). Tests codeQualityOverview.test.ts:46 "reports missing values as null (not available), never 0", :40 "keeps a real zero as 0"; useDashboardLoaders.codeQuality.test.ts:55 "every endpoint failing yields four nulls, not zeros".
met
Merged: PR #21397 via train #21398, main 650d062.
CI on train PR #21398: 89 SUCCESS, 8 SKIPPED (the aggregate/duplicate-named skipped jobs), 1 NEUTRAL (CodeRabbit), 1 IN_PROGRESS (post-merge "Post landing notes on referenced issues"). python-suite shards 1/8 to 8/8: SUCCESS; python-suite aggregate: SUCCESS; frontend-tests: SUCCESS.
Nothing left unchecked. The rendered panel was not observed in a browser or on a running install; the not-available rendering is read from the templates above.
Activity
fix(frontend): the not-available quality state reuses existing stylin…
mrveiss commentedon Nov 12, 2026
Merged via #21397, in main as merge commit 650d062 (train #21398), 2026-11-12 ~21:30 Riga. Evidence read from origin/main.
autobot-frontend/src/composables/analytics/codeQualityOverview.tsbuildCodeQuality: score fromhealth.overall, debt fromdebt.summary.total_hours; wired inuseDashboardLoaders.ts. Tests:__tests__/codeQualityOverview.test.ts,useDashboardLoaders.codeQuality.test.ts("populates the state from the endpoints' real response shapes").num()returnsnullfor non-numbers; tests "reports missing values as null (not available), never 0", "keeps a real zero as 0", "every endpoint failing yields four nulls".UI rendering of "not available" and the live dashboard were not seen on the install (still pre-update, #21343); the ACs are test-based, so the issue stays closed.
github-actions commentedon Nov 12, 2026
Landed via the merge train (#21398, merge
650d06217f) via #21397mrveiss commentedon Nov 12, 2026
Closure evidence (acceptance criteria quoted verbatim)
Closure evidence read from origin/main at 650d062. Gate 2 (
check-issue-close-refs.sh) was not run in this read-only pass; instead a grep of origin/main for forward-tracking references (TODO / deferred to / tracked in / follow-up) naming this issue found none.autobot-frontend/src/composables/analytics/codeQualityOverview.ts:46overall_scorefromhealth.overall, :49technical_debtfromdebt.summary.total_hours; backend shapes match:autobot-backend/api/analytics_quality.py:871returns"overall",analytics_debt.py:154-156neststotal_hoursunder"summary". Wired atuseDashboardLoaders.ts:207(buildCodeQuality). Tests__tests__/codeQualityOverview.test.ts:31(score fromoverall), :36 (hours fromsummary.total_hours), :56 (total_itemsnot used as hours);__tests__/useDashboardLoaders.codeQuality.test.ts:35"populates the state from the endpoints' real response shapes".codeQualityOverview.ts:30-31num()returnsnullfor a non-number; panels rendernullas not available:components/analytics/CodebaseOverviewPanel.vue:95and :109,AnalyticsGrid.vue:88and :102 (?? $t('...notAvailable')). TestscodeQualityOverview.test.ts:46"reports missing values as null (not available), never 0", :40 "keeps a real zero as 0";useDashboardLoaders.codeQuality.test.ts:55"every endpoint failing yields four nulls, not zeros".Merged: PR #21397 via train #21398, main 650d062.
CI on train PR #21398: 89 SUCCESS, 8 SKIPPED (the aggregate/duplicate-named skipped jobs), 1 NEUTRAL (CodeRabbit), 1 IN_PROGRESS (post-merge "Post landing notes on referenced issues"). python-suite shards 1/8 to 8/8: SUCCESS; python-suite aggregate: SUCCESS; frontend-tests: SUCCESS.
Nothing left unchecked. The rendered panel was not observed in a browser or on a running install; the not-available rendering is read from the templates above.
fix(frontend): the code quality overview reads the fields its endpoin…
test(frontend): unknown quality has a neutral style and loadCodeQuali…