fix(frontend): round distribution bar segment edges + add dashboard to page-map (#975)#978
Conversation
…o page-map (#975) - Add first:rounded-l-full last:rounded-r-full to distribution bar segments in HealthSummary so first/last segments match the rounded-full container instead of showing hard color edges - Add src/components/dashboard/ to page-map.ts dashboard entry so PR screenshot infra captures dashboard component changes - Add test asserting rounding classes on bar segments
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📸 PR ScreenshotsCaptured 2 screenshots (1 mobile, 1 desktop) for 1 changed page(s):
📥 Download screenshots from workflow artifacts. Captured by PR Screenshots workflow • 2026-03-19 |
There was a problem hiding this comment.
Pull request overview
This PR polishes the dashboard UI by rounding the outer edges of the health distribution bar segments and improves PR screenshot coverage by expanding the dashboard page-map patterns.
Changes:
- Add
first:rounded-l-full/last:rounded-r-fullto the first/last distribution bar segments inHealthSummary. - Add a unit test asserting the rounded-corner segment classes are present.
- Expand the dashboard entry in the PR-screenshot page map to include
src/components/dashboard/changes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| frontend/src/components/dashboard/HealthSummary.tsx | Adds Tailwind first/last rounding variants to distribution bar segments. |
| frontend/src/components/dashboard/HealthSummary.test.tsx | Adds regression test for segment rounding classes. |
| frontend/e2e/helpers/page-map.ts | Updates dashboard patterns so dashboard component changes trigger screenshots. |
Comments suppressed due to low confidence (1)
frontend/src/components/dashboard/HealthSummary.tsx:106
- This component uses
SCORE_BAND_HEXfor the segmentbackgroundColor, butSCORE_BAND_HEXis documented as intended only for contexts where CSS variables are unavailable (e.g. OG/SVG). Sincedistributionentries already include acolor(CSS var) fromgetAllBands(), prefer using that here to stay consistent withscore-utilsand avoid duplicating band color sources.
className="transition-all duration-300 first:rounded-l-full last:rounded-r-full"
style={{
width: `${(d.count / total) * 100}%`,
backgroundColor:
SCORE_BAND_HEX[d.band as keyof typeof SCORE_BAND_HEX],
}}
Bundle Size Report
✅ Bundle size is within acceptable limits. |
Fix: Distribution bar segment edges + page-map dashboard coverage (#975)
Closes #975
Changes
1. Distribution bar rounded corners (
HealthSummary.tsx)The distribution bar container had
rounded-fullbut child segment<div>elements had no border-radius, causing hard color transitions at the first and last segment edges.Fix: Added
first:rounded-l-full last:rounded-r-fullto segment divs so the outer segments match the container's rounding.2. Page-map dashboard pattern (
page-map.ts)The PR screenshot infrastructure's page-map entry for the dashboard page only matched
src/app/app/page.tsxandsrc/components/layout/. Changes to dashboard components insrc/components/dashboard/(like CategoriesBrowse, HealthSummary, QuickActions) would not trigger screenshot capture.Fix: Added
\"src/components/dashboard/\"to the dashboard entry patterns array.3. Test coverage
Added test asserting
first:rounded-l-fullandlast:rounded-r-fullclasses are present on distribution bar segments.Verification
npx tsc --noEmit→ 0 errorsnpx vitest run→ 5,865 passed | 19 skipped | 0 failuresFiles Changed (3)
frontend/src/components/dashboard/HealthSummary.tsxfrontend/src/components/dashboard/HealthSummary.test.tsxfrontend/e2e/helpers/page-map.tssrc/components/dashboard/to dashboard patterns