Filtered out retention offers from editor cards#26336
Conversation
fixes https://linear.app/ghost/issue/BER-1772 - Archived offers (status:archived) and retention offers (redemption_type:retention) were appearing in the CTA card link dropdown and other card link dropdowns in the editor - Updated the offer fetch filter to only include active signup offers (status:active+redemption_type:signup) - Added redemptionType attribute to Ember offer model to support the new filter - Retention offers are only meant to be triggered during member cancellation flows, not via offer links - This ensures only valid, usable offers appear in the link selection dropdown Co-authored-by: Peter Schulz <prschulz@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
WalkthroughThe codebase was changed to narrow offer filtering to active signup offers by adding 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 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 |
- Changed status back from 'active' | 'archived' to string - The restrictive type was causing compilation errors in add-offer-modal.tsx - The core fix (filtering offers in the editor) remains intact Co-authored-by: Peter Schulz <prschulz@users.noreply.github.com>
sagzy
left a comment
There was a problem hiding this comment.
Works as expected!
One change is unrelated to the fix, so I suggest removing it from the PR (I've tested that it works without)
Also: I cannot replicate the original bug where archived offers would be listed in the dropdown, with or without this PR. Code also already had the status:active filter in place. Therefore, I suggest to also update the PR description to be "Filtered out retention offers from editor cards", as this is what this fix is about
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.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on March 3
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26336 +/- ##
========================================
Coverage 72.85% 72.85%
========================================
Files 1560 1561 +1
Lines 120464 120704 +240
Branches 14522 14547 +25
========================================
+ Hits 87763 87941 +178
- Misses 31689 31751 +62
Partials 1012 1012
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ref https://linear.app/ghost/issue/BER-1772 - retention offers can only be retrieved during cancellation flows, therefore we don't want them to be listed as dropdown options in the editor cards (e.g. CTA card) --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Peter Schulz <prschulz@users.noreply.github.com> Co-authored-by: Sag <guptazy@gmail.com>
ref https://linear.app/ghost/issue/BER-1772 - retention offers can only be retrieved during cancellation flows, therefore we don't want them to be listed as dropdown options in the editor cards (e.g. CTA card) --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Peter Schulz <prschulz@users.noreply.github.com> Co-authored-by: Sag <guptazy@gmail.com>
ref https://linear.app/ghost/issue/BER-1772