Repository navigation
✨ dashboard: Evidence sub-panel in Throughput (calibration + accuracy×model) - #12315
Conversation
…model) (#12064) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <scanner@hive.kubestellar.io> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
TestStyleRatchet counts non-var() font-size and border-radius values; the Evidence sub-panel added one raw 9px font-size and four raw border-radius values. Use --fs-2xs for the SVG labels and make square swatches the default so only the round calibration swatch (.dot) needs a radius token. Signed-off-by: scanner <scanner@hive.kubestellar.io>
|
hive/awaiting-ci: pushed a fixup for the 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Correctness review (head e592714)
Backend shape checked against src/pkg/dashboard/api_evidence_summary.go (fixed per-perspective bucket list L300-303, "unknown" model literal L20/L291, merged_after_block/approved_not_merged L108-109) — the UI's field names and bucket-alignment assumption hold.
aria-live="polite"on a card that is fully re-rendered every 20s —src/pkg/dashboard/static/index.html:5970addsaria-live="polite"to#evidence-card, butrenderEvidenceSummaryreplacescard.innerHTML(two<details>, two SVGs, legends, notes) on everyfetchPRThroughput()tick, which runs fromv4RefreshPanelsonV4_PANELS_POLL_MS = 20000(index.html:20703, 22282-22284). Screen readers will re-announce the whole panel every 20 s even when nothing changed. The sibling#pr-throughput-card(L5969) deliberately has no live region, and the file's own note at L1273-1274 says periodically-updated regions should not bearia-live. Suggest dropping the attribute (or scoping it to a small status node that only changes on error/empty).
Non-blocking: when prtHours === 0 and the endpoint returns non-2xx, renderEvidenceSummary(null) builds the header as last all (windowName[1] for the [0,'all'] entry; dto.all_time is unavailable on the null path) — cosmetic.
— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Style/maintainability review (head e592714)
-
aria-live="polite"on a polled, wholesale-rebuilt card —src/pkg/dashboard/static/index.html:5970addsaria-live="polite"to#evidence-card, butrenderEvidenceSummaryreplacescard.innerHTML(two full SVGs incl. axis labels, legends, and both "What this does not show" notes) on everyfetchPRThroughput()call, which runs fromv4RefreshPanelseveryV4_PANELS_POLL_MS = 20000(index.html:20703, 22282-22284). The page's own convention says not to do this — see the comment at index.html:1273-1274 ("Not aria-live — it changes every update and would flood screen readers"), and the sibling#pr-throughput-card(index.html:5969) carries noaria-live. Drop the attribute (or move a short status string into a dedicated live region). -
evLastis write-only —let evLast(index.html:~22021) is assigned infetchEvidenceSummarybut only ever read as a boolean in thecatch. UnlikeprtLast, whichsetPRThroughputHours/setPRThroughputRepore-render immediately on selection change (index.html:21991, 21997), nothing re-rendersevLast. Either reuse it the same way (if (evLast) renderEvidenceSummary(evLast)in the setters) or reduce it to a boolean so the next reader isn't misled.
Data field names (reviewer_calibration, buckets[].bucket/n/merged/blocks, by_author_kind[].approved_not_merged/merged_after_block, missing.verdicts_model_unknown) were checked against src/pkg/dashboard/api_evidence_summary.go:39-130 and match; bucket order is fixed server-side (api_evidence_summary.go:24, 300-302), so indexing by rows[0].buckets is safe.
— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
Refs #12064 — panels 2 and 3 land here; panels 1/4/5/6/8 follow as their data lands per the issue
What
Adds an
evidence-cardinsidepr-throughput-section, belowpr-throughput-card, using the sameprt-cardstyling. It is driven by the existing Throughput window (hours) and repo selector, and refreshes on the same cadence becausefetchPRThroughput()now also callsfetchEvidenceSummary().unknownmodels are drawn as greyed bars.Each panel is collapsible (native
<details>, open state kept across re-renders) and shows ann=badge and a "What this does not show" note. Charts are inline SVG, with no new chart dependency.Data source
GET /api/evidence/summary?hours=&repo=from #12241 (reviewer_calibration,reviewer_accuracy_by_model,missing.verdicts_model_unknown). A 403 or error response rendersn=0/—and never throws. Bad-outcome (revert) rate isn't plotted because bundles don't record reverts yet, and the panel note says so.Guardrail
UI only; nothing changes merge behaviour.
Scope
Edits are limited to the pr-throughput region of
index.html: the section markup, its CSS block, and a self-contained JS block next to the existing pr-throughput JS. This keeps it clear of the Settings dialog edits in #12313. Also addsevidence_card_ui_test.go(markup/fetch pin and undefined-callee guard) andchangelog.d/added-12064.md.— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson