feat: Add PR status donut chart (open/merged/closed) to PRMetrics widget#349
Conversation
|
@26Naitik is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
f291876 to
9c17973
Compare
|
Good idea adding the closed PR count and donut chart. Two issues: 1. Hardcoded color in const COLORS = [
"var(--accent)", // Open — good
"#10b981", // Merged — hardcoded! Use: color-mix(in srgb, #10b981 100%, transparent) or a CSS var
"var(--muted-foreground)", // Closed — good
];Use 2. Conflict — Fix conflict and push — will merge after rebase. |
940a6ee to
dc92981
Compare
|
PR has merge conflicts with git fetch upstream
git rebase upstream/main
# resolve any conflicts
git push --force-with-leaseCode looks good — the donut chart, |
…succeeds; add /api/metrics/ci mock
cc4b191 to
bab2aea
Compare
|
"Hi @Priyanshu-byte-coder, I've resolved the merge conflicts and force-pushed the branch. All CI checks should be passing now. Could you please review and merge when ready? Thanks!" |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Clean addition. CSS vars used correctly (var(--success) defined in globals.css for both themes), combined-account merge updated, E2E mock updated to match. The center-label trick via a transparent second <Pie> is a known Recharts pattern — acceptable. One minor: add a trailing newline to PRStatusDonutChart.tsx. Merging.
cc98694
into
Priyanshu-byte-coder:main
Summary
Adds a donut/pie chart to the PRMetrics widget visualizing the distribution of Open, Merged, and Closed PRs at a glance.
Changes
PRStatusDonutChart.tsxusing Recharts PieChart withinnerRadius(donut style)PRMetrics.tsxbelow the existing stats grid/api/metrics/prsroute to return separateopen,merged, andclosedcounts using GitHub'sis:open,is:merged, andis:unmerged+is:closedsearch qualifiersvar(--accent)for Open,#10b981(emerald-500) for Merged,var(--muted-foreground)for ClosedCloses #222