Skip to content

fix(desktop-gpui): show no expiry date for lifetime licenses - #4302

Open
richiemcilroy wants to merge 5 commits into
mainfrom
fix/lifetime-license-no-expiry
Open

richiemcilroy wants to merge 5 commits into
mainfrom
fix/lifetime-license-no-expiry

Conversation

@richiemcilroy

@richiemcilroy richiemcilroy commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Lifetime desktop licenses showed "Expires 1/19/2038" in Settings > Plan & license. They now show no expiry; yearly licenses keep their date.

Lifetime, light Lifetime, dark Yearly
Before
After

Root cause

  • The license server has no "never" value for lifetime keys. It stores nextRenewalDate = new Date("2038-01-19 03:14:07") (the 32-bit time_t limit, parsed in the server's time zone) and /commercial/activate returns it as expiryDate.
  • render_license_active (apps/desktop-gpui/src/settings_pages.rs) formatted any expiryDate it got, so lifetime keys read as expiring in 2038. The Tauri app did the same.

Change

const LIFETIME_LICENSE_EXPIRY_MS: i64 = 2_147_483_647_000;
const LIFETIME_LICENSE_EXPIRY_TOLERANCE_MS: i64 = 24 * 60 * 60 * 1000;

fn license_expiry_label(expiry_ms: Option<f64>) -> Option<String>
  • license_expiry_label returns None within a day of the sentinel (covers every server time zone offset), so the existing "Expires" block is not rendered. Everything else formats exactly as before (%-m/%-d/%Y).
  • No new strings: the row is simply absent, like it already was for a license with no expiryDate.
  • Only caller is render_license_active. expiry_date is still stored unchanged in the store (general_settings.commercialLicense), so Tauri 0.6.0 and GPUI 0.6.1 to 0.6.3 stores keep working.

Tests

  • lifetime_license_has_no_expiry_label: the sentinel in UTC, UTC-8 and UTC+14.
  • yearly_license_keeps_its_expiry_label: None, a 2027 date, and a date three days before the sentinel all keep their label.

Proof

Build Steps Result
main debug, macOS 27 (Apple silicon) isolated store with a test lifetime key, open Settings > Plan & license "Expires 1/19/2038"
this branch, same machine same, light and dark no expiry row
this branch, same machine yearly test key (expiryDate 2027-11-16) "Expires 11/16/2027"
Linux, full cap-gpui suite main vs this branch same 2 hardware-enumeration failures on both, +2 new passing tests; clippy warning count unchanged

Only test keys and a local isolated store were used.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Hides the expiry row for lifetime desktop licenses without changing saved license data.

  • Lifetime licenses show no expiry date in GPUI settings.

Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@sandchest-com

sandchest-com Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Sandchest

Sandchest reviewed ebfcad6: nothing exploitable found in this change.

Sandchest reviews every change for vulnerabilities an attacker could use · Review details

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Capy found no issues.

Open in Capy

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Skipped Skipped Nov 17, 2026 1:04am UTC

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 17, 2026 00:04 Inactive
@vercel
vercel Bot temporarily deployed to Preview – cap-status November 17, 2026 00:36 Inactive
@vercel
vercel Bot temporarily deployed to Preview – cap-status November 17, 2026 01:04 Inactive

This branch was previously deployed

1 inactive deployment
Preview – cap-status — ebfcad6b Deployed Nov 17, 2026 by vercel[bot]
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.

1 participant