Remove the pre-launch Pro gating - #1972
Conversation
Session Pro is launching, so the proAvailable feature flag is permanently on.
Rather than leave a dead always-true flag wrapping every call site, remove it
entirely: delete the flag (from defaultFeatureFlags and the flag type union)
and collapse every getFeatureFlag('proAvailable') / getIsProAvailableMemo()
consumer to unconditional Pro-available behaviour, dropping the dead pre-launch
branches and now-unused imports. Dev-only flags (useTestProBackend,
proGroupsAvailable, mock*) and the debug menu itself stay gated.
| }; | ||
| }, [proExpiredCTASetting]); | ||
|
|
||
| if (!proAvailable && !isDebugMode()) { |
There was a problem hiding this comment.
I would have kept this !isDebugMode() early return here, but I guess Claude removed it because it's already dealt with in higher component?
| window.inboxStore?.dispatch(sectionActions.resetRightOverlayMode()); | ||
|
|
||
| if (window.inboxStore) { | ||
| if (getFeatureFlag('proAvailable')) { |
There was a problem hiding this comment.
might be worth asking claude to clean up the doc too, at least in architecture.md there is a ref to proAvailable
| const isProAvailable = getIsProAvailableMemo(); | ||
| const isProCTA = useIsProCTAVariant(variant); | ||
| if (isProCTA && !isProAvailable) { | ||
| return () => null; | ||
| } |
There was a problem hiding this comment.
we need to keep that early return with
if (isProCTA) {
return () => null;
}
There was a problem hiding this comment.
Maybe I'm not understanding, but wouldn't that just always hide the Pro CTA?
There was a problem hiding this comment.
Maybe this logic was wrong before, and this should have been: if (!isProCTA || !isProAvailable) { return () => null; }, and so now should be drop+fix changed to: if (!isProCTA) { return () => null; }
| if (isProCTAVariant(variant) && !isProAvailable) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
And likewise here: should this have been if (!isProCTAVariant(variant) || !isProAvailable), so so now should drop + fix to:
if (isProCTAVariant(variant)) {
showSessionCTA(variant, dispatch);
}
The next release off the dev branch will be Pro-enabled (if we need another intermediate release we'll branch off stable): this removes all the Pro gating code so that dev builds are now always Pro enabled.