diff --git a/services/web/app/src/Features/Subscription/SubscriptionController.js b/services/web/app/src/Features/Subscription/SubscriptionController.js index be2f409b86..d0025c460b 100644 --- a/services/web/app/src/Features/Subscription/SubscriptionController.js +++ b/services/web/app/src/Features/Subscription/SubscriptionController.js @@ -379,6 +379,12 @@ async function previewAddonPurchase(req, res) { paymentMethod ) + await SplitTestHandler.promises.getAssignment( + req, + res, + 'overleaf-assist-bundle' + ) + res.render('subscriptions/preview-change', { changePreview, purchaseReferrer, diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index bb5d208f12..6c5af98c38 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -74,6 +74,8 @@ "add_company_details": "", "add_email_address": "", "add_email_to_claim_features": "", + "add_error_assist_annual_to_your_projects": "", + "add_error_assist_to_your_projects": "", "add_files": "", "add_more_collaborators": "", "add_more_licenses_to_my_plan": "", diff --git a/services/web/frontend/js/features/subscription/components/preview-subscription-change/root.tsx b/services/web/frontend/js/features/subscription/components/preview-subscription-change/root.tsx index 705af73e27..367a5e35a9 100644 --- a/services/web/frontend/js/features/subscription/components/preview-subscription-change/root.tsx +++ b/services/web/frontend/js/features/subscription/components/preview-subscription-change/root.tsx @@ -20,6 +20,7 @@ import OLButton from '@/features/ui/components/ol/ol-button' import { subscriptionUpdateUrl } from '@/features/subscription/data/subscription-url' import * as eventTracking from '@/infrastructure/event-tracking' import sparkleText from '@/shared/svgs/ai-sparkle-text.svg' +import { useFeatureFlag } from '@/shared/context/split-test-context' function PreviewSubscriptionChange() { const preview = getMeta( @@ -29,6 +30,7 @@ function PreviewSubscriptionChange() { const { t } = useTranslation() const payNowTask = useAsync() const location = useLocation() + const aiAssistEnabled = useFeatureFlag('overleaf-assist-bundle') useEffect(() => { if (preview.change.type === 'add-on-purchase') { @@ -107,20 +109,37 @@ function PreviewSubscriptionChange() { {aiAddOnChange && (