feat: add new features for patch 16#23
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces an admin badges listing system with filtering and sorting, adds three new badge types (abomination, genius, dunce) with awarding logic during game finalization, replaces clipboard-copy behavior with a share-sheet flow for game invites, and adjusts dashboard navigation and profile badge density. Changes
Sequence DiagramssequenceDiagram
participant User as Staff User
participant UI as Filter UI
participant Router as API Router
participant Service as Admin Service
participant DB as Database
User->>UI: Click badges, apply filters (period, type, category, min/max)
UI->>Router: POST /admin.listBadges { filters, sort, pagination }
Router->>Service: listAdminBadges(input)
Service->>DB: Query badge awards aggregated by badge ID
DB-->>Service: Award totals & distinct earners
Service->>Service: Apply text/category/period/type filters<br/>Apply numeric range filters<br/>Sort in-memory<br/>Paginate results
Service-->>Router: Paginated badge catalog results
Router-->>UI: Badge list with stats
UI-->>User: Render table with columns (id, name, period, type,<br/>category, total awards, distinct earners)
sequenceDiagram
participant Host as Game Host
participant Header as Game Header
participant Sheet as Share Sheet
participant Nav as Native/Platform
participant Clipboard as Clipboard API
Host->>Header: Click "Share" button
Header->>Sheet: open=true with context (code, invite URL, pack name)
Sheet->>Sheet: Generate share body text
Sheet->>Sheet: Compute platform URLs (WhatsApp, Telegram, etc.)
Host->>Sheet: Select share option (native share, platform, or copy)
Sheet->>Nav: navigator.share({ title, text, url })
Nav-->>Host: Native share sheet / fallback
alt Clipboard copy
Sheet->>Clipboard: Copy room code or invite link
Clipboard-->>Sheet: Success
Sheet->>Sheet: Set copiedCode/copiedLink state<br/>Show toast notification<br/>Render check icon
end
Host->>Sheet: Dismiss
Sheet->>Header: onOpenChange(false)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~55 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Summary by CodeRabbit
New Features
UX Improvements