From 99ed6efd2a21af0367b804d997f028ed4ffe594f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:53:33 +0000 Subject: [PATCH 1/2] Initial plan From 1175d408af820b84195b2e60dc8bd93a989a11d3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Oct 2025 11:04:33 +0000 Subject: [PATCH 2/2] Add tooltips to license key actions and update documentation Co-authored-by: rishi-raj-jain <46300090+rishi-raj-jain@users.noreply.github.com> --- .../components/Benefit/LicenseKeysPage.tsx | 68 +++++++++++++------ docs/features/benefits/license-keys.mdx | 19 ++++++ 2 files changed, 67 insertions(+), 20 deletions(-) diff --git a/clients/apps/web/src/components/Benefit/LicenseKeysPage.tsx b/clients/apps/web/src/components/Benefit/LicenseKeysPage.tsx index 5b4d9ee697..1cd072ce46 100644 --- a/clients/apps/web/src/components/Benefit/LicenseKeysPage.tsx +++ b/clients/apps/web/src/components/Benefit/LicenseKeysPage.tsx @@ -25,6 +25,11 @@ import { TabsList, TabsTrigger, } from '@polar-sh/ui/components/atoms/Tabs' +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from '@polar-sh/ui/components/ui/tooltip' import { RowSelectionState } from '@tanstack/react-table' import { useRouter, useSearchParams } from 'next/navigation' import { useCallback, useState } from 'react' @@ -176,30 +181,53 @@ export const LicenseKeysPage = ({
{['disabled', 'revoked'].includes(selectedLicenseKey.status) && ( - + + + + + + Re-activate this license key to allow validation + + )} {selectedLicenseKey.status === 'granted' && ( - + + + + + + Temporarily deactivate this key. Can be re-enabled later. Use this + for pausing access without permanent revocation. + + )} {selectedLicenseKey.status === 'granted' && ( - + + + + + + Permanently revoke this key due to subscription cancellation or + policy violation. Can be re-enabled if needed. + + )}
diff --git a/docs/features/benefits/license-keys.mdx b/docs/features/benefits/license-keys.mdx index 7e81180c3e..1ca5e47ed8 100644 --- a/docs/features/benefits/license-keys.mdx +++ b/docs/features/benefits/license-keys.mdx @@ -52,6 +52,25 @@ Customers can: * See usage left (if applicable) * Deactivate activations (if enabled) +Manage License Keys +-------------------------- + +As an organization administrator, you can manage license keys from your Benefits dashboard. Each license key can have one of three statuses: + +### License Key Statuses + +* **Granted**: The license key is active and can be validated by the customer +* **Disabled**: The license key is temporarily deactivated. Use this when you need to pause a customer's access without permanently revoking it. The key can be re-enabled at any time. This is useful for: + * Temporary account suspensions + * Payment issues that may be resolved + * Testing and debugging scenarios +* **Revoked**: The license key is deactivated, typically due to subscription cancellation or policy violations. While technically it can be re-enabled, this status indicates a more permanent action tied to the benefit lifecycle. This is typically used when: + * A subscription or purchase is cancelled + * A refund is issued + * Terms of service violations occur + +Both **Disabled** and **Revoked** keys will fail validation, preventing customers from using the associated benefits. The key difference is the intent: Disable is for temporary pauses, while Revoke is for permanent or lifecycle-related deactivation. + Integrate API --------------------