vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

GLVSC-593: Check expiration of paid accounts offline

Open sergiolms opened this issue 1 year ago • 5 comments

Description

Paid licenses can expire while offline, so with this PR we introduce some checks and a new Paid expired state to users that own an expired license, so we can customize messages and promotions for them if we want to.

Adding @justinrobots as CC to this PR because I'd like him to review the messages I set in case we want to change them or if I made a typo. 😄

Here's a screenshot of how it would look like for users that have a pro/enterprise account that has expired: Captura de pantalla 2024-09-06 a las 11 12 01

Checklist

  • [x] I have followed the guidelines in the Contributing document
  • [x] My changes follow the coding style of this project
  • [x] My changes build without any errors or warnings
  • [x] My changes have been formatted and linted
  • [x] My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • [x] My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • [x] My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

sergiolms avatar Sep 06 '24 11:09 sergiolms

Heads-up: Just noticed after talking with @eamodio that we're currently filtering out expired paid licenses during the check-in computations: https://github.com/gitkraken/vscode-gitlens/blob/main/src/plus/gk/checkin.ts#L69-L71

This might mean that those paid licenses with expired date never make it into someone's license data, which means they would never enter the new state being set up here.

We might need to update those computations:

  1. If the best license available is an expired paid license, we should probably let it through so that we can recognize this "expired paid" state rather than defaulting to "free", which may offer options like "start trial" that the user isn't eligible for yet.
  2. But we should be careful not to have the paid, expired license data replace the trial data, in case someone does reactivate trial with an expired license: https://github.com/gitkraken/vscode-gitlens/blob/main/src/plus/gk/checkin.ts#L179-L181

axosoft-ramint avatar Sep 17 '24 19:09 axosoft-ramint

Heads-up: Just noticed after talking with @eamodio that we're currently filtering out expired paid licenses during the check-in computations: https://github.com/gitkraken/vscode-gitlens/blob/main/src/plus/gk/checkin.ts#L69-L71

This might mean that those paid licenses with expired date never make it into someone's license data, which means they would never enter the new state being set up here.

That's right, they get filtered out when you log in. My changes only apply if you were already logged in and while offline your account expires.

We might need to update those computations:

  1. If the best license available is an expired paid license, we should probably let it through so that we can recognize this "expired paid" state rather than defaulting to "free", which may offer options like "start trial" that the user isn't eligible for yet.
  2. But we should be careful not to have the paid, expired license data replace the trial data, in case someone does reactivate trial with an expired license: https://github.com/gitkraken/vscode-gitlens/blob/main/src/plus/gk/checkin.ts#L179-L181

Gotcha, so instead of filtering out now we will take it into account and only replace the effective license if the actual license isn't a paid expired.

Good catch

sergiolms avatar Sep 18 '24 08:09 sergiolms

Going to give this one more review/test pass today and we can merge if it looks good.

axosoft-ramint avatar Oct 15 '24 14:10 axosoft-ramint

When I am in the "expired paid" state, the account view is confusing:

image

There is no indication here that my license is expired. Furthermore, it provides links to sign in/sign up, when it should be asking me to renew my license.

Any chance you can take a pass at the content here for this state?

axosoft-ramint avatar Oct 16 '24 21:10 axosoft-ramint

Let's pause on this PR until after the 16.0 release, so we can spend more time and focus on the priority 16.0 items. Going to bump this back to draft in the meantime.

d13 avatar Oct 16 '24 23:10 d13