Skip to content

feat(web): refresh analytics dashboard - #1031

Merged
AmanVarshney01 merged 1 commit into
mainfrom
aman/redesign-analytics-evilcharts
May 2, 2026
Merged

AmanVarshney01 merged 1 commit into
mainfrom
aman/redesign-analytics-evilcharts

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented May 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • replace the analytics page's Observable Plot charts with EvilCharts/Recharts components
  • restyle analytics to match the existing site language with simple bordered panels
  • fix responsive chart overflow, axis labels, and the overview/card spacing issue

Verification

  • bun run check
  • cd apps/web && bunx --bun next build
  • browser checks for desktop and 360px mobile overflow

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for new charting registry to expand visualization capabilities.
  • Design Updates

    • Redesigned analytics dashboard with updated layout, spacing, and visual hierarchy.
    • Refreshed chart visualizations with improved styling and presentation.
    • Updated metrics display, data cards, and chart components throughout the analytics section.
  • Dependencies

    • Replaced charting library dependencies to enable enhanced visualization features.

@vercel

vercel Bot commented May 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
create-better-t-stack-web Ready Ready Preview, Comment May 2, 2026 3:02pm

Request Review

@AmanVarshney01
AmanVarshney01 merged commit 02499db into main May 2, 2026
3 checks passed
@AmanVarshney01
AmanVarshney01 deleted the aman/redesign-analytics-evilcharts branch May 2, 2026 15:04
@coderabbitai

coderabbitai Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

This PR migrates the analytics charting layer from Observable Plot to a new "EvilCharts" system built on Recharts. It introduces a complete charting library with themed config, interactive features (selection, loading states, brush zoom), and replaces all Observable Plot usage in analytics components with corresponding EvilChart implementations.

Changes

Analytics Charting Migration to EvilCharts

Layer / File(s) Summary
Configuration & Dependency Setup
package.json, components.json, apps/web/src/app/(home)/analytics/_components/evil-chart-utils.ts
Removed @observablehq/plot dependency, added recharts@^3.8.1. Added @evilcharts registry entry. Created evil-chart-utils.ts with color tone management (EvilTone, toneColors, seriesConfig, multiSeriesConfig) and share-item keying utilities for chart configuration.
Chart Infrastructure & UI Layer
apps/web/src/components/evilcharts/ui/chart.tsx, apps/web/src/components/evilcharts/ui/background.tsx, apps/web/src/components/evilcharts/ui/dot.tsx, apps/web/src/components/evilcharts/ui/tooltip.tsx, apps/web/src/components/evilcharts/ui/legend.tsx, apps/web/src/components/evilcharts/ui/evil-brush.tsx
Implemented ChartContainer with theme-driven CSS variable injection, chart config validation via useChart hook. Added ChartBackground with 10+ SVG pattern variants. Created ChartDot, ChartTooltip, and ChartLegendContent for Recharts integration. Built EvilBrush for interactive range selection and zoom with useEvilBrush hook.
Chart Components
apps/web/src/components/evilcharts/charts/area-chart.tsx, apps/web/src/components/evilcharts/charts/bar-chart.tsx, apps/web/src/components/evilcharts/charts/line-chart.tsx, apps/web/src/components/evilcharts/charts/pie-chart.tsx, apps/web/src/components/evilcharts/charts/radar-chart.tsx, apps/web/src/components/evilcharts/charts/radial-chart.tsx
Implemented six chart types supporting click selection, loading shimmer animations, optional glow filters, and multiple fill variants (solid, gradient, hatched, duotone, stripped). Each includes SVG pattern/gradient generation and per-series opacity control based on selection state.
Analytics Chart Integration
apps/web/src/app/(home)/analytics/_components/timeline-charts.tsx, apps/web/src/app/(home)/analytics/_components/stack-configuration-charts.tsx, apps/web/src/app/(home)/analytics/_components/dev-environment-charts.tsx, apps/web/src/app/(home)/analytics/_components/preference-chart-card.tsx, apps/web/src/app/(home)/analytics/_components/metrics-cards.tsx
Replaced Observable Plot rendering with corresponding EvilChart components (EvilAreaChart, EvilBarChart). Updated data transformation pipelines to match new chart shape requirements. Wired chart config via seriesConfig/multiSeriesConfig helpers. Removed Plot-specific sizing/margin logic.
Analytics Helper Cleanup
apps/web/src/app/(home)/analytics/_components/analytics-helpers.ts, apps/web/src/app/(home)/analytics/_components/plot-chart.tsx
Removed culori dependency and deleted Plot-specific helper functions (interpolateColor, isCompactPlot, resolvePlotMargins, getPlotFontSize, resolveHorizontalBarMargins, PlotMargins type). Deleted entire PlotChart client component and its context/palette infrastructure.
Analytics UI & Styling Updates
apps/web/src/app/(home)/analytics/_components/analytics-header.tsx, apps/web/src/app/(home)/analytics/_components/analytics-page.tsx, apps/web/src/app/(home)/analytics/_components/analytics-sources.tsx, apps/web/src/app/(home)/analytics/_components/chart-card.tsx, apps/web/src/app/(home)/analytics/_components/live-logs.tsx, apps/web/src/app/(home)/analytics/_components/section-header.tsx
Restructured analytics header with new HeaderStat component grid and updated connection status indicator (new DatabaseZap, Terminal, Activity icons). Refactored layout from nested div wrappers to main container with flex column. Updated typography, spacing, and border styles across cards/sections. Replaced live-logs feed with new animated chip-based layout.
Global Style Cleanup
apps/web/src/app/global.css
Removed .plot-frame and .bts-plot chart styling rules (44 lines). Added .file-load-animation for fade-in effects.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: replacing Observable Plot charts with EvilCharts and refreshing the analytics dashboard styling.
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.


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
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

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

This branch was successfully deployed

1 active deployment
Preview — d3133220 Deployed May 2, 2026 by vercel[bot]
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