feat(web): redesign analytics dashboard with observable plot#973
feat(web): redesign analytics dashboard with observable plot#973AmanVarshney01 merged 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fee50235a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Caution Review failedPull request was closed or merged during review WalkthroughMigrates the analytics dashboard from Recharts to Observable Plot: adds Plot-based rendering infrastructure, expands analytics data types and helpers, replaces chart UI and styles, updates analytics client/backend data assembly, and refactors multiple analytics components and layout props. Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
apps/web/src/app/(home)/analytics/_components/plot-chart.tsx (2)
77-97: Ensurebuildfunction is stable (memoized) to prevent unnecessary re-renders.The
buildfunction is included in the effect's dependency array. If callers pass an inline function withoutuseCallback, this effect will re-run on every parent render, causing the plot to be rebuilt unnecessarily.Consider documenting this expectation or adding a note for consumers:
// Callers should memoize the build function with useCallback to prevent // unnecessary plot rebuilds on parent re-renders.
93-96: Minor: Redundant cleanup call.After
plot.remove(), the element is already detached from the DOM. The subsequentmount.replaceChildren()is a no-op when the mount was the parent. This is harmless but unnecessary.Simplified cleanup
return () => { plot.remove(); - mount.replaceChildren(); };apps/web/src/app/(home)/analytics/_components/timeline-charts.tsx (1)
187-192: Don't drop the year on compact monthly labels.
monthlyTimeSeriesis full-history data, socompact ? "MMM" : "MMM yy"makes repeated months indistinguishable once the dataset crosses a year boundary. Because the axis still renders every month, the mobile layout also ends up with overlapping text. Consider thinning the tick labels and keeping some year signal in the compact formatter.apps/web/src/app/(home)/analytics/_components/stack-configuration-charts.tsx (1)
19-107: Extract the shared preference chart before the copies drift further.This
PreferenceCardis nearly identical toapps/web/src/app/(home)/analytics/_components/dev-environment-charts.tsx:19-110, and the two versions already differ inmaxItemssupport and height math. Pulling the shared Plot setup into one component/helper will keep future tooltip, compact-label, and sizing fixes from landing in only one section.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a9e62946-536a-496f-9cce-c37a51bd0efa
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (18)
apps/web/package.jsonapps/web/src/app/(home)/analytics/_components/analytics-header.tsxapps/web/src/app/(home)/analytics/_components/analytics-helpers.tsapps/web/src/app/(home)/analytics/_components/analytics-page.tsxapps/web/src/app/(home)/analytics/_components/analytics-sources.tsxapps/web/src/app/(home)/analytics/_components/chart-card.tsxapps/web/src/app/(home)/analytics/_components/dev-environment-charts.tsxapps/web/src/app/(home)/analytics/_components/metrics-cards.tsxapps/web/src/app/(home)/analytics/_components/plot-chart.tsxapps/web/src/app/(home)/analytics/_components/section-header.tsxapps/web/src/app/(home)/analytics/_components/stack-configuration-charts.tsxapps/web/src/app/(home)/analytics/_components/timeline-charts.tsxapps/web/src/app/(home)/analytics/_components/types.tsapps/web/src/app/(home)/analytics/analytics-client.tsxapps/web/src/app/global.cssapps/web/src/components/ui/chart.tsxpackages/backend/convex/analytics-date-utils.tspackages/backend/convex/analytics.ts
💤 Files with no reviewable changes (1)
- apps/web/src/components/ui/chart.tsx
Summary
Verification
/analyticsat desktop and mobile widthsSummary by CodeRabbit
New Features
Dependencies