Skip to content

feat(ui): reversal-rate + auto-action health card - #4702

Closed
jeffrey701 wants to merge 1 commit into
JSONbored:mainfrom
jeffrey701:feat/reversal-health-card
Closed

feat(ui): reversal-rate + auto-action health card#4702
jeffrey701 wants to merge 1 commit into
JSONbored:mainfrom
jeffrey701:feat/reversal-health-card

Conversation

@jeffrey701

Copy link
Copy Markdown
Contributor

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.tsReversalHealthReport / ReversedTarget types + pure folds: summarizeReversalHealth (a null rate when the denominator recentAutoActions is 0) and bandForReversalHealth (info when no auto-actions yet, ready at zero reversals, warn at/under a 10% reversal rate, blocked above).
  • reversal-health-card.tsx — reversal-rate percentage + reversals / manual-rate Stat tiles, a StatusPill band, the list of reversed targets, and a graceful EmptyState when there are none or when the agentHealth field is absent on the payload.
  • Wiringapp.analytics.tsx gains an optional agentHealth field 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

View Before After
Self-host analytics dashboard (/app/analytics) screenshot pending screenshot pending

⚠️ Draft — screenshots pending. The card renders on the operator-dashboard payload once an agentHealth slice is present; before/after screenshots of the analytics dashboard are being captured and will be added to the table above before this is marked ready for review.

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
@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 10, 2026
@loopover-orb

loopover-orb Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-10 20:37:11 UTC

4 files · no blockers · readiness 96/100 · CI pending · dirty

⏸️ Suggested Action - Manual Review

Signal Result Evidence
Code review ✅ No blockers No AI review summary
Linked issue ✅ Linked #2193
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (draft PR; 1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 120 registered-repo PR(s), 53 merged, 11 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jeffrey701; Gittensor profile; 120 PR(s), 11 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jeffrey701
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 120 PR(s), 11 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Mark ready when done.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/app/analytics desktop before /app/analytics after /app/analytics
/app/analytics mobile before /app/analytics (mobile) after /app/analytics (mobile)

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.

  • Re-run Gittensory review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ui): reversal-rate + auto-action health card

2 participants