Repository navigation
✨ hub evidence: plain-language findings first, consistent buckets, no issue numbers in copy - #12467
Conversation
… issue numbers in copy
Hub Fleet-evidence modal now leads with a generated 'What this says' block
and a one-line finding under every table (Go generator in
evidence_findings.go, byte-identical JS mirror for filtered selections,
explicit not-enough-data fallbacks). Jargon labels replaced; the six
heartbeat calibration buckets fold into the spoke card's four
reviewer-confidence ranges; absent sections collapse into one 'Waiting on
hives' list with no issue numbers in visible copy (guarded by test).
Layout: modal widens to min(96vw, 1600px); per-hive table is horizontally
scrollable with a sticky hive column; every rate cell folds its N in
('X% of N') with the margin (95%) as a muted second line.
New admin-only GET /api/hub/evidence/report (format=md|html, download=1,
same window and hive/level filters) renders the same EvidenceView as a
standalone plain-language report; linked from the modal's window row.
Read-only; nothing touches merge eligibility.
Closes #12456
Signed-off-by: Andy Anderson <andy@clubanderson.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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 333e032. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #12456. Part of RFC #12062. cc @mrbobbytables
Hub-admin feedback on the Fleet-evidence modal after #12424: "i dont understand what any of this means". This PR makes the view findings-first, in plain words, and adds a downloadable report of the same view.
What changed
Findings first. A What this says block (3–6 generated sentences) sits above every table, and each section carries a one-line plain finding under its title. Generated in Go (
evidence_findings.go, shipped asfindings[]on/api/hub/evidence) with a byte-identical JS mirror used when a hive / level filter is active (TestEvidenceFindingsParity). Every sentence has an explicit "not enough data" fallback; no invented numbers.Plain labels. "Selection"/"Fleet" → All selected hives (a single-hive selection shows (same hive as above) instead of a duplicate row); "95% CI" → margin (95%) with the gloss "the true value is very likely inside this range"; "Coverage n" → Merged PRs; "Bucket" → Reviewer confidence; false approve / false block glossed on first use.
Consistent confidence buckets. The heartbeat's six integer buckets are folded into the spoke card's four ranges on the hub side and labelled with both ("Very confident (0.83–1.0)"). Pooled buckets now carry
badso the regroup needs no rounded-rate reverse engineering. Mapping (and the 0.67/0.83 ≈ 0.7/0.9 caveat) documented inreview-evidence.md.No issue numbers or internal names in UI copy. Absent panels are listed once under Waiting on hives at the bottom in user-facing words ("hives report this once upgraded to the Oct 16 build or later" / "shadow mode is off on every selected hive"); the technical pointer lives only in the ⓘ explainer.
TestEvidenceModalNoIssueNumbersgreps the rendered modal (fleet, small, single-hive and empty selections) for#\d{4,}and internal wording.Sections ordered by signal. Tables with data first; absent ones collapse into the waiting list. #12424's sticky headers, windows, ⓘ explainers and 🔬 button are kept; explainer wording updated to the new labels.
Layout fix (user screenshot). Modal widens to
min(96vw, 1600px); the per-hive table scrolls horizontally inside a wrapper with the HIVE columnposition: sticky; left: 0on an opaque background; every rate cell folds its N in ("10.0% of 40") with the margin as a muted second line, so Per-hive is HIVE · AUTONOMY · FAMILY MIX · FALSE APPROVE · FALSE BLOCK · MERGED · REVERTED. Same N-in-cell pattern on every table. CSS via classes only (TestEvidenceLayoutClasses;TestStyleRatchetgreen).Downloadable plain-language report (in addition to the modal content, nothing on screen removed). 📄 Report (HTML, new tab) and ⬇ Markdown (download) links in the window row carry the current window + hive/level filter. Backend
GET /api/hub/evidence/report?hive=&level=&hours=|from=&to=&format=md|html&download=1,requireAdminlike/api/hub/evidence, rendered in Go from the sameEvidenceViewso it reconciles exactly. Markdown canonical; HTML is a standalone page with inline CSS, no scripts/external assets, hive names escaped. Sections: Summary · What we measured and why · The numbers · How to read these · What is not reported yet and why · Grade per section (thresholds spelled out) · footer link toreview-evidence.md.Content-Disposition: attachment; filename="hive-evidence-<hive|fleet>-<from>-<to>.md|html"fordownload=1, inline otherwise.Guardrail
Evidence is record/read-only. Nothing here is consulted by any merge decision or touches merge eligibility.
Tests
testdata/evidence_report_{fleet,hive}.golden), HTML escaping, endpoint (403 non-admin, md/html, inline/attachment, 400s),hive=/level=filters, confidence-range folding, findings fallbacks.go test ./pkg/hub/... -count=1 -run 'Evidence|StyleRatchet'green locally.Docs
review-evidence.mdhub section rewritten (findings-first, plain-labels table, confidence-range mapping, Downloadable report subsection);api-reference.mdnew/api/hub/evidence/reportrow +hive=/level=/findings[]/badon/api/hub/evidence(citations re-verified);changelog.d/added-12456-hub-evidence-plain-language.md.