Skip to content

Hide expiration label for auto-renewing subscribers#5263

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

Hide expiration label for auto-renewing subscribers#5263
joashrajin wants to merge 2 commits into
Automattic:mainfrom
joashrajin:fix/3323-monthly-subscriber-expiration-message

Conversation

@joashrajin
Copy link
Copy Markdown
Contributor

@joashrajin joashrajin commented Apr 30, 2026

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 Automattic#3323
Copilot AI review requested due to automatic review settings April 30, 2026 12:20
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

This PR fixes misleading “Plus expires in X days” messaging by only surfacing the expiration label when a subscription is actually expiring (i.e., cancelled/non–auto-renewing and within 30 days), aligning Profile and Automotive behavior with the account details screen’s renewal vs cancellation semantics.

Changes:

  • Gate ProfileHeaderState.expiresIn on subscription.isExpiring in ProfileViewModel.
  • 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 1 comment.

File Description
modules/features/profile/src/main/java/au/com/shiftyjelly/pocketcasts/profile/ProfileViewModel.kt Only provides expiresIn when the subscription is non–auto-renewing and within the “expiring soon” window.
automotive/src/main/java/au/com/shiftyjelly/pocketcasts/AutomotiveSettingsFragment.kt Mirrors the same isExpiring gating for the Automotive settings profile header.
CHANGELOG.md Documents the user-facing fix in release notes.

Comment thread CHANGELOG.md
Comment on lines +6 to +7
* Hide the "Plus expires in X days" label on the profile for auto-renewing subscribers
([#5263](https://github.com/Automattic/pocket-casts-android/pull/5263))
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

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

The changelog entry mentions hiding the expiration label "on the profile", but this PR also changes the Automotive settings header. Consider updating the wording to reflect all affected surfaces (e.g., profile and automotive) so release notes match the shipped behavior.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

@joashrajin joashrajin self-assigned this May 8, 2026
@joashrajin joashrajin marked this pull request as ready for review May 8, 2026 12:04
@joashrajin joashrajin requested a review from a team as a code owner May 8, 2026 12:04
@joashrajin joashrajin requested review from sztomek and removed request for a team May 8, 2026 12:04
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.

Expiration Date Message: Improve handling for monthly subscribers

2 participants