feat(ui): reversal-rate + auto-action health card - #4702
Closed
jeffrey701 wants to merge 1 commit into
Closed
Conversation
Add ReversalHealthCard to the self-host analytics dashboard (JSONbored#2193): how often a human reopened or reverted a bot auto-action (computeAgentHealth, src/review/ops.ts) -- the reversal rate as a percentage plus reversals / manual-rate counts and the specific overridden targets. - reversal-health-card-model.ts: ReversalHealthReport / ReversedTarget types + pure summarizeReversalHealth (null rate on an empty denominator) and bandForReversalHealth (info when no auto-actions, ready at zero reversals, warn at/under 10%, blocked above). - reversal-health-card.tsx: Stat tiles + StatusPill, the reversed-target list, and an EmptyState when none / when the health field is absent. - Wired into app.analytics.tsx behind an optional agentHealth field so it renders once the shape is present on the operator-dashboard payload (backend computation is JSONbored#1967) and shows a graceful EmptyState until. Vitest: the rate/band folds (zero-reversals, above-threshold, empty denominator) and the card's populated / empty-list / absent arms. Closes JSONbored#2193
Contributor
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-10 20:37:11 UTC
⏸️ Suggested Action - Manual Review
Review context
Contributor next steps
Signal definitions
Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
30 tasks
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.
What & why
Closes #2193.
Adds a self-host analytics card surfacing auto-action reversal health — how often a human reopened or reverted a bot auto-action (from
computeAgentHealth,src/review/ops.ts). It answers "is the bot's autonomy trustworthy, or are maintainers frequently overriding it?"reversal-health-card-model.ts—ReversalHealthReport/ReversedTargettypes + pure folds:summarizeReversalHealth(a null rate when the denominatorrecentAutoActionsis 0) andbandForReversalHealth(infowhen no auto-actions yet,readyat zero reversals,warnat/under a 10% reversal rate,blockedabove).reversal-health-card.tsx— reversal-rate percentage + reversals / manual-rateStattiles, aStatusPillband, the list of reversed targets, and a gracefulEmptyStatewhen there are none or when theagentHealthfield is absent on the payload.app.analytics.tsxgains an optionalagentHealthfield and renders the card when present (backend computation is tracked in Maintainer analytics dashboard (gate precision, calibration, acceptance rate) #1967), so it degrades to an EmptyState until the data lands.Tests (
reversal-health-card.test.tsx): the rate/band folds (zero-reversals, above-threshold, empty-denominator) and the card's populated / empty-list / field-absent arms.ui:typecheck,ui:lint,vitest, and the Vite build all pass.Screenshots
/app/analytics)