capgo icon indicating copy to clipboard operation
capgo copied to clipboard

Fix dashboard stats card overflow

Open WcaleNieWolny opened this issue 6 months ago โ€ข 5 comments

Summary by CodeRabbit

Release Notes

  • Style
    • Improved responsive layout and spacing in dashboard cards to prevent content squeezing and ensure proper alignment across different screen sizes.
    • Enhanced typography scaling and text wrapping behavior for improved readability and consistent presentation on mobile and desktop devices.

Review Change Stack

WcaleNieWolny avatar May 13 '26 14:05 WcaleNieWolny

No actionable comments were generated in the recent review. ๐ŸŽ‰

โ„น๏ธ Recent review info
โš™๏ธ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5b24addc-5eb1-4f46-9ad3-c54f8330556a

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 1e906122191e37c823e53f397354af3498063fe8 and 0562f76b079cf2371e9023c91d226b4ca30b01fa.

๐Ÿ“’ Files selected for processing (2)
  • src/components/dashboard/ChartCard.vue
  • src/components/dashboard/UpdateStatsCard.vue

๐Ÿ“ Walkthrough

Walkthrough

This PR improves responsive layout behavior in two dashboard chart components. ChartCard receives flex constraints (min-w-0 and shrink-0) and typography redesign using clamp-based sizing with flex-wrap. UpdateStatsCard's header applies similar responsive patterns with flex adjustments, shrink control on icons, and text wrapping on numeric values.

Changes

Dashboard Responsive Layout Updates

Layer / File(s) Summary
ChartCard header and stats flex layout
src/components/dashboard/ChartCard.vue
Header stats wrapper adds min-w-0 for responsive sizing and prevents overflow in narrow widths; stats/badge section adds shrink-0 to control flex resizing behavior.
ChartCard total display clamp-based typography
src/components/dashboard/ChartCard.vue
Total display redesigned from fixed text-3xl/sm:text-4xl to flex-wrap container with text-[clamp(...)] responsive scaling and updated word-break behavior for better narrow viewport handling.
UpdateStatsCard action totals header layout
src/components/dashboard/UpdateStatsCard.vue
Header markup for requested/install/fail action totals updated with revised flex/gap/alignment, icons gain shrink-0 while preserving sm:w-4 sm:h-4 responsive sizing, and numeric spans add break-all for text wrapping.

Estimated code review effort

๐ŸŽฏ 2 (Simple) | โฑ๏ธ ~10 minutes

Possibly related PRs

  • Cap-go/capgo#2035: Both PRs modify src/components/dashboard/ChartCard.vue with layout class changes affecting the chart card's responsive sizing and inner container constraints.

Poem

๐Ÿฐ With min-w-0 and clamp's gentle hand,
The dashboard breathes on mobile land,
Flex shrinks no more, text wraps just right,
Where narrow screens meet layout's light! โœจ

๐Ÿšฅ Pre-merge checks | โœ… 4 | โŒ 1

โŒ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check โš ๏ธ Warning The pull request description is completely empty, missing all required sections including Summary, Test plan, Screenshots, and Checklist. Add a pull request description following the template: include a summary of changes, test plan with reproduction steps, screenshots if UI behavior changed, and complete the checklist.
โœ… Passed checks (4 passed)
Check name Status Explanation
Title check โœ… Passed The title 'Fix dashboard stats card overflow' accurately describes the main changes, which involve updating responsive layout classes and styling in dashboard card components to prevent overflow.
Docstring Coverage โœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check โœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check โœ… Passed Check skipped because no linked issues were found for this pull request.

โœ๏ธ Tip: You can configure your own custom pre-merge checks in the settings.

โœจ Finishing Touches
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar May 13 '26 14:05 coderabbitai[bot]

@Stevenn28 I opened the PR for you. #2243

WcaleNieWolny avatar May 13 '26 14:05 WcaleNieWolny

Merging this PR will degrade performance by 48.16%

:warning: Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments, which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

โŒ 1 regressed benchmark
โœ… 42 untouched benchmarks
โฉ 2 skipped benchmarks[^skipped]

[!WARNING] Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
โŒ /updates manifest response with metadata 120.3 ยตs 232.1 ยตs -48.16%

[!TIP] Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Stevenn28:codex/fix-stat-card-overflow (0562f76) with main (1e90612)

Open in CodSpeed

[^skipped]: 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

codspeed[bot] avatar May 13 '26 14:05 codspeed[bot]

The failing Run tests job looks unrelated to the Vue layout changes. It exits in the typos step before the test suite runs:

  • supabase/functions/_backend/files/files.ts:380 has beed / imporant
  • supabase/functions/_backend/files/files.ts:381 has NERVER

Those strings are not present on current origin/main anymore, so this PR is likely just testing against an older merge base. Rebasing/syncing with the latest main should clear that failure and also give CodSpeed a cleaner comparison for the reported /updates manifest response with metadata regression.

albercr3 avatar May 14 '26 13:05 albercr3