Skip to content

: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.

fix: add Integrations section to search display name suffix logic (#57727)

Fernando Gomes0c6b424d3591
diff --git a/frontend/src/lib/components/Search/searchLogic.tsx b/frontend/src/lib/components/Search/searchLogic.tsx
index 4341565e167e..281f4c059aa8 100644
--- a/frontend/src/lib/components/Search/searchLogic.tsx
+++ b/frontend/src/lib/components/Search/searchLogic.tsx
@@ -9,6 +9,7 @@ import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { toSentenceCase } from 'lib/utils'
import { GroupQueryResult, mapGroupQueryResponse } from 'lib/utils/groups'
import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
+import { organizationIntegrationsLogic } from 'scenes/settings/organization/organizationIntegrationsLogic'
import { urls } from 'scenes/urls'
import { userLogic } from 'scenes/userLogic'
@@ -113,6 +114,8 @@ export const searchLogic = kea<searchLogicType>([
['recents as cachedRecents', 'recentsHasLoaded', 'sceneLogViewsByRef', 'sceneLogViewsHasLoaded'],
projectTreeDataLogic,
['shortcutData as cachedStarred', 'shortcutDataHasLoaded', 'groupItems as treeGroupItems'],
+ organizationIntegrationsLogic,
+ ['organizationIntegrations'],
],
})),
actions({
@@ -627,8 +630,8 @@ export const searchLogic = kea<searchLogicType>([
],
],
settingsItems: [
- (s) => [s.featureFlags],
- (featureFlags): SearchItem[] => {
+ (s) => [s.featureFlags, s.organizationIntegrations],
+ (featureFlags, organizationIntegrations): SearchItem[] => {
const items: SearchItem[] = []
const checkFlag = (flag: string): boolean => {
@@ -648,6 +651,14 @@ export const searchLogic = kea<searchLogicType>([
continue
}
+ // Mirror sidebar gating: only surface organization integrations when any exist
+ if (
+ section.id === 'organization-integrations' &&
+ (!organizationIntegrations || organizationIntegrations.length === 0)
+ ) {
+ continue
+ }
+
// Map environment sections to project level
const effectiveLevel = section.level === 'environment' ? 'project' : section.level
const effectiveSectionId = (
@@ -693,7 +704,7 @@ export const searchLogic = kea<searchLogicType>([
: toSentenceCase(section.id.replace(/[-]/g, ' '))
const displayNameSuffix =
- displayName === 'General' || displayName === 'Danger zone'
+ displayName === 'General' || displayName === 'Danger zone' || displayName === 'Integrations'
? ` (${toSentenceCase(effectiveLevel)})`
: ''