Skip to content

feat(ui): confidence-calibration curve card on the analytics dashboard #2192

Description

@JSONbored

Add one analytics card that visualizes the confidence-vs-outcome calibration bins from computeCalibration (src/review/ops.ts) — predicted merge confidence vs realized kept-rate per bucket — plus the recommended confidence floor. Single chart card over an existing computed payload.

Deliverables

  • New CalibrationCard component in apps/gittensory-ui/src/components/site/ typed to the Calibration interface (ops.ts:61) with per-bin predicted-vs-actual rows
  • Render bins with TrendChart or a simple bar row (reuse TrendChart from components/site/trend-chart.tsx:8)
  • Surface the recommended confidence floor as a labeled Stat + BoundaryBadge (control-primitives.tsx)
  • Wire into apps/gittensory-ui/src/routes/app.analytics.tsx
  • Vitest test for empty bins, single bin, and full-curve cases (both branches of every conditional)

References

  • src/review/ops.ts:61
  • src/review/ops.ts:250
  • apps/gittensory-ui/src/components/site/trend-chart.tsx:8
  • apps/gittensory-ui/src/routes/app.analytics.tsx

Part of #1967.


📸 Required: before/after screenshots (this is a UI change)

Non-negotiable. PRs that change UI must include a before/after screenshot table. PRs without it are automatically closed — no exceptions.

Rules:

  • Show every page/feature you changed — before and after, one row each.
  • Use the markdown table below. Screenshots go inside the table only — no large full-size images pasted elsewhere in the PR.
  • Each cell is a clickable thumbnail (a small image linking to the full-size image) with a one-line caption underneath.
  • Upload screenshots to the PR by drag-and-drop (GitHub hosts them on its CDN). Do NOT commit image files to the repo.

Copy this and fill it in (replace FULL_IMAGE_URL with the URL GitHub gives you after you drop the image in):

| Page / Feature | Before | After |
|---|---|---|
| `/your-route` | [<img src="FULL_IMAGE_URL" width="260">](FULL_IMAGE_URL)<br><sub>before: short caption</sub> | [<img src="FULL_IMAGE_URL" width="260">](FULL_IMAGE_URL)<br><sub>after: short caption</sub> |


size: S · held for later release (gittensor:feature once activated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.visualUI/web visual work — owner-led, NOT for Gittensor contributors (extensions excepted)

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions