Skip to content

[PB-6545]: feature/cancellation trial flow#2022

Open
xabg2 wants to merge 7 commits into
masterfrom
feature/cancel-subscription-iteration
Open

[PB-6545]: feature/cancellation trial flow#2022
xabg2 wants to merge 7 commits into
masterfrom
feature/cancel-subscription-iteration

Conversation

@xabg2

@xabg2 xabg2 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

A new flow has been implemented that allows users with a subscription of less than one month to redeem a free month and receive an additional 30-day cancellation guarantee, enabling them to cancel their plan immediately.

We implemented a new modal that appears when a user tries to cancel their subscription during the first month.

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Additional Notes

@xabg2 xabg2 self-assigned this Jul 6, 2026
@xabg2 xabg2 added the enhancement New feature or request label Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cd739b63-3adc-4b02-84f5-a39b86a23a8b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/cancel-subscription-iteration

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.

❤️ Share

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 6, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 64b2469
Status: ✅  Deploy successful!
Preview URL: https://d32b0763.drive-web.pages.dev
Branch Preview URL: https://feature-cancel-subscription.drive-web.pages.dev

View logs

@xabg2 xabg2 marked this pull request as ready for review July 7, 2026 13:38
@xabg2 xabg2 requested review from CandelR and larryrider as code owners July 7, 2026 13:38
<div className="mt-5 flex justify-end">
<Button
className={'shadow-subtle-hard'}
className={'shadow-su0btle-hard'}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think that the 0 has slipped in

currentUsage,
cancellingSubscription,
cancelSubscription,
applyingTrial = false,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would use is, has, etc, as convention for boolean fields. The exception we usually make is if they mimic an HTML attribute, which is typically something like (disabled, active, etc.) which is typically found in components

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.

I agree, but as we were already using cancellingSubscription, I followed the same convention, although I really should have corrected it, my bad.

onCancelSuccess,
}: UseSubscriptionCancellationOptions): UseSubscriptionCancellationResult => {
const dispatch = useAppDispatch();
const [cancellingSubscription, setCancellingSubscription] = useState<boolean>(false);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same here about booleans

@xabg2

xabg2 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Hey @CandelR , I also fixed the date we display when redeeming the cancellation incentive. We should display the next billing day + 30 days, not + 30 days from today.

@xabg2 xabg2 requested a review from CandelR July 7, 2026 14:18
@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants