feat(llc): expose restrictReplies on ActivityData and FeedAddActivityRequest#108
Conversation
…Request (FLU-356) Surface the comment-reply restriction field on the domain model and request so integrators can set and read who is allowed to comment on an activity. Adds ActivityRestrictReplies extension type and maps it from ActivityResponse. Closes FLU-356 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 32 minutes and 5 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds reply restriction support to activities in the Stream Feeds Flutter SDK. A new ChangesReply Restriction Support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@docs/code_snippets/06_03_comments.dart`:
- Around line 148-151: After calling await feed.getOrCreate(), the currentFeed
is being read from the stale pre-refresh activity object instead of the
refreshed state. Re-read the activity from feed.state after the await
feed.getOrCreate() call completes, and use this refreshed activity object to
access currentFeed and ownFollowings for computing canComment, ensuring you are
using the updated data rather than stale values from before the refresh.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 544f8ca1-ed2e-484c-b9ef-760d58789f6b
📒 Files selected for processing (6)
docs/code_snippets/06_03_comments.dartpackages/stream_feeds/CHANGELOG.mdpackages/stream_feeds/lib/src/models/activity_data.dartpackages/stream_feeds/lib/src/models/activity_data.freezed.dartpackages/stream_feeds/lib/src/models/request/feed_add_activity_request.dartpackages/stream_feeds/lib/src/models/request/feed_add_activity_request.freezed.dart
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #108 +/- ##
==========================================
- Coverage 85.53% 85.51% -0.02%
==========================================
Files 124 124
Lines 4342 4350 +8
==========================================
+ Hits 3714 3720 +6
- Misses 628 630 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add unit tests for ActivityResponseRestrictRepliesMapper.toModel(), ActivityResponseMapper restrictReplies field, and FeedAddActivityRequest.restrictReplies. Also adds restrictReplies param to createDefaultActivityResponse test helper. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reads currentFeed from the re-fetched activity so that ownFollowings reflects the latest state rather than the stale pre-refresh object. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
ActivityRestrictRepliesextension type (everyone/nobody/peopleIFollow) to the domain layerrestrictRepliesonActivityData(read model) mapped fromActivityResponseRestrictRepliesrestrictReplies: AddActivityRequestRestrictReplies?toFeedAddActivityRequestso integrators can control comment restrictions when creating an activityown_followingsonFeedDatawas already present from the codegen in feat(llc): update openapi models #106 — no change needed thereTest plan
melos run analyze— no issuesflutter testinpackages/stream_feeds— all 392 tests passdocs/code_snippets/06_03_comments.dart(newrestrictReplies()function) compiles cleanlyCloses FLU-356
🤖 Generated with Claude Code
Summary by CodeRabbit
restrictRepliessetting (everyone, nobody, followers-only).restrictRepliesfrom the resulting feed state.restrictReplies.