[web] Cleanup plans-2026-phase-1 - phase 1: frontend (#34619)

* Remove `plans-2026-phase-1` from frontend in subscriptions module

* Remove `plans-2026-phase-1` from general frontend

* Remove empty `AiErrorAssistantPaywall`

* Simplify `UpgradeNotification`

* Update translations

* Fix tests

* Remove `OverleafAssistPaywall`

* Remove unused locales

GitOrigin-RevId: 4cf04bbde134a3f7b778a0695d388f31d9765343
This commit is contained in:
Antoine Clausse
2026-06-18 08:06:01 +00:00
committed by Copybot
parent fb9ebfcc10
commit 0d004926e6
28 changed files with 20 additions and 170 deletions
@@ -6,7 +6,6 @@ import { useUserFeaturesContext } from '@/shared/context/user-features-context'
import { useEditorAnalytics } from '@/shared/hooks/use-editor-analytics'
import { useTranslation } from 'react-i18next'
import { formatSecondsToHoursAndMinutes } from '@/shared/utils/time'
import { useFeatureFlag } from '@/shared/context/split-test-context'
import getMeta from '@/utils/meta'
const hasUnlimitedAi = getMeta('ol-hasUnlimitedAi')
@@ -33,9 +32,7 @@ function AiPaywallNotification({
premiumSuggestionResetDate,
} = useEditorContext()
const { t } = useTranslation()
const features = useUserFeaturesContext()
const inQuotaRollout = useFeatureFlag('plans-2026-phase-1')
const user = getMeta('ol-user')
const isCommons = user.hasInstitutionLicence
@@ -77,34 +74,6 @@ function AiPaywallNotification({
return null
}
// if not in rollout, use old paywalls for free users
if (!inQuotaRollout && !hasAddOn) {
return null
}
if (!inQuotaRollout) {
// if not in rollout, we can still use our fair usage messages
const chattingMessage = t(
'youve_reached_the_fair_usage_limit_on_your_plan_you_can_start_chatting_again_in_time',
{
time: formatSecondsToHoursAndMinutes(t, secondsTillReset),
}
)
const assistMessage = t('youve_reached_the_fair_usage')
return (
<Notification
type="info"
title={t('usage_limit_reached')}
content={
featureLocation === 'workbench' ? chattingMessage : assistMessage
}
isDismissible={false}
customIcon={null}
className="ai-paywall-notification"
/>
)
}
if (hasAddOn) {
return (
<FairUseLimit
@@ -2,7 +2,6 @@ import MaterialIcon from '@/shared/components/material-icon'
import { useTranslation } from 'react-i18next'
import { memo } from 'react'
import classNames from 'classnames'
import { useFeatureFlag } from '@/shared/context/split-test-context'
function Check() {
return <MaterialIcon type="check" />
@@ -10,14 +9,13 @@ function Check() {
function UpgradeBenefits({ className }: { className?: string }) {
const { t } = useTranslation()
const plans2026 = useFeatureFlag('plans-2026-phase-1')
return (
<ul className={classNames('list-unstyled upgrade-benefits', className)}>
<li>
<Check />
&nbsp;
{plans2026 ? t('higher_ai_allowance') : t('unlimited_projects')}
{t('higher_ai_allowance')}
</li>
<li>
<Check />