This repository was archived by the owner on Aug 6, 2026. It is now read-only.
Repository navigation
feat(inbox): Gate Inbox preview behind inbox-gated-due-to-scale flag - #1960
Merged
Merged
Conversation
Show a teaser pane to large customers (gated via PostHog feature flag) while self-driving Inbox rolls out. The teaser invites the user to register interest, capturing an event that PostHog can use to track demand per org. Generated-By: PostHog Code Task-Id: 0aec9747-6100-4e9c-8948-e57a8babf58e
Twixes
marked this pull request as ready for review
April 30, 2026 18:45
Contributor
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
apps/code/src/renderer/features/inbox/components/InboxEmptyStates.tsx:136
**Ephemeral registered state allows duplicate analytics events**
`registered` is `useState(false)`, so it resets to `false` every time `GatedDueToScalePane` unmounts (i.e., every navigation away from and back to Inbox). A user can fire `INBOX_INTEREST_REGISTERED` on every visit. If you want to track unique registrations accurately, persist the flag to `localStorage` (or treat the analytics event as idempotent and deduplicate server-side).
### Issue 2 of 2
apps/code/src/renderer/features/inbox/components/InboxView.tsx:10
**Brief flash of `InboxSignalsTab` for gated customers**
`useFeatureFlag` initialises to `false` (its `defaultValue`) when PostHog flags haven't loaded yet (see `useFeatureFlag.ts` lines 8–9). Until the `onFeatureFlagsLoaded` callback fires, `isGatedDueToScale` is `false`, so gated customers briefly see `InboxSignalsTab` before the gate pane replaces it. If flags are reliably loaded before the Inbox is reachable this is a non-issue, but if there's any race at startup it's worth adding a loading guard or initialising with `null` and rendering a neutral state until the flag resolves.
Reviews (1): Last reviewed commit: "feat(inbox): gate Inbox preview behind i..." | Re-trigger Greptile |
Twixes
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Self-driving Inbox is still in preview, and we want to throttle who sees it in terms of large customers (let's say, >=$500 MRR). These folks should hit a teaser instead of the actual Inbo for now, with a simple way to register interest.
Changes
New PostHog boolean feature flag
inbox-gated-due-to-scale(created in PostHog via MCP server 🎉 targets theorganizationgroup withmrr≥ 500 at 100% rollout).For customers with this flag enabled, instead of
InboxSignalsTabcontents we renderGatedDueToScalePane.Clicking "Let me know when self-driving is available for my organization" fires a typed
Inbox interest registeredevent.Slack convo where @abhischekt helped out a lot with the gating logic here: https://posthog.slack.com/archives/C01MGUHFH6G/p1777552501110089
~@Twixes
Created with PostHog Code