feat: implement patch#39
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 implements a comprehensive admin dashboard for posts and comments, adds reaction capabilities to posts and comments with a reusable ReactionBar component, introduces real-time game presence indicators (online/away/offline) for players and hosts, enhances duplicate policy communication with an explainer component, and adds QR code invites via a new HostLobbyQr component. Schema, service, and routing updates support these features throughout the stack. ChangesAdmin Dashboard for Posts & Comments
Comment Reactions & Enrichment
Game Presence Display System
Duplicate Policy & Invite UX
Polish & Metadata Updates
Sequence Diagram(s)sequenceDiagram
actor Player
participant GameHeader as Game Header
participant Presence as GamePresenceProvider
participant Ably as Ably Channel
participant Context as Presence Context
Player ->> GameHeader: Render game session
GameHeader ->> Presence: Initialize GamePresenceProvider
Presence ->> Ably: Subscribe to presence channel
Ably ->> Presence: Emit existing members (seed state)
Presence ->> Context: Update host/player presence state
Player ->> GameHeader: Page becomes visible
GameHeader ->> Presence: Document visibility changes
Presence ->> Ably: Update presence payload (visible: true)
Ably ->> Presence: Broadcast update
Presence ->> Context: Update state (online)
GameHeader ->> GameHeader: Render PresenceDot (green)
Player ->> GameHeader: Page hidden/backgrounded
GameHeader ->> Presence: Document visibility changes
Presence ->> Ably: Update presence payload (visible: false)
Ably ->> Presence: Broadcast update
Presence ->> Context: Update state (away)
GameHeader ->> GameHeader: Render PresenceDot (yellow)
sequenceDiagram
actor User
participant CommentRow as Comment Row
participant ReactionBar as ReactionBar
participant Picker as Reaction Picker
participant Mutation as React Query Mutation
participant Server as API Server
participant Query as Thread Query Cache
User ->> CommentRow: View comment with reactions
CommentRow ->> ReactionBar: Render with comment data
ReactionBar ->> ReactionBar: Initialize local optimistic state
ReactionBar ->> ReactionBar: Render reaction chips + add button
User ->> Picker: Click add-reaction button
Picker ->> Picker: Open emoji picker
User ->> Picker: Select emoji
Picker ->> ReactionBar: Commit reaction selection
ReactionBar ->> ReactionBar: Apply optimistic update (my, total, byType)
ReactionBar ->> ReactionBar: Render updated chips immediately
ReactionBar ->> Mutation: Trigger setReaction mutation
Mutation ->> Server: POST set reaction
alt Mutation succeeds
Server ->> Server: Persist reaction
Mutation ->> Query: Invalidate thread query
Query ->> CommentRow: Refetch and re-render with server state
else Mutation fails
Mutation ->> ReactionBar: Rollback optimistic state
ReactionBar ->> ReactionBar: Restore previous reactions
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Summary by CodeRabbit
Release Notes
New Features
Improvements