feat(ui): reversal-rate + auto-action health card (#2193) - #4750
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-10 23:37:15 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
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.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4750 +/- ##
=======================================
Coverage 94.22% 94.22%
=======================================
Files 440 440
Lines 38715 38718 +3
Branches 14103 14104 +1
=======================================
+ Hits 36479 36482 +3
Misses 1576 1576
Partials 660 660
🚀 New features to boost your workflow:
|
1d8c9af to
f47c8fc
Compare




Summary
Adds a read-only Reversal health card to
/app/analyticsshowing reversal rate, reversal count, recent auto-actions, and manual rate fromcomputeAgentHealth(AgentHealthinsrc/review/ops.ts). Lists reversed targets when present;EmptyStatewhen none.Closes #2193, Part of #1967.
Changes
src/review/ops.tsrecentAutoActionsonAgentHealth(7d reversal-rate denominator)src/services/operator-dashboard.tsagentHealthviacomputeAgentHealthapps/gittensory-ui/src/components/site/app-panels/reversal-health-card-model.tsREVERSAL_ALERT_MINthreshold + status helpersapps/gittensory-ui/src/components/site/app-panels/reversal-health-card.tsxEmptyStateapps/gittensory-ui/src/routes/app.analytics.tsxreversal-health-card.test.tsx,operator-dashboard.test.ts,ops.test.tsUI Evidence
Required before opening the PR — upload screenshots via GitHub drag-and-drop (do not commit images):
/app/analyticsTest plan
ReversalHealthCard— zero reversals +EmptyStateReversalHealthCard— above-threshold reversals + target listReversalHealthCard— empty-denominator (recentAutoActions === 0,reversalRate === 0)reversalHealthStatus— ready / warn / info ternary armsagentHealthnpm run ui:test—reversal-health-card.test.tsx(6/6)npm run ui:typechecknpm run test:unit -- test/unit/operator-dashboard.test.ts test/unit/ops.test.ts(41/41)/app/analytics, confirm card rendersvisual)Notes
visual(owner-led). Confirm eligibility before opening a contributor PR.REVERSAL_ALERT_MIN = 1— mirrorsdetectAnomalies(alerts.ts:204), which flags any human reversal of a bot auto-action.GITHUB_APP_SLUG(fallbackgittensory) for single-tenant health reads.