Skip to content

Add license leeway - #485

Merged
SailReal merged 2 commits into
developfrom
feature/add-license-leeway
Jul 28, 2026
Merged

Add license leeway#485
SailReal merged 2 commits into
developfrom
feature/add-license-leeway

Conversation

@SailReal

Copy link
Copy Markdown
Member

We still have this banner, in case the licence finally expires

2026-07-28_08-53

but a grace period was added

2026-07-28_08-52

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 83f12547-d8e1-4d15-ade9-e228bdecb493

📥 Commits

Reviewing files that changed from the base of the PR and between 85f53a9 and 33e23e9.

📒 Files selected for processing (8)
  • backend/src/main/java/org/cryptomator/hub/api/LicenseResource.java
  • backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java
  • backend/src/test/java/org/cryptomator/hub/api/LicenseResourceTest.java
  • backend/src/test/java/org/cryptomator/hub/license/LicenseHolderTest.java
  • frontend/src/common/backend.ts
  • frontend/src/components/LicenseAlert.vue
  • frontend/src/i18n/en-US.json
  • frontend/test/common/backend.spec.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • frontend/src/i18n/en-US.json
  • backend/src/test/java/org/cryptomator/hub/license/LicenseHolderTest.java
  • backend/src/test/java/org/cryptomator/hub/api/LicenseResourceTest.java
  • backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java

Walkthrough

The change adds a nine-day license expiration grace period. Backend license responses now include expiration and grace-period-end timestamps. Frontend license status logic distinguishes active, grace-period, expired, and seat-limit violation states. Vault views display updated ContentBanner alerts and renewal messaging, with backend and frontend tests covering the new behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: infeo, overheadhunter

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly matches the main change: adding license leeway via a grace period.
Description check ✅ Passed The description is related to the changeset and accurately mentions the new grace period and existing expired-license banner.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-license-leeway

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java`:
- Around line 317-327: Update LicenseHolder.getLeewayEndsAt() to return null
when no expiration exists, while preserving the current leeway calculation for
expiring licenses. Update isExpired() to return false for non-expiring licenses,
and add test coverage validating both behaviors.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b1f6ecf5-3fed-4a45-9138-9b9610a417d7

📥 Commits

Reviewing files that changed from the base of the PR and between 1c1e9db and 85f53a9.

📒 Files selected for processing (12)
  • CHANGELOG.md
  • backend/src/main/java/org/cryptomator/hub/api/LicenseResource.java
  • backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java
  • backend/src/test/java/org/cryptomator/hub/api/LicenseResourceTest.java
  • backend/src/test/java/org/cryptomator/hub/license/LicenseHolderTest.java
  • frontend/src/common/backend.ts
  • frontend/src/components/LicenseAlert.vue
  • frontend/src/components/VaultDetails.vue
  • frontend/src/components/VaultList.vue
  • frontend/src/components/emergencyaccess/EmergencyAccessVaultList.vue
  • frontend/src/i18n/en-US.json
  • frontend/test/common/backend.spec.ts

Comment thread backend/src/main/java/org/cryptomator/hub/license/LicenseHolder.java Outdated
@SailReal
SailReal requested a review from overheadhunter July 28, 2026 09:07
@SailReal SailReal added this to the 2.0.0 milestone Jul 28, 2026

@overheadhunter overheadhunter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mostly fine. A little api refinement in frontend.

Also, should we call this "leeway" (which suggests to be bidirectional, i.e. exp ± leeway)? Or rather something like grace period?

Comment thread frontend/src/common/backend.ts Outdated
@SailReal

Copy link
Copy Markdown
Member Author

Agree, renamed leeway to grace period in 33e23e9.

@SailReal
SailReal requested a review from overheadhunter July 28, 2026 10:56

@overheadhunter overheadhunter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, but please wait with merging until we talked about the duration.

@SailReal
SailReal merged commit 930f9d6 into develop Jul 28, 2026
9 checks passed
@SailReal
SailReal deleted the feature/add-license-leeway branch July 28, 2026 12:42
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.

2 participants