Auto-open unread group threads from friends - #12
Conversation
- Pass unread state into Group navigation - Open the viewer automatically for unread group inboxes - Exclude group deliveries from friend row/status calculations
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughThis change introduces automatic message viewer opening when navigating to a group with unread messages. The FriendsScreen now passes an Changes
Sequence DiagramsequenceDiagram
actor User
participant FriendsScreen
participant Navigation
participant GroupScreen
participant MessageViewer
User->>FriendsScreen: Press group row with unread
FriendsScreen->>FriendsScreen: Check group.unreadCount > 0
FriendsScreen->>Navigation: Navigate to "Group" route<br/>{groupId, autoOpenUnread: true}
Navigation->>GroupScreen: Mount with route params
GroupScreen->>GroupScreen: Read autoOpenUnread from params
GroupScreen->>GroupScreen: useEffect: Check conditions<br/>(autoOpenUnread, !isLoading, inboxRaw.length)
alt Conditions Met & Not Already Opened
GroupScreen->>MessageViewer: Call openViewer(inboxRaw, 0)
MessageViewer->>User: Display unread messages
else
GroupScreen->>User: Render group without auto-open
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 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. 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
autoOpenUnreadflag when opening a group from the Friends screen if that group has unread messages.autoOpenUnreadroute param.Testing
Summary by CodeRabbit
New Features
Bug Fixes