Skip to content

Hide expiration label for auto-renewing subscribers#5329

Open
joashrajin wants to merge 3 commits into
mainfrom
fix/3323-monthly-subscriber-expiration-message
Open

Hide expiration label for auto-renewing subscribers#5329
joashrajin wants to merge 3 commits into
mainfrom
fix/3323-monthly-subscriber-expiration-message

Conversation

@joashrajin
Copy link
Copy Markdown
Contributor

Description

Fixes #3323

The profile and automotive screens gate the "Plus expires in X days" label only on whether the remaining duration is under 30 days, without checking whether the subscription is set to auto-renew. Monthly subscribers always have an expiry date within ~30 days of "now" (the next renewal), so the expiration label was being shown every single day of an active monthly subscription — leading users to believe their subscription had been cancelled.

This wires up the existing (but previously unused) Subscription.isExpiring property — !isAutoRenewing && expiryDate < now + 30 days — as the gate. The semantics match how AccountDetailsViewModel already distinguishes between "Next Payment" (auto-renewing) and "Plus expires on …" (cancelled) on the account details screen, so behavior is consistent across the two screens.

The fix applies uniformly to Google Play and Paddle (Web) subscribers — both populate isAutoRenewing from the same server autoRenewing boolean with no platform-specific branching.

Changes

  • ProfileViewModel.profileHeaderState: only set expiresIn when subscription.isExpiring == true.
  • AutomotiveSettingsFragment header state: same gate.

Testing Instructions

  1. Sign in as a monthly Plus subscriber whose subscription is actively auto-renewing.
  2. Open the profile screen.
    • Verify the "Plus expires in X days" label is not shown.
    • Verify the Plus badge / tier indicator still renders.
  3. Sign in as a yearly Plus subscriber more than 30 days from renewal.
    • Verify no expiration label.
  4. Sign in as a cancelled Plus subscriber whose access still has < 30 days remaining (e.g., test via a dev override of the subscription state if no live test account is available).
    • Verify "Plus expires in X days" is shown — this is the legitimate use of the label.
  5. Sign in as a Patron (any cycle) and repeat steps 1–4.
    • Verify the Patron variant of the label respects the same rules.
  6. Repeat step 1 in the Automotive build (./gradlew :automotive:installDebug) and open the settings screen.
    • Verify no expiration label for an auto-renewing monthly subscriber there either.

Screenshots or Screencast

To be added — repro on emulator with a monthly auto-renew test account.

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml (no string changes)
  • Any jetpack compose components I added or changed are covered by compose previews (no compose changes)
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics. (no analytics changes)

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

The profile and automotive headers gated the "Plus expires in X days"
label only on the remaining duration being under 30 days, with no check
for whether the subscription was set to auto-renew. Monthly subscribers
always have an expiry date within ~30 days of the current moment (the
next renewal), so the label was shown every day of an active monthly
subscription, leading users to believe their subscription had been
cancelled.

Use the existing `Subscription.isExpiring` property — `!isAutoRenewing &&
expiryDate < now + 30 days` — as the gate, matching how
`AccountDetailsViewModel` already distinguishes renewing vs cancelled
subscriptions when picking between "Next Payment" and "Plus expires on".

Fixes #3323
@joashrajin joashrajin requested a review from a team as a code owner May 22, 2026 05:26
@joashrajin joashrajin requested review from Copilot and sztomek and removed request for a team May 22, 2026 05:26
@dangermattic
Copy link
Copy Markdown
Collaborator

dangermattic commented May 22, 2026

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes misleading subscription messaging on the Profile and Automotive settings headers by only showing the “Plus expires in X days” label when a subscription is genuinely expiring (i.e., not auto-renewing and within the 30-day window), aligning behavior with the existing Account Details semantics.

Changes:

  • Gate expiresIn in ProfileViewModel on subscription.isExpiring.
  • Apply the same isExpiring gate to the Automotive settings header state.
  • Add a changelog entry describing the user-facing behavior change.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
modules/features/profile/src/main/java/au/com/shiftyjelly/pocketcasts/profile/ProfileViewModel.kt Stops showing the expiry label for active auto-renewing subscribers by gating expiresIn on Subscription.isExpiring.
automotive/src/main/java/au/com/shiftyjelly/pocketcasts/AutomotiveSettingsFragment.kt Applies the same isExpiring gating to the Automotive profile header so behavior matches the main app.
CHANGELOG.md Documents the user-visible fix in the 8.12 bug fixes section.

@joashrajin joashrajin added [Type] Bug Not functioning as intended. [Area] Subscriptions Plus or Patron issue labels May 22, 2026
@joashrajin
Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copy link
Copy Markdown
Contributor

Copilot AI commented May 22, 2026

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflict in ProfileViewModel.kt and created merge commit d8ac410c0 (keeping both isExpiring gating and the new isShareVisible field). I’m currently blocked from pushing it because branch protection rejects updates until the required danger/pr-check is satisfied.

Resolve conflict in ProfileViewModel.kt by keeping both the isExpiring
gating (from this branch) and the new isShareVisible field (from main).
@joashrajin joashrajin self-assigned this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Subscriptions Plus or Patron issue [Type] Bug Not functioning as intended.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expiration Date Message: Improve handling for monthly subscribers

4 participants