Skip to content

Removed offer_redemptions fallback logic from admin#26687

Merged
mike182uk merged 1 commit intomainfrom
BER-3336
Mar 5, 2026
Merged

Removed offer_redemptions fallback logic from admin#26687
mike182uk merged 1 commit intomainfrom
BER-3336

Conversation

@mike182uk
Copy link
Copy Markdown
Member

closes https://linear.app/ghost/issue/BER-3336

The fallback to sub.offer was added as a transitional measure while core and admin could be out of sync during CD. Both are now fully deployed with offer_redemptions always populated, making the fallback dead code

closes https://linear.app/ghost/issue/BER-3336

The fallback to `sub.offer` was added as a transitional measure while
core and admin could be out of sync during CD. Both are now fully
deployed with `offer_redemptions` always populated, making the fallback
dead code
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ac3bc752-6e10-451c-91ac-5e794e4d5477

📥 Commits

Reviewing files that changed from the base of the PR and between d066dba and 1cd8435.

📒 Files selected for processing (3)
  • ghost/admin/app/components/member/subscription-detail-box.js
  • ghost/admin/app/components/members/filters/offers.js
  • ghost/admin/tests/unit/components/members/filters/offers-test.js

Walkthrough

This pull request refactors offer redemption handling in subscription and member filtering components. It removes the offerRedemptions getter from SubscriptionDetailBox and updates formattedOffers to directly access this.args.sub.offer_redemptions with an empty array fallback. The offers filter logic is simplified to use only offer_redemptions instead of falling back to sub.offer when unavailable. A corresponding test case is updated to expect an empty string when offer_redemptions is missing.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing the fallback logic related to offer_redemptions from the admin codebase.
Description check ✅ Passed The description is directly related to the changeset, explaining the context and rationale for removing the fallback logic that is no longer needed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BER-3336

Comment @coderabbitai help to get the list of available commands and usage tips.

@mike182uk mike182uk merged commit 2ac78d5 into main Mar 5, 2026
31 checks passed
@mike182uk mike182uk deleted the BER-3336 branch March 5, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants