feat(llc): update isRead/isSeen flags on mark events - #112
Conversation
markRead, markSeen, markAllRead, and markAllSeen now update the per-activity and per-group isRead/isSeen flags on the feed state when the activity.marked WebSocket event fires, in addition to the existing aggregate notification-status counts. Closes FLU-418 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughAdds a ChangeshasOwnFields gating and notification read/seen reconciliation
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Feed
participant FeedEventHandler
participant FeedState
Feed->>FeedEventHandler: emit ActivityUpdated(activity, hasOwnFields)
Feed->>FeedEventHandler: emit FeedUpdated(feed, hasOwnFields)
FeedEventHandler->>FeedState: onActivityUpdated(activity, hasOwnFields)
FeedState->>FeedState: ActivityData.updateWith(hasOwnFields)
FeedEventHandler->>FeedState: onFeedUpdated(feed, hasOwnFields)
FeedState->>FeedState: FeedData.updateWith(hasOwnFields)
sequenceDiagram
participant Client
participant FeedState
participant NotificationStatus
Client->>FeedState: markRead(['group1'])
FeedState->>NotificationStatus: update readActivities, lastReadAt
FeedState->>FeedState: reconcileReadSeen()
FeedState->>FeedState: recompute group and nested activity isRead/isSeen
FeedState-->>Client: updated aggregatedActivities
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
==========================================
+ Coverage 85.53% 85.82% +0.28%
==========================================
Files 124 124
Lines 4342 4381 +39
==========================================
+ Hits 3714 3760 +46
+ Misses 628 621 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
markRead,markSeen,markAllRead, andmarkAllSeeninFeedStatenow update per-activityActivityData.isRead/isSeenand per-groupAggregatedActivityData.isRead/isSeenflags in addition to the aggregatenotificationStatuscounts. These flags now stay in sync when theactivity.markedWebSocket event fires.docs/code_snippets/05_06_notification_feeds.dartwith functions showing per-activity/per-groupisRead/isSeenaccess and mark-specific-groups-as-read pattern.docs/code_snippets/08_01_events.dartshowing how to observe feed state changes viafeed.stream.Closes FLU-418
Test plan
melos run analyze— no issuesmelos run format— no changesflutter testinpackages/stream_feeds— 392 tests passdart analyze docs/— snippets compile🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes