:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(search): remove the command k persons-first-for-email flag (#123863)
Shy Alterc2dc4bd61171
diff --git a/frontend/src/lib/components/CommandKSearch/COMMAND_K_SEARCH_UX.md b/frontend/src/lib/components/CommandKSearch/COMMAND_K_SEARCH_UX.mdindex c8b7f35ae032..3bad6666e68f 100644--- a/frontend/src/lib/components/CommandKSearch/COMMAND_K_SEARCH_UX.md+++ b/frontend/src/lib/components/CommandKSearch/COMMAND_K_SEARCH_UX.md@@ -97,7 +97,7 @@ The input is always in exactly one mode, decided from the token under the cursor2. In-memory lists, filtered on every keystroke: **Data management**, **People**, **Health**, **Misc**, **Settings** (with a Dark mode / Light mode row for "dark", "light", "theme", "appearance"), **Create new**. For a search with words they keep only items that match every word with no typo. Products rank with the results instead.3. Remote lists that the file system does not hold: **Events**, **Properties**, **Workflows** (one unified search request), **Accounts** (behind the customer analytics flag), **Support tickets** (3+ characters or a ticket number).4. **Ask PostHog AI**.- 5. **Persons**, **Groups**. Person and group searches can take seconds, so they come last and nothing above them waits for them. The person search starts with the file system search, after 50 ms. In the test group of the `command-k-persons-first-for-email` experiment, a search that contains "@" waits for the person search and ranks the persons it finds with **Results**, so a person who matches every word comes first and weaker matches drop out. Persons that do not rank stay in **Persons** below.+ 5. **Persons**, **Groups**. Person and group searches can take seconds, so they usually come last. The person search starts with the file system search, after 50 ms. A search that contains "@" waits for the person search and ranks the persons it finds with **Results** / **Best matches**. A person who matches every word comes first. Persons that do not rank stay in **Persons** below, with no duplicates. Other searches do not wait for persons or groups.- With any filter (a chip, or a valid `key:value` still being typed), only **Results** and **Ask PostHog AI** show, because filters apply only to objects.- With an `is:` chip (not negated), **Results** holds a **View all <types>** row (`View all feature flags`) that opens the list page of that type. With no search text it is the first row; once you type a search it moves below the results. It shows only for types with a list page.diff --git a/frontend/src/lib/components/CommandKSearch/commandKSearchLogic.tsx b/frontend/src/lib/components/CommandKSearch/commandKSearchLogic.tsxindex 90ff21630110..96ac1238aa7d 100644--- a/frontend/src/lib/components/CommandKSearch/commandKSearchLogic.tsx+++ b/frontend/src/lib/components/CommandKSearch/commandKSearchLogic.tsx@@ -347,8 +347,7 @@ export interface commandKSearchLogicMeta {displayedQuery: {query: SectionsQuerystale: boolean- },- featureFlags: FeatureFlagsSet+ }) => CommandKSection[]selectableRows: (sections: CommandKSection[]) => CommandKRow[]highlightedRow: (selectableRows: CommandKRow[], highlightedKey: string | null) => CommandKRow | null@@ -698,23 +697,14 @@ export const commandKSearchLogic = kea<commandKSearchLogicType>([): { query: SectionsQuery; stale: boolean } => pickDisplayedQuery(current, shown, remote),],sections: [- (s) => [- s.mode,- s.cursorContext,- s.suggestionsSection,- s.localLists,- s.remote,- s.displayedQuery,- s.featureFlags,- ],+ (s) => [s.mode, s.cursorContext, s.suggestionsSection, s.localLists, s.remote, s.displayedQuery],(mode: CommandKMode,context: CursorContext,suggestions: CommandKSection | null,local: LocalLists,remote: RemoteSlots,- displayed: { query: SectionsQuery; stale: boolean },- featureFlags: FeatureFlagsSet+ displayed: { query: SectionsQuery; stale: boolean }): CommandKSection[] =>buildSections({mode,@@ -724,9 +714,7 @@ export const commandKSearchLogic = kea<commandKSearchLogicType>([remote,...displayed.query,stale: displayed.stale,- personsFirst:- !!displayed.query.remoteQueries.persons?.includes('@') &&- featureFlags[FEATURE_FLAGS.COMMAND_K_PERSONS_FIRST_FOR_EMAIL] === 'test',+ personsFirst: !!displayed.query.remoteQueries.persons?.includes('@'),}),],selectableRows: [diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsxindex 08fb3c99f0ca..ee48a06c7ea2 100644--- a/frontend/src/lib/constants.tsx+++ b/frontend/src/lib/constants.tsx@@ -284,7 +284,6 @@ export const FEATURE_FLAGS = {CODE_BADGE_SELF_DRIVING_LABEL: 'code-badge-self-driving-label', // owner: #team-self-driving, experiment: label the Code badge "Self-driving" and compare setup activationsCOHORT_INLINE_CALCULATION: 'inline-cohort-calculation', // owner: #team-analytics-platform, inlines fast dynamic cohort queries instead of using precomputed cohortpeople tableCOHORTS_TAXONOMIC_BASIC_LIST: 'cohorts-taxonomic-basic-list', // owner: @adamleith, picker sends ?basic=true to the cohorts list endpoint (trimmed payload: no query/groups/last_error_message/experiment_set; filters is kept)- COMMAND_K_PERSONS_FIRST_FOR_EMAIL: 'command-k-persons-first-for-email', // owner: @puemos #team-platform-ux multivariate=control,test, experiment: show Persons right below Results when a Command K search contains "@"CONDENSED_FILTER_BAR: 'condensed_filter_bar', // owner: @jordanm-posthog #team-web-analyticsCREATE_FORM_TOOL: 'phai-create-form-tool', // owner: @kappa90 #team-posthog-aiCRM_ITERATION_ONE: 'crm-iteration-one', // owner: @arthurdedeus #team-customer-analytics