feat: add Privy logins page to admin dashboard#15
Conversation
New /privy page showing daily/weekly/monthly login counts and a table of individual logins with email, Privy DID, and timestamp. Adds "View Privy Logins" nav button to AdminDashboard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (18)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Add 'all' period (new default) to period selector - Update types to use full Privy User objects instead of filtered rows - Add total_new, total_active, total_privy_users to response type - Show new/active/total counts in the UI - Extract email from linked_accounts in table - Convert created_at from seconds to Date Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| {logins.map((login) => { | ||
| const email = getEmail(login); | ||
| return ( | ||
| <TableRow key={login.id}> |
There was a problem hiding this comment.
SRP
- actual: row defined in the table
- required: new file for the row component
…om type DRY - removed PrivyLinkedAccount and custom PrivyUser type definitions, now re-exports User from the Privy SDK. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- PrivyLoginRow: single table row component - PrivyPeriodSelector: period toggle buttons - PrivyLoginsStats: new/active/total counts display Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
types/privy.ts
Outdated
| total_new: number; | ||
| total_active: number; | ||
| total_privy_users: number; | ||
| logins: import("@privy-io/react-auth").User[]; |
There was a problem hiding this comment.
Why are you doing an inline import instead of using PrivyUser[] here?
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The React SDK's User type uses camelCase (createdAt: Date) but our API returns the raw Privy Management API shape with snake_case (created_at: number). Define our own type to match the actual response. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… as string Index signature [key: string]: unknown was overriding the explicit address?: string property, causing it to resolve as unknown. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shows the most recent latest_verified_at across all linked accounts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…columns Uses @tanstack/react-table and SortableHeader, matching the pattern from SandboxesTable. Default sort: Created At descending. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shows daily last seen activity counts as a line chart above the table. Uses shadcn ChartContainer with Recharts LineChart. Data grouped by date via getLastSeenByDate helper. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Recharts v3 removed payload from the Tooltip component props type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed manually downloaded chart.tsx and reinstalled properly via npx shadcn@latest add chart for correct Recharts v3 types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New /privy page showing daily/weekly/monthly login counts and a table of individual logins with email, Privy DID, and timestamp. Adds "View Privy Logins" nav button to AdminDashboard.