feat: Add get or create follow and unfollow endpoints and fix generate command#282
feat: Add get or create follow and unfollow endpoints and fix generate command#282naumoskajana wants to merge 2 commits into
Conversation
📝 WalkthroughWalkthroughThe PR switches OpenAPI generation to a prebuilt ChangesOpenAPI Build Automation
Feeds follow handling
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 `@packages/feeds-client/src/feeds-client/feeds-client.ts`:
- Around line 1173-1187: Missing tests for the new getOrCreateFollow method: add
integration tests that exercise FeedsClient.getOrCreateFollow by mocking or
using the test harness to call getOrCreateFollow with enriched and non-enriched
requests, assert that it delegates to the superclass (super.getOrCreateFollow)
and returns the response, and verify side effects by checking that
updateStateFromFollows is applied and checkIfOwnFieldsChanged was invoked for
both response.follow.source_feed and response.follow.target_feed when
request.enrich_own_fields is true; mirror the existing test patterns used for
follow and getOrCreateFollows (same setup, assertions on returned Follow object
and on client state reconciliation) to ensure coverage for getOrCreateFollow,
updateStateFromFollows, and checkIfOwnFieldsChanged.
🪄 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: 1461d0ad-3a74-4087-9209-052c7bc98da6
📒 Files selected for processing (1)
packages/feeds-client/src/feeds-client/feeds-client.ts
| rm -rf $OUTPUT_DIR | ||
|
|
||
| ( cd $CHAT_DIR ; make openapi ; go run ./cmd/chat-manager openapi generate-client --language ts --spec ./releases/v2/feeds-clientside-api.yaml --output $OUTPUT_DIR ) | ||
| ( cd $CHAT_DIR ; make openapi ; ./build/chat-manager openapi generate-client --language ts --spec ./releases/v2/feeds-clientside-api.yaml --output $OUTPUT_DIR ) |
There was a problem hiding this comment.
Is this change intended ?
There was a problem hiding this comment.
I think it is because the PR description says: "fix generate command"
There was a problem hiding this comment.
Probably chat repo had some structural change
There was a problem hiding this comment.
yes, chat repo has some changes, splitting the code by products (chat, feeds, moderation, video)
🎫 Ticket: https://linear.app/stream/issue/FEEDS-1497
📑 Docs: https://github.com/GetStream/docs-content/pull/
💡 Overview
📝 Implementation notes
Summary by CodeRabbit
New Features
Chores