feat(llc): expose deleteNotificationActivity on delete methods - #110
feat(llc): expose deleteNotificationActivity on delete methods#110renefloor wants to merge 5 commits into
Conversation
Plumbs the delete_notification_activity query param through all public delete methods (deleteActivity, deleteComment, deleteActivityReaction, deleteCommentReaction) on Feed and Activity state objects and their underlying repositories. Defaults to null (existing behaviour unchanged). Also adds docs snippet for mention/comment_mention notification types and the new delete-with-notification pattern. Closes FLU-372 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR adds an optional ChangesNotification Deletion Flag
Estimated code review effort: 2 (Simple) | ~15 minutes 🚥 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #110 +/- ##
=======================================
Coverage 85.53% 85.53%
=======================================
Files 124 124
Lines 4342 4342
=======================================
Hits 3714 3714
Misses 628 628 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (2)
packages/stream_feeds/lib/src/state/feed.dart (1)
259-283: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument
deleteNotificationActivityacross all four delete methods.
deleteActivity,deleteComment,deleteActivityReaction, anddeleteCommentReactionall gain the new optionaldeleteNotificationActivityparameter, but none of their dartdoc blocks mention it, despite each block documenting the other params.📝 Suggested doc addition (repeat for the other three methods)
/// Deletes an activity from the feed. /// /// The [id] is the unique identifier of the activity to delete. /// If [hardDelete] is `true`, the activity will be permanently deleted. If `false`, it will be /// soft deleted. (default is `false`) + /// If [deleteNotificationActivity] is `true`, the notification activity created for this + /// activity (e.g. a mention) is also deleted. /// Returns a [Result] indicating success or failure of the deletion operation.As per path instructions,
**/@(lib|packages)/**/*.dartshould "Use///for public API documentation ... following Effective Dart style".Also applies to: 470-496, 793-821, 852-880
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/stream_feeds/lib/src/state/feed.dart` around lines 259 - 283, The dartdoc for the delete methods in Feed is missing the new optional deleteNotificationActivity parameter, even though the signatures already include it. Update the public API docs for deleteActivity, deleteComment, deleteActivityReaction, and deleteCommentReaction to describe deleteNotificationActivity alongside the existing parameters, using the same /// style and wording pattern already used in Feed.Source: Path instructions
packages/stream_feeds/lib/src/state/activity.dart (1)
225-238: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the new
deleteNotificationActivityparameter.Both
deleteCommentanddeleteCommentReactiondocument existing params ([hardDelete],[commentId],[type]) but the newdeleteNotificationActivityflag isn't mentioned in either dartdoc block.📝 Suggested doc additions
/// Deletes a comment by its ID. /// /// When [hardDelete] is true, permanently deletes the comment; otherwise marks it as deleted. + /// + /// When [deleteNotificationActivity] is true, also deletes the notification activity + /// created for this comment (e.g. mention notifications). /// /// Returns a [Result] containing void or an error./// Removes a reaction from a comment. /// /// Returns a [Result] containing the removed [FeedsReactionData] or an error. + /// + /// When [deleteNotificationActivity] is true, also deletes the notification activity + /// created for this reaction.As per path instructions,
**/@(lib|packages)/**/*.dartshould "Use///for public API documentation ... following Effective Dart style".Also applies to: 303-314
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/stream_feeds/lib/src/state/activity.dart` around lines 225 - 238, The public API docs for deleteComment and deleteCommentReaction are missing the new deleteNotificationActivity parameter. Update the Dartdoc blocks on those methods to mention deleteNotificationActivity alongside the existing parameter descriptions, using the same /// style and Effective Dart wording as the other documented args. Keep the descriptions aligned with the method signatures so the parameter is discoverable in activity.dart.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/stream_feeds/lib/src/state/activity.dart`:
- Around line 225-238: The public API docs for deleteComment and
deleteCommentReaction are missing the new deleteNotificationActivity parameter.
Update the Dartdoc blocks on those methods to mention deleteNotificationActivity
alongside the existing parameter descriptions, using the same /// style and
Effective Dart wording as the other documented args. Keep the descriptions
aligned with the method signatures so the parameter is discoverable in
activity.dart.
In `@packages/stream_feeds/lib/src/state/feed.dart`:
- Around line 259-283: The dartdoc for the delete methods in Feed is missing the
new optional deleteNotificationActivity parameter, even though the signatures
already include it. Update the public API docs for deleteActivity,
deleteComment, deleteActivityReaction, and deleteCommentReaction to describe
deleteNotificationActivity alongside the existing parameters, using the same ///
style and wording pattern already used in Feed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b647d179-8447-49a2-8e3b-a52f072bd4aa
📒 Files selected for processing (8)
docs/code_snippets/05_06_notification_feeds.dartpackages/stream_feeds/CHANGELOG.mdpackages/stream_feeds/lib/src/repository/activities_repository.dartpackages/stream_feeds/lib/src/repository/comments_repository.dartpackages/stream_feeds/lib/src/state/activity.dartpackages/stream_feeds/lib/src/state/feed.dartpackages/stream_feeds/test/state/activity_test.dartpackages/stream_feeds/test/state/feed_test.dart
Summary
deleteNotificationActivity: bool?toFeed.deleteActivity,Feed.deleteComment,Feed.deleteActivityReaction,Feed.deleteCommentReaction,Activity.deleteComment, andActivity.deleteCommentReactiondelete_notification_activityquery param (already present from codegen feat(llc): update openapi models #106)mentionandcomment_mentionrequire no SDK changes — they are standard activity types handled generically; the snippet documents how to read themRelevance check
The
delete_notification_activityquery param was already in the generatedDefaultApi(PR #106) but was not exposed on any public SDK method. New notification types (mention,comment_mention) only need docs — they appear as activity types in aggregated notification activities with no special handling needed.Test plan
melos run analyze— no issuesflutter testinpackages/stream_feeds— all 392 tests passdocs/code_snippets/05_06_notification_feeds.dart(new functions) compiles cleanlyCloses FLU-372
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Chores