Skip to content

Expand statistics with year-over-year insights and dashboard sparklines - #36

Merged
panteLx merged 1 commit into
mainfrom
feature/expand-statistics
Jul 30, 2026
Merged

Expand statistics with year-over-year insights and dashboard sparklines#36
panteLx merged 1 commit into
mainfrom
feature/expand-statistics

Conversation

@panteLx

@panteLx panteLx commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Expands the statistics page: savings rate, average booking size, largest expense, year-over-year deltas on the KPI tiles, a weekday spending-pattern chart, and a this-year-vs-last-year comparison chart.
  • Integrates statistics into the dashboard as quiet inline sparklines on the existing KPI tiles (Saldo/Einnahmen/Ausgaben/Buchungen), reusing the statistics page's query key so navigating between the two pages doesn't refetch.
  • /api/statistics now also returns previousYear, weekday, topExpense, and per-month transactionCount.
  • Adds a StatTileTrend client component so the sparkline (which needs recharts + useId) doesn't force StatTile itself into a client-only component — StatTile is also rendered directly from the server-rendered app/t/[slug]/page.tsx, which passes lucide icon components as props that can't cross the server/client boundary.

Test plan

  • npx tsc --noEmit — no errors
  • npx eslint on changed files — clean
  • npm run build — succeeds, including /t/[slug]
  • Manually verified dashboard and statistics pages in the browser (light/dark, desktop/mobile) against the seeded demo account
  • Verified /t/[slug] (public tracker page) renders correctly at runtime after the client/server boundary fix

🤖 Generated with Claude Code

Adds savings rate, average booking size, largest expense, a weekday
spending pattern, and a this-year-vs-last-year comparison to the
statistics page, plus quiet trend sparklines on the dashboard's KPI
tiles (sharing the statistics query so navigating between the two
pages doesn't refetch).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@panteLx, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: edac9779-c6ba-4dd0-a79c-4082daab7b16

📥 Commits

Reviewing files that changed from the base of the PR and between 89f5d47 and 3e28637.

📒 Files selected for processing (5)
  • app/api/statistics/route.ts
  • components/dashboard/dashboard-client.tsx
  • components/statistics/statistics-client.tsx
  • components/ui/stat-tile-trend.tsx
  • components/ui/stat-tile.tsx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@panteLx
panteLx merged commit e6990f2 into main Jul 30, 2026
2 checks passed
@panteLx
panteLx deleted the feature/expand-statistics branch July 30, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant