[pull] main from tldraw:main#538
Merged
Merged
Conversation
…vered versions (#8791) For perpetual licenses, the calendar expiry date only gates access to future major and minor releases — it does not actually expire the license while the user is on a covered version. Previously, `daysSinceExpiry` was computed from the calendar expiry date for every license type, which caused the grace-period branch in `getLicenseState` to fire and log a misleading red console banner saying "Your tldraw license has expired" even though the editor was working exactly as licensed. This PR makes `daysSinceExpiry` reflect the *functional* expiry semantics: for perpetual licenses, it stays at `0` while `isPerpetualLicenseExpired` is `false`. The "expired for more than 30 days" path still fires once a perpetual customer upgrades to a version released outside their license coverage. | License type | Past calendar expiry, still covered | Past coverage / 30‑day grace | | --- | --- | --- | | Perpetual | `daysSinceExpiry = 0`, `'licensed'`, no console message (was: misleading "expired" banner) | unchanged: `'expired'` with the standard banner | | Annual | unchanged: grace-period warning, `'licensed'` | unchanged: `'expired'` with the standard banner | | Evaluation | unchanged | unchanged | ### Change type - [x] `bugfix` ### Test plan - [x] Unit tests Added a unit test in `LicenseManager.test.ts` covering a perpetual license whose calendar expiry is in the past but whose installed version is still within coverage — `daysSinceExpiry` is now `0` and no grace-period message is logged. ### Release notes - Perpetual licenses no longer show a misleading "license expired" console warning when the user is past their calendar expiry date but still on a version covered by the license. Made with [Cursor](https://cursor.com) Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )