-
Notifications
You must be signed in to change notification settings - Fork 1
feat(llc): update generated client and models #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add support for moderation appeals with new endpoints (`appeal`, `getAppeal`, `queryAppeals`) and related data models (`AppealRequest`, `AppealResponse`, etc.). - Update `SubmitActionRequest` and `SubmitActionResponse` to include appeal-related fields and actions. - Rename `OwnCapabilitiesBatch` to `OwnBatch` and update `CapabilitiesRepository` to use the more general `ownBatch` endpoint. - Add batch upsert support for follows and unfollows (`getOrCreateFollows`, `getOrCreateUnfollows`). - Expand `FeedResponse` and `FeedSuggestionResponse` with `activityCount` and `ownFollowings`. - Update `UpdateFeedRequest`, `UpdateActivityRequest`, and `UpdateCommentRequest` with additional configuration fields like `description`, `mentionedUserIds`, and `attachments`. - Enhance `RuleBuilderCondition` and `TextRuleParameters` with new moderation filter options (e.g., semantic filters, user roles, and identical content counts). - Add `individualRecording` and `rawRecording` settings to `CallSettingsResponse`. - Minor: remove redundant `super == other` checks in generated Freezed files and update test helpers.
📝 WalkthroughWalkthroughAdds moderation appeal endpoints (appeal, getAppeal, queryAppeals), extends FeedData with a required Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant ModerationClient as ClientLib
participant ModerationRepository as Repo
participant ModerationAPI as API
Client->>ClientLib: appeal(appealRequest)
ClientLib->>Repo: appeal(appealRequest)
Repo->>API: POST /moderation/appeal (appealRequest)
API-->>Repo: AppealResponse
Repo-->>ClientLib: Result<AppealResponse>
ClientLib-->>Client: Result<AppealResponse>
alt getAppeal flow
Client->>ClientLib: getAppeal(id)
ClientLib->>Repo: getAppeal(id)
Repo->>API: GET /moderation/appeals/{id}
API-->>Repo: GetAppealResponse
Repo-->>ClientLib: Result<GetAppealResponse>
ClientLib-->>Client: Result<GetAppealResponse>
end
alt queryAppeals flow
Client->>ClientLib: queryAppeals(query?)
ClientLib->>Repo: queryAppeals(query?)
Repo->>API: GET /moderation/appeals?query...
API-->>Repo: QueryAppealsResponse
Repo-->>ClientLib: Result<QueryAppealsResponse>
ClientLib-->>Client: Result<QueryAppealsResponse>
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @packages/stream_feeds/lib/src/client/moderation_client.dart:
- Around line 103-134: The compilation fails because the generated appeal model
types referenced by moderation_client.dart (appeal, getAppeal, queryAppeals
methods: appeal(), getAppeal(), queryAppeals()) and exported from models.dart
are missing; update the OpenAPI spec to include the appeal endpoints and their
schemas (AppealRequest, AppealResponse, GetAppealResponse, QueryAppealsRequest,
QueryAppealsResponse) and then re-run the client code generator to produce the
model files so the calls in _moderationRepository and the exports in models.dart
resolve; alternatively, if the endpoints were removed intentionally, remove or
update the appeal(), getAppeal(), and queryAppeals() usages and exports to match
the current spec before merging.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (119)
packages/stream_feeds/lib/src/generated/api/api/default_api.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/api/default_api.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_added_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_deleted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_feedback_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_mark_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_pinned_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_reaction_added_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_reaction_deleted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_reaction_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_removed_from_feed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_selector_config.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_unpinned_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/activity_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/app_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/bookmark_added_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/bookmark_deleted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_deleted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/bookmark_folder_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/bookmark_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/call_settings_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/call_settings_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/call_settings_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/comment_added_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/comment_deleted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/comment_reaction_added_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/comment_reaction_deleted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/comment_reaction_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/comment_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/egress_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/egress_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/egress_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_created_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_deleted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_group_changed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_group_deleted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_member_added_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_member_removed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_member_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_suggestion_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/follow_batch_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/follow_batch_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/follow_batch_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/follow_created_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/follow_deleted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/follow_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/get_or_create_feed_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/mark_reviewed_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/mark_reviewed_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/mark_reviewed_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/moderation_custom_action_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/moderation_flagged_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/moderation_mark_reviewed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/notification_feed_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/notification_trigger.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/notification_trigger.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/notification_trigger.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_capabilities_batch_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_capabilities_batch_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_capabilities_batch_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_capabilities_batch_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_capabilities_batch_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_capabilities_batch_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/poll_closed_feed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/poll_deleted_feed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/poll_updated_feed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/poll_vote_casted_feed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/poll_vote_changed_feed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/poll_vote_removed_feed_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/poll_vote_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/poll_vote_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/poll_vote_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/review_queue_item_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/rule_builder_condition.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/sort_param.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/sort_param.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/sort_param.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/sort_param_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/sort_param_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/sort_param_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/stories_feed_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/submit_action_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/submit_action_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/submit_action_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/submit_action_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/submit_action_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/submit_action_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/text_rule_parameters.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/text_rule_parameters.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/text_rule_parameters.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/update_activity_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/update_activity_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/update_activity_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/update_comment_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/update_comment_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/update_comment_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/update_feed_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/update_feed_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/update_feed_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_banned_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_deactivated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_muted_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_reactivated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_updated_event.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/models.dartis excluded by!**/generated/**
📒 Files selected for processing (8)
packages/stream_feeds/lib/src/client/moderation_client.dartpackages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dartpackages/stream_feeds/lib/src/ws/events/events.freezed.dartpackages/stream_feeds_test/lib/src/helpers/test_data.dart
🧰 Additional context used
📓 Path-based instructions (7)
**/*.dart
📄 CodeRabbit inference engine (.cursor/rules/cursor-rules-location.mdc)
**/*.dart: Use the barrel_files package with @includeInBarrelFile annotations for public API management in Dart projects; keep implementation details in lib/src/ without annotations
Mark only classes, functions, and enums intended for external package usage with @includeInBarrelFile; keep repository classes, mappers, and internal state objects in lib/src/ without annotations
**/*.dart: Use@freezedmixed mode for data classes in Dart
ReturnResult<T>from all repository methods in Dart
Apply early return patterns consistently in Dart code
Use pattern matching withswitchexpressions in Dart
Mark public APIs with@includeInBarrelFileannotation in Dart
Follow enhanced enum vs sealed class guidelines in Dart
Use const constructors where possible in Dart
Implement proper disposal patterns in Dart StateNotifiers and providers
Ensure pure Dart compatibility across VM, Flutter, and Web environments
Plan for StateNotifier reactive patterns when implementing state management in Dart
**/*.dart: Use @freezed for all data classes with required id fields and const constructors
Implement StateNotifier-based reactive state management with automatic change notifications
Apply Result pattern for all async operations with explicit error handling
Use early return patterns for clean control flow in Dart code
Create extension functions for data mapping using.toModel()pattern instead of mapper classes
Mark public APIs with @includeInBarrelFile annotation for barrel file export management
Implement proper resource management with disposal and cleanup patterns in Dart code
Use constructor injection for all dependencies in Dart classes
**/*.dart: All data models should use @freezed with Dart's mixed mode syntax and include @OverRide annotations on fields
Mark classes for public export using @includeInBarrelFile annotation
Use extension functions with.toModel()convention for data mapping instead of dedicated mapper classes
All repository methods must return Result...
Files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/ws/events/events.freezed.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/lib/src/client/moderation_client.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
packages/stream_feeds/lib/src/models/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
packages/stream_feeds/lib/src/models/**/*.dart: Use@freezedfor all data classes in the Stream Feeds SDK
Follow Freezed 3.0 mixed mode syntax with@overrideannotations for fields
All models should have anidfield when representing entities
Place custom data fields last in constructors and class definitions
Model naming convention: Use*Datasuffix for model classes (e.g.,ActivityData,FeedData)
Query naming convention: Use*Querysuffix for query classes (e.g.,ActivitiesQuery,FeedsQuery)
Request naming convention: Use*Requestsuffix for request classes (e.g.,FeedAddActivityRequest)
Files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
packages/stream_feeds/lib/src/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
Use
//for internal/private code documentation
Files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/ws/events/events.freezed.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds/lib/src/client/moderation_client.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
packages/stream_feeds/lib/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
Apply Dart analyzer configuration from
analysis_options.yamlfor code quality
Files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/ws/events/events.freezed.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds/lib/src/client/moderation_client.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
packages/stream_feeds/lib/src/ws/events/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
Real-time event handlers must use
@freezedfor type-safe event handling in WebSocket layer
Files:
packages/stream_feeds/lib/src/ws/events/events.freezed.dart
{**/api/**/*.dart,**/*_api.dart,**/client/*.dart}
📄 CodeRabbit inference engine (.cursor/rules/stream-feeds-api.mdc)
{**/api/**/*.dart,**/*_api.dart,**/client/*.dart}: Stream Feeds API integration should be implemented according to the Activity Streams specification with structured actor, verb, object, and target fields
Implement proper authentication using API keys and user tokens via the StreamFeedsClient with tokenProvider parameter
Implement structured error handling for Stream Feeds API responses including 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests, and 500 Internal Server Error status codes
Use batch operations for bulk activity creation and updates to optimize API performance
Implement WebSocket event handlers for real-time Stream Feeds updates including activity events, reaction events, follow events, and member events
Respect API rate limiting by implementing retry logic with retry-after headers and designing applications to handle rate limit responses gracefully
Implement circuit breaker pattern for automatic failure recovery in Stream Feeds API interactions
Use connection pooling and gzip compression for efficient HTTP connection management and reduced bandwidth when communicating with Stream Feeds API
Files:
packages/stream_feeds/lib/src/client/moderation_client.dart
packages/stream_feeds/lib/src/repository/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
packages/stream_feeds/lib/src/repository/**/*.dart: All repository methods must returnResult<T>types for explicit error handling
Use early return patterns for validation and errors in repository methods
Use extension functions for API-to-domain model mapping in repositories
Never throw exceptions in repositories - always return Result types
Files:
packages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
🧠 Learnings (29)
📓 Common learnings
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-api.mdc:0-0
Timestamp: 2025-12-05T14:37:17.519Z
Learning: Applies to {**/api/**/*.dart,**/*_api.dart,**/client/*.dart} : Stream Feeds API integration should be implemented according to the Activity Streams specification with structured actor, verb, object, and target fields
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-api.mdc:0-0
Timestamp: 2025-12-05T14:37:17.519Z
Learning: Applies to {**/api/**/*.dart,**/*_api.dart,**/client/*.dart} : Use batch operations for bulk activity creation and updates to optimize API performance
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Follow Freezed 3.0 mixed mode syntax with `override` annotations for fields
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Model naming convention: Use `*Data` suffix for model classes (e.g., `ActivityData`, `FeedData`)
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
📚 Learning: 2025-12-05T14:37:17.519Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-api.mdc:0-0
Timestamp: 2025-12-05T14:37:17.519Z
Learning: Applies to {**/api/**/*.dart,**/*_api.dart,**/client/*.dart} : Stream Feeds API integration should be implemented according to the Activity Streams specification with structured actor, verb, object, and target fields
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/lib/src/client/moderation_client.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Request naming convention: Use `*Request` suffix for request classes (e.g., `FeedAddActivityRequest`)
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : All models should have an `id` field when representing entities
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Place custom data fields last in constructors and class definitions
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/stream_feeds.dart : Follow Effective Dart documentation guidelines for all public APIs
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Follow Freezed 3.0 mixed mode syntax with `override` annotations for fields
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/ws/events/events.freezed.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Use `freezed` for all data classes in the Stream Feeds SDK
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/ws/events/events.freezed.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/stream_feeds.dart : Keep public API minimal - most code should be in `lib/src/` internal directory
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/ws/events/events.freezed.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/lib/src/client/moderation_client.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Query naming convention: Use `*Query` suffix for query classes (e.g., `ActivitiesQuery`, `FeedsQuery`)
Applied to files:
packages/stream_feeds/lib/src/models/feed_data.dartpackages/stream_feeds/lib/src/models/feed_suggestion_data.dartpackages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/ws/events/**/*.dart : Real-time event handlers must use `freezed` for type-safe event handling in WebSocket layer
Applied to files:
packages/stream_feeds/lib/src/ws/events/events.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/generated/**/*.dart : Never manually edit generated files (`*.freezed.dart`, `*.g.dart`, `src/generated/`)
Applied to files:
packages/stream_feeds/lib/src/ws/events/events.freezed.dartpackages/stream_feeds/lib/src/models/feed_data.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/state/**/*.dart : State classes must use `freezed` with const constructors
Applied to files:
packages/stream_feeds/lib/src/ws/events/events.freezed.dart
📚 Learning: 2025-12-05T14:37:37.953Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-sdk.mdc:0-0
Timestamp: 2025-12-05T14:37:37.953Z
Learning: Applies to **/*.dart : Use immutable freezed models for all data classes with required id fields
Applied to files:
packages/stream_feeds/lib/src/ws/events/events.freezed.dart
📚 Learning: 2025-12-05T14:37:17.519Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-api.mdc:0-0
Timestamp: 2025-12-05T14:37:17.519Z
Learning: Applies to {**/api/**/*.dart,**/*_api.dart,**/client/*.dart} : Implement WebSocket event handlers for real-time Stream Feeds updates including activity events, reaction events, follow events, and member events
Applied to files:
packages/stream_feeds/lib/src/ws/events/events.freezed.dart
📚 Learning: 2025-12-05T14:37:05.876Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/project-overview.mdc:0-0
Timestamp: 2025-12-05T14:37:05.876Z
Learning: Applies to **/*.dart : Use freezed for all data classes with required id fields and const constructors
Applied to files:
packages/stream_feeds/lib/src/ws/events/events.freezed.dart
📚 Learning: 2025-12-05T14:36:55.335Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/planit-mode.mdc:0-0
Timestamp: 2025-12-05T14:36:55.335Z
Learning: Applies to **/*.dart : Use `freezed` mixed mode for data classes in Dart
Applied to files:
packages/stream_feeds/lib/src/ws/events/events.freezed.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/stream_feeds.dart : Include examples for complex APIs in documentation
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:37:17.519Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-api.mdc:0-0
Timestamp: 2025-12-05T14:37:17.519Z
Learning: Applies to {**/api/**/*.dart,**/*_api.dart,**/client/*.dart} : Use batch operations for bulk activity creation and updates to optimize API performance
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/test/**/*.dart : Use HTTP interceptors instead of mocking repositories in tests
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/stream_feeds.dart : Use `///` for public API documentation in exported classes and methods
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/lib/src/client/moderation_client.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/repository/**/*.dart : Use extension functions for API-to-domain model mapping in repositories
Applied to files:
packages/stream_feeds/lib/src/client/moderation_client.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/stream_feeds.dart : Export public API classes from main library entry point `lib/stream_feeds.dart`
Applied to files:
packages/stream_feeds/lib/src/client/moderation_client.dartpackages/stream_feeds/lib/src/repository/capabilities_repository.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/repository/**/*.dart : Use early return patterns for validation and errors in repository methods
Applied to files:
packages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/repository/**/*.dart : All repository methods must return `Result<T>` types for explicit error handling
Applied to files:
packages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/repository/**/*.dart : Never throw exceptions in repositories - always return Result types
Applied to files:
packages/stream_feeds/lib/src/repository/capabilities_repository.dartpackages/stream_feeds/lib/src/repository/moderation_repository.dart
📚 Learning: 2025-12-05T14:37:17.519Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-api.mdc:0-0
Timestamp: 2025-12-05T14:37:17.519Z
Learning: Applies to {**/api/**/*.dart,**/*_api.dart,**/client/*.dart} : Implement structured error handling for Stream Feeds API responses including 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests, and 500 Internal Server Error status codes
Applied to files:
packages/stream_feeds/lib/src/repository/capabilities_repository.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/generated/**/*.dart : Never manually edit OpenAPI-generated API code files in `src/generated/`
Applied to files:
packages/stream_feeds/lib/src/repository/moderation_repository.dart
🪛 GitHub Actions: legacy_version_analyze
packages/stream_feeds/lib/src/client/moderation_client.dart
[error] 108-108: dart analyze --fatal-warnings .: The name 'AppealResponse' isn't a type, so it can't be used as a type argument. Try correcting the name to an existing type, or defining a type named 'AppealResponse'. (non_type_as_type_argument)
[error] 109-109: dart analyze --fatal-warnings .: Undefined class 'AppealRequest'. Try changing the name to the name of an existing class, or creating a class with the name 'AppealRequest'. (undefined_class)
[error] 119-119: dart analyze --fatal-warnings .: The name 'GetAppealResponse' isn't a type, so it can't be used as a type argument. Try correcting the name to an existing type, or defining a type named 'GetAppealResponse'. (non_type_as_type_argument)
[error] 130-130: dart analyze --fatal-warnings .: The name 'QueryAppealsResponse' isn't a type, so it can't be used as a type argument. Try correcting the name to an existing type, or defining a type named 'QueryAppealsResponse'. (non_type_as_type_argument)
[error] 131-131: dart analyze --fatal-warnings .: The name 'QueryAppealsRequest' isn't a type, so it can't be used as a type argument. Try correcting the name to the name of an existing class, or creating a class with the name 'QueryAppealsRequest'. (undefined_class)
[warning] 107-107: dart analyze --fatal-warnings .: The referenced name isn't visible in scope. Try adding an import for the referenced name. (comment_references)
[warning] 118-118: dart analyze --fatal-warnings .: The referenced name isn't visible in scope. Try adding an import for the referenced name. (comment_references)
[warning] 129-129: dart analyze --fatal-warnings .: The referenced name isn't visible in scope. Try adding an import for the referenced name. (comment_references)
packages/stream_feeds/lib/src/repository/capabilities_repository.dart
[error] 22-22: dart analyze --fatal-warnings .: The function 'OwnBatchRequest' isn't defined. Try importing the library that defines 'OwnBatchRequest', correcting the name to the name of an existing function, or defining a function named 'OwnBatchRequest'. (undefined_function)
[error] 27-27: dart analyze --fatal-warnings .: The property 'data' can't be unconditionally accessed because the receiver can be 'null'. Try making the access conditional (using '?.') or adding a null check to the target ('!'). (unchecked_use_of_nullable_value)
[warning] 28-28: dart analyze --fatal-warnings .: Method invocation or property access on a 'dynamic' target. Try giving the target a type. (avoid_dynamic_calls)
packages/stream_feeds/lib/src/repository/moderation_repository.dart
[error] 126-126: dart analyze --fatal-warnings .: The name 'AppealResponse' isn't a type, so it can't be used as a type argument. Try correcting the name to an existing type, or defining a type named 'AppealResponse'. (non_type_as_type_argument)
[error] 127-127: dart analyze --fatal-warnings .: Undefined class 'AppealRequest'. Try changing the name to the name of an existing class, or creating a class with the name 'AppealRequest'. (undefined_class)
[error] 139-139: dart analyze --fatal-warnings .: The name 'GetAppealResponse' isn't a type, so it can't be used as a type argument. Try correcting the name to an existing type, or defining a type named 'GetAppealResponse'. (non_type_as_type_argument)
[error] 150-150: dart analyze --fatal-warnings .: The name 'QueryAppealsResponse' isn't a type, so it can't be used as a type argument. Try correcting the name to an existing type, or defining a type named 'QueryAppealsResponse'. (non_type_as_type_argument)
[error] 151-151: dart analyze --fatal-warnings .: The name 'QueryAppealsRequest' isn't a type, so it can't be used as a type argument. Try correcting the name to the name of an existing class, or creating a class with the name 'QueryAppealsRequest'. (undefined_class)
[warning] 125-125: dart analyze --fatal-warnings .: The referenced name isn't visible in scope. Try adding an import for the referenced name. (comment_references)
[warning] 138-138: dart analyze --fatal-warnings .: The referenced name isn't visible in scope. Try adding an import for the referenced name. (comment_references)
[warning] 149-149: dart analyze --fatal-warnings .: The referenced name isn't visible in scope. Try adding an import for the referenced name. (comment_references)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: stream_feeds
- GitHub Check: build
🔇 Additional comments (9)
packages/stream_feeds/lib/src/ws/events/events.freezed.dart (1)
52-53: LGTM: Correctly removed redundant super references from generated code.The hashCode implementations now correctly exclude
super.hashCodefor these event mixins, which is appropriate when there's no super class state beyondObject. The removal is consistent with the equals operators and aligns with the PR objective to eliminate redundant super checks in Freezed-generated files.Note: This is generated code from the Freezed package. The changes reflect updates to either the source
events.dartfile or the Freezed generator configuration.Also applies to: 160-161, 250-251
packages/stream_feeds/lib/src/models/feed_suggestion_data.dart (1)
54-81: LGTM!The
activityCountfield is correctly propagated from the API response to theFeedDatamodel. The field ordering follows the coding guidelines withcustomplaced last in the constructor call.packages/stream_feeds/lib/src/models/feed_data.dart (2)
17-45: LGTM!The
activityCountfield is correctly added toFeedData:
- Uses Freezed 3.0 mixed mode syntax with
@overrideannotation- Includes clear documentation
- Field ordering is consistent with other count fields (
followerCount,memberCount,pinCount)customfield remains last as per coding guidelines
129-152: LGTM!The
toModel()mapper correctly passesactivityCountfrom the API response to the domain model, consistent with the mapping pattern used for other fields.packages/stream_feeds_test/lib/src/helpers/test_data.dart (2)
254-285: LGTM!The
activityCountparameter with default value0is properly added tocreateDefaultFeedResponse. The parameter is grouped logically with other count fields, and the default value is appropriate for test fixtures.
816-844: LGTM!The
activityCountparameter is consistently added tocreateDefaultFeedSuggestionResponsewith the same default value and pattern ascreateDefaultFeedResponse.packages/stream_feeds/lib/src/models/feed_data.freezed.dart (1)
1-6: Generated file - no review needed.This is a Freezed-generated file that correctly reflects the
activityCountfield addition fromfeed_data.dart. Based on learnings, generated files (*.freezed.dart) should not be manually edited and don't require detailed review.packages/stream_feeds/lib/src/repository/capabilities_repository.dart (2)
33-34: LGTM with dependencies.The caching and return logic is correct, assuming the
ownCapabilitiesmap is properly populated from the fixed response handling above.
26-31: Unable to verify null safety concern—OwnBatchResponse type definition not found in repository.The code references
OwnBatchResponseand accessesresponse.data.entriesat line 27, but the actualOwnBatchResponseclass definition is missing from the codebase. The models.dart barrel file exportsown_batch_response.dart, but this file does not exist in the filesystem. Without access to the actual type definition, I cannot confirm whetherresponse.datais nullable or whether the null safety issue described is valid.Verify that the OwnBatchResponse model is properly generated and available, or import it from the correct package source before determining if null checking is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @packages/stream_feeds/CHANGELOG.md:
- Around line 1-4: The Upcoming section of CHANGELOG.md is missing several
public API additions introduced by the PR; update it to list and briefly
describe each new public-facing change: add entries noting the new ownFollowings
field on FeedResponse and FeedSuggestionResponse; document batch upsert methods
getOrCreateFollows and getOrCreateUnfollows; add the new RuleBuilderCondition
filter options userIdenticalContentCountParams, userRoleParams, and semantic
filtering parameters semanticFilterMinThreshold and semanticFilterNames; and
record the CallSettingsResponse additions individualRecording and rawRecording.
Ensure each entry references the exact symbol names (ownFollowings,
FeedResponse, FeedSuggestionResponse, getOrCreateFollows, getOrCreateUnfollows,
userIdenticalContentCountParams, userRoleParams, semanticFilterMinThreshold,
semanticFilterNames, RuleBuilderCondition, CallSettingsResponse,
individualRecording, rawRecording) and is placed under the Upcoming section so
users can see all public API additions.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
packages/stream_feeds/CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: stream_feeds
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (72.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 #84 +/- ##
==========================================
- Coverage 86.53% 86.53% -0.01%
==========================================
Files 121 121
Lines 4175 4196 +21
==========================================
+ Hits 3613 3631 +18
- Misses 562 565 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/stream_feeds_test/lib/src/helpers/test_data.dart (1)
1074-1085: Inconsistent default behavior in query helper.The
createDefaultQueryAppealsResponsehelper auto-populates an emptyitemslist with a default appeal item (line 1080), which differs from all other query response helpers in this file (e.g.,createDefaultQueryActivitiesResponse,createDefaultQueryCommentsResponse,createDefaultQueryFeedsResponse). Those helpers respect the provided empty list without modification.For consistency, consider aligning with the established pattern:
♻️ Align with established pattern
QueryAppealsResponse createDefaultQueryAppealsResponse({ String? next, String? prev, List<AppealItemResponse> items = const [], }) { return QueryAppealsResponse( - items: items.isEmpty ? [createDefaultAppealItemResponse()] : items, + items: items, next: next, prev: prev, duration: '10ms', ); }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (72)
packages/stream_feeds/lib/src/generated/api/model/appeal_item_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/appeal_item_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/appeal_item_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/appeal_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/appeal_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/appeal_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/appeal_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/appeal_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/appeal_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/composite_recording_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/composite_recording_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/composite_recording_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/enrichment_options.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/enrichment_options.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/enrichment_options.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_own_data.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_own_data.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/feed_own_data.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/follow_pair.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/follow_pair.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/follow_pair.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/get_appeal_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/get_appeal_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/get_appeal_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/individual_recording_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/individual_recording_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/individual_recording_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/individual_recording_settings_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/individual_recording_settings_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/individual_recording_settings_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_batch_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_batch_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_batch_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_batch_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_batch_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/own_batch_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/query_appeals_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/query_appeals_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/query_appeals_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/query_appeals_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/query_appeals_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/query_appeals_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/raw_recording_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/raw_recording_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/raw_recording_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/raw_recording_settings_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/raw_recording_settings_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/raw_recording_settings_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/reject_appeal_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/reject_appeal_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/reject_appeal_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/restore_action_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/restore_action_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/restore_action_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unban_action_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unban_action_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unban_action_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unblock_action_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unblock_action_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unblock_action_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unfollow_batch_request.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unfollow_batch_request.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unfollow_batch_request.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unfollow_batch_response.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unfollow_batch_response.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/unfollow_batch_response.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_identical_content_count_parameters.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_identical_content_count_parameters.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_identical_content_count_parameters.g.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_role_parameters.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_role_parameters.freezed.dartis excluded by!**/generated/**packages/stream_feeds/lib/src/generated/api/model/user_role_parameters.g.dartis excluded by!**/generated/**
📒 Files selected for processing (2)
packages/stream_feeds/test/client/moderation_client_test.dartpackages/stream_feeds_test/lib/src/helpers/test_data.dart
🧰 Additional context used
📓 Path-based instructions (3)
**/*.dart
📄 CodeRabbit inference engine (.cursor/rules/cursor-rules-location.mdc)
**/*.dart: Use the barrel_files package with @includeInBarrelFile annotations for public API management in Dart projects; keep implementation details in lib/src/ without annotations
Mark only classes, functions, and enums intended for external package usage with @includeInBarrelFile; keep repository classes, mappers, and internal state objects in lib/src/ without annotations
**/*.dart: Use@freezedmixed mode for data classes in Dart
ReturnResult<T>from all repository methods in Dart
Apply early return patterns consistently in Dart code
Use pattern matching withswitchexpressions in Dart
Mark public APIs with@includeInBarrelFileannotation in Dart
Follow enhanced enum vs sealed class guidelines in Dart
Use const constructors where possible in Dart
Implement proper disposal patterns in Dart StateNotifiers and providers
Ensure pure Dart compatibility across VM, Flutter, and Web environments
Plan for StateNotifier reactive patterns when implementing state management in Dart
**/*.dart: Use @freezed for all data classes with required id fields and const constructors
Implement StateNotifier-based reactive state management with automatic change notifications
Apply Result pattern for all async operations with explicit error handling
Use early return patterns for clean control flow in Dart code
Create extension functions for data mapping using.toModel()pattern instead of mapper classes
Mark public APIs with @includeInBarrelFile annotation for barrel file export management
Implement proper resource management with disposal and cleanup patterns in Dart code
Use constructor injection for all dependencies in Dart classes
**/*.dart: All data models should use @freezed with Dart's mixed mode syntax and include @OverRide annotations on fields
Mark classes for public export using @includeInBarrelFile annotation
Use extension functions with.toModel()convention for data mapping instead of dedicated mapper classes
All repository methods must return Result...
Files:
packages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/test/client/moderation_client_test.dart
{**/api/**/*.dart,**/*_api.dart,**/client/*.dart}
📄 CodeRabbit inference engine (.cursor/rules/stream-feeds-api.mdc)
{**/api/**/*.dart,**/*_api.dart,**/client/*.dart}: Stream Feeds API integration should be implemented according to the Activity Streams specification with structured actor, verb, object, and target fields
Implement proper authentication using API keys and user tokens via the StreamFeedsClient with tokenProvider parameter
Implement structured error handling for Stream Feeds API responses including 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests, and 500 Internal Server Error status codes
Use batch operations for bulk activity creation and updates to optimize API performance
Implement WebSocket event handlers for real-time Stream Feeds updates including activity events, reaction events, follow events, and member events
Respect API rate limiting by implementing retry logic with retry-after headers and designing applications to handle rate limit responses gracefully
Implement circuit breaker pattern for automatic failure recovery in Stream Feeds API interactions
Use connection pooling and gzip compression for efficient HTTP connection management and reduced bandwidth when communicating with Stream Feeds API
Files:
packages/stream_feeds/test/client/moderation_client_test.dart
packages/stream_feeds/test/**/*.dart
📄 CodeRabbit inference engine (AGENTS.md)
packages/stream_feeds/test/**/*.dart: Test through public APIs only, not internal StateNotifier implementations
Use HTTP interceptors instead of mocking repositories in tests
Mirror thelib/structure intest/directory organization
Files:
packages/stream_feeds/test/client/moderation_client_test.dart
🧠 Learnings (12)
📚 Learning: 2025-12-05T14:37:17.519Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-api.mdc:0-0
Timestamp: 2025-12-05T14:37:17.519Z
Learning: Applies to {**/api/**/*.dart,**/*_api.dart,**/client/*.dart} : Stream Feeds API integration should be implemented according to the Activity Streams specification with structured actor, verb, object, and target fields
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Request naming convention: Use `*Request` suffix for request classes (e.g., `FeedAddActivityRequest`)
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:37:17.519Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-api.mdc:0-0
Timestamp: 2025-12-05T14:37:17.519Z
Learning: Applies to {**/api/**/*.dart,**/*_api.dart,**/client/*.dart} : Implement structured error handling for Stream Feeds API responses including 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests, and 500 Internal Server Error status codes
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/stream_feeds.dart : Keep public API minimal - most code should be in `lib/src/` internal directory
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/stream_feeds.dart : Follow Effective Dart documentation guidelines for all public APIs
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/stream_feeds.dart : Include examples for complex APIs in documentation
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Model naming convention: Use `*Data` suffix for model classes (e.g., `ActivityData`, `FeedData`)
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/test/**/*.dart : Use HTTP interceptors instead of mocking repositories in tests
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dartpackages/stream_feeds/test/client/moderation_client_test.dart
📚 Learning: 2025-12-05T14:37:17.519Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: .cursor/rules/stream-feeds-api.mdc:0-0
Timestamp: 2025-12-05T14:37:17.519Z
Learning: Applies to {**/api/**/*.dart,**/*_api.dart,**/client/*.dart} : Use batch operations for bulk activity creation and updates to optimize API performance
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/lib/src/models/**/*.dart : Query naming convention: Use `*Query` suffix for query classes (e.g., `ActivitiesQuery`, `FeedsQuery`)
Applied to files:
packages/stream_feeds_test/lib/src/helpers/test_data.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/test/**/*.dart : Test through public APIs only, not internal StateNotifier implementations
Applied to files:
packages/stream_feeds/test/client/moderation_client_test.dart
📚 Learning: 2025-12-05T14:38:02.662Z
Learnt from: CR
Repo: GetStream/stream-feeds-flutter PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-05T14:38:02.662Z
Learning: Applies to packages/stream_feeds/test/**/*.dart : Mirror the `lib/` structure in `test/` directory organization
Applied to files:
packages/stream_feeds/test/client/moderation_client_test.dart
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: analyze
- GitHub Check: build
- GitHub Check: stream_feeds
🔇 Additional comments (2)
packages/stream_feeds_test/lib/src/helpers/test_data.dart (1)
259-259: LGTM! Backward-compatible test helper updates.The
activityCountparameter additions to both feed response helpers are backward-compatible with sensible defaults, properly propagated to the response constructors, and align with the PR objective to add activity count tracking.Also applies to: 275-275, 820-820, 834-834
packages/stream_feeds/test/client/moderation_client_test.dart (1)
285-433: Comprehensive appeal operation test coverage.The three new test groups (
appeal,getAppeal,queryAppeals) provide thorough coverage of the new moderation appeal features. Each group:
- Properly registers fallback values for request types
- Tests both success and failure scenarios
- Follows the established testing patterns used throughout the file
- Correctly mocks and verifies API calls through the public client interface
Note
Batch follow and unfollow methods and events will be added in a separate PR.
Description of the pull request
appeal,getAppeal,queryAppeals) and related data models (AppealRequest,AppealResponse, etc.).SubmitActionRequestandSubmitActionResponseto include appeal-related fields and actions.OwnCapabilitiesBatchtoOwnBatchand updateCapabilitiesRepositoryto use the more generalownBatchendpoint.getOrCreateFollows,getOrCreateUnfollows).FeedResponseandFeedSuggestionResponsewithactivityCountandownFollowings.UpdateFeedRequest,UpdateActivityRequest, andUpdateCommentRequestwith additional configuration fields likedescription,mentionedUserIds, andattachments.RuleBuilderConditionandTextRuleParameterswith new moderation filter options (e.g., semantic filters, user roles, and identical content counts).individualRecordingandrawRecordingsettings toCallSettingsResponse.super == otherchecks in generated Freezed files and update test helpers.Summary by CodeRabbit
New Features
Tests
Changelog
✏️ Tip: You can customize this high-level summary in your review settings.