From e87488899a06883eaa40a9240543343282fa8c9f Mon Sep 17 00:00:00 2001 From: Antoine Clausse Date: Thu, 5 Mar 2026 15:23:21 +0100 Subject: [PATCH] [web] Add AI to plan features list (#31968) * Add tooltip next to "Overleaf AI" row * Add AI to features list * Fix tests * Revert changes which will be overwritten by https://github.com/overleaf/internal/pull/31993 * Add missing import (conflict with main) GitOrigin-RevId: ce236670bd63701a3976a3eb84dc695ee0e928b1 --- services/web/frontend/extracted-translations.json | 1 + services/web/locales/en.json | 2 ++ .../frontend/features/subscription/fixtures/plans.ts | 10 +++++++--- services/web/types/subscription/plan.ts | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 84bb71a7e7..37c38de041 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -2078,6 +2078,7 @@ "university_school": "", "unknown": "", "unknown_group": "", + "unlimited_ai_use": "", "unlimited_collaborators_per_project": "", "unlimited_collabs": "", "unlimited_document_history": "", diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 5294b97f4e..0072cbad48 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -1626,6 +1626,7 @@ "overall_theme": "Overall theme", "overleaf": "Overleaf", "overleaf_ai": "Overleaf AI", + "overleaf_ai_info": "Built-in AI tools that support writing, editing, and LaTeX workflows. Fair usage applies.", "overleaf_group_plans": "Overleaf group plans", "overleaf_history_system": "Overleaf History System", "overleaf_individual_plans": "Overleaf individual plans", @@ -2617,6 +2618,7 @@ "unknown": "Unknown", "unknown_group": "Unknown group", "unlimited": "Unlimited", + "unlimited_ai_use": "Unlimited AI use", "unlimited_collaborators_per_project": "Unlimited collaborators per project", "unlimited_collabs": "Unlimited collaborators", "unlimited_document_history": "Unlimited document history", diff --git a/services/web/test/frontend/features/subscription/fixtures/plans.ts b/services/web/test/frontend/features/subscription/fixtures/plans.ts index ea869b7cce..3fc9283241 100644 --- a/services/web/test/frontend/features/subscription/fixtures/plans.ts +++ b/services/web/test/frontend/features/subscription/fixtures/plans.ts @@ -1,8 +1,9 @@ -import { GroupPlans } from '../../../../../types/subscription/dashboard/group-plans' -import { Plan } from '../../../../../types/subscription/plan' +import { GroupPlans } from '@ol-types/subscription/dashboard/group-plans' +import { Features, Plan } from '@ol-types/subscription/plan' const features = { student: { + aiUsageQuota: 'unlimited', collaborators: 6, dropbox: true, versioning: true, @@ -19,6 +20,7 @@ const features = { symbolPalette: true, }, personal: { + aiUsageQuota: 'basic', collaborators: 1, dropbox: true, versioning: true, @@ -35,6 +37,7 @@ const features = { symbolPalette: true, }, collaborator: { + aiUsageQuota: 'unlimited', collaborators: 10, dropbox: true, versioning: true, @@ -51,6 +54,7 @@ const features = { symbolPalette: true, }, professional: { + aiUsageQuota: 'unlimited', collaborators: -1, dropbox: true, versioning: true, @@ -66,7 +70,7 @@ const features = { trackChanges: true, symbolPalette: true, }, -} +} satisfies Record const studentAccounts: Array = [ { diff --git a/services/web/types/subscription/plan.ts b/services/web/types/subscription/plan.ts index 4a2aa7c1f8..9beca6b5d0 100644 --- a/services/web/types/subscription/plan.ts +++ b/services/web/types/subscription/plan.ts @@ -1,6 +1,7 @@ import { StripeCurrencyCode } from './currency' -type Features = { +export type Features = { + aiUsageQuota: 'basic' | 'unlimited' collaborators: number compileGroup: string compileTimeout: number