diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index 4075b06bb7..6cd297d213 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -647,13 +647,6 @@ const _ProjectController = { } } - const hasPaidSubscription = isPaidSubscription(subscription) - const hasManuallyCollectedSubscription = - subscription?.collectionMethod === 'manual' - const assistantDisabled = user.aiErrorAssistant?.enabled === false // the assistant has been manually disabled by the user - const canUseErrorAssistant = - !hasManuallyCollectedSubscription && !assistantDisabled - let featureUsage = {} if (Features.hasFeature('saas')) { @@ -734,6 +727,15 @@ const _ProjectController = { fullFeatureSet = await UserGetter.promises.getUserFeatures(userId) } + const hasPaidSubscription = isPaidSubscription(subscription) + const hasManuallyCollectedSubscription = + subscription?.collectionMethod === 'manual' + const assistantDisabled = user.aiErrorAssistant?.enabled === false // the assistant has been manually disabled by the user + const canUseErrorAssistant = + (!hasManuallyCollectedSubscription || + fullFeatureSet?.aiErrorAssistant) && + !assistantDisabled + const customerIoEnabled = await SplitTestHandler.promises.hasUserBeenAssignedToVariant( req,