feat(KNO-11394): initialize feed clients in compact mode by default#851
feat(KNO-11394): initialize feed clients in compact mode by default#851mattmikolay wants to merge 12 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: db04746 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
@cursor review |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #851 +/- ##
=======================================
Coverage 68.45% 68.45%
=======================================
Files 193 193
Lines 8061 8062 +1
Branches 1065 1065
=======================================
+ Hits 5518 5519 +1
Misses 2518 2518
Partials 25 25
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| } finally { | ||
| cleanup(); | ||
| } | ||
| }); |
There was a problem hiding this comment.
Duplicate test for default compact mode behavior
Low Severity
The test "sets mode query param to compact by default" is nearly identical to "fetches feed data successfully" (lines 516-560). Both create a feed with empty options and verify that fetch() sends { archived: "exclude", mode: "compact" } params. The only difference is the existing test also validates the response entries count.
| "@knocklabs/react-native": minor | ||
| --- | ||
|
|
||
| Initialize feeds in `"compact"` mode by default |
There was a problem hiding this comment.
Sounds like there may be a potential breakage if you upgrade without any code change?
There was a problem hiding this comment.
Correct. As per Chris’s comment here:
We'll need to mark this as a breaking change, which for us means a minor release (pre 1.0)



Description
This PR updates the feed client so that it supports a new option
mode, which can be set to either"compact"or"rich". When set to"compact", theactivitiesandtotal_activitiesfields will not be present on feed items returned via the API, and thedatafield will not include nested arrays and objects.By default,
modewill be set to"compact". Thus, these changes constitute a minor version bump.Note that neither
activitiesnortotal_activitiesare used by our in-app feed components out-of-the-box.Todos
Checklist
Screenshots or videos
https://www.loom.com/share/db52cdeee7ad4407b3dd6ea907e86ce9