Cleanup AiErrorAssistant todos post plans changes (#35067)

* feat: cleaning up ai quota leftovers

fix: removing more straggler invos

* fix: featureUpdater still need analyticsId in the user projection

* feat: updating cypress tests to also check for fair usage text

GitOrigin-RevId: 09c1167106c144084c111beea56867f6aa4a0906
This commit is contained in:
Jimmy Domagala-Tang
2026-09-17 11:41:10 +00:00
committed by Copybot
parent 275d381656
commit ba76fda37b
19 changed files with 40 additions and 91 deletions
@@ -34,12 +34,7 @@ export const UserFeaturesProvider: FC<React.PropsWithChildren> = ({
useEffect(() => {
const listener = async ({ isPremium }: { isPremium: boolean }) => {
// todo: quota clean-up: remove once we are transitioned off aiErrorAssistant naming
const hasPremiumQuota = hasUnlimitedAi
const alreadyPremium =
features?.aiErrorAssistant === isPremium ||
hasPremiumQuota === isPremium
if (alreadyPremium) {
if (hasUnlimitedAi === isPremium) {
// the user is premium on writefull and has the AI assist, no need to refresh the features
return
}
@@ -55,7 +50,7 @@ export const UserFeaturesProvider: FC<React.PropsWithChildren> = ({
listener
)
}
}, [features?.aiErrorAssistant, writefullInstance])
}, [writefullInstance])
return (
<UserFeaturesContext.Provider value={features}>