Skip to content

fix: discoveries miner card shows issue stats only#292

Merged
anderdc merged 2 commits intoentrius:testfrom
Dexterity104:fix/discoveries-miner-card-issue-stats
Apr 16, 2026
Merged

fix: discoveries miner card shows issue stats only#292
anderdc merged 2 commits intoentrius:testfrom
Dexterity104:fix/discoveries-miner-card-issue-stats

Conversation

@Dexterity104
Copy link
Copy Markdown
Contributor

Summary

Fixes #277. On /discoveries, miner cards mixed PR donut slices with an issue credibility percentage and stacked a second row of issue stats below the PR row. The donut and the stats row now share one segments array, so the chart segments, labels, and center percentage always describe the same data.

Changes

  • Introduce getSegments(miner, variant) as the single source of truth for the three segments rendered on the card (Solved/Open/Closed for discoveries, Merged/Open/Closed for oss).
  • Donut data maps over the same segments with positional chart colors and inactive ratios, so it can never diverge from the labels.
  • Remove the separate IssueStatsSection (~130 lines); the footer is now a single grid row for both variants.
  • Extract small StatCell and StatLabel helpers to drop the repeated Typography boilerplate.

Scope

  • Discoveries page: donut + stats now issue-only, matching the percentage.
  • OSS Contributions page: unchanged.

Test plan

  • Visit /discoveries and confirm each card shows Solved / Open / Closed with a donut whose segments match those counts.
  • Hover the donut and confirm tooltips reflect issue counts.
  • Visit /leaderboard (oss) and confirm Merged / Open / Closed PR stats are unchanged.
  • Check an ineligible miner card on both pages for correct dimmed styling.
  • npx tsc --noEmit passes.

@Dexterity104
Copy link
Copy Markdown
Contributor Author

image

@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented Apr 16, 2026

resolve conflicts

@Dexterity104
Copy link
Copy Markdown
Contributor Author

@anderdc I've resolved the conflicts. Could you review it again please?

@anderdc anderdc added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels Apr 16, 2026
Copy link
Copy Markdown
Collaborator

@anderdc anderdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very clean PR, LGTM

@anderdc anderdc merged commit 3d9c9e3 into entrius:test Apr 16, 2026
2 checks passed
@Dexterity104
Copy link
Copy Markdown
Contributor Author

Thanks a lot, @anderdc

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discoveries page miner cards still show pull-request stats

2 participants