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.

feat(search): add your tickets to search (#116651)

posthog[bot]6b04b046a6ab
diff --git a/frontend/src/lib/components/Search/Search.tsx b/frontend/src/lib/components/Search/Search.tsx
index 84b508e995a8..27d5586d8bb5 100644
--- a/frontend/src/lib/components/Search/Search.tsx
+++ b/frontend/src/lib/components/Search/Search.tsx
@@ -430,6 +430,7 @@ function SearchRoot({
posthog.capture('command menu item selected', {
category: item.category,
item_type: item.itemType ?? null,
+ matched_search_keyword: item.matchedSearchKeyword ?? null,
result_position: position >= 0 ? position : null,
opened_in_new_tab: openInNewTab,
})
diff --git a/frontend/src/lib/components/Search/searchListsLogic.test.ts b/frontend/src/lib/components/Search/searchListsLogic.test.ts
index cc74393d982e..435f93220c41 100644
--- a/frontend/src/lib/components/Search/searchListsLogic.test.ts
+++ b/frontend/src/lib/components/Search/searchListsLogic.test.ts
@@ -1,10 +1,12 @@
import { FEATURE_FLAGS } from 'lib/constants'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { terminalDockLogic } from 'scenes/terminal/terminalDockLogic'
+import { urls } from 'scenes/urls'
import { initKeaTests } from '~/test/init'
import { searchListsLogic } from './searchListsLogic'
+import { filterSearchItems } from './utils'
describe('searchListsLogic', () => {
let logic: ReturnType<typeof searchListsLogic.build>
@@ -33,6 +35,12 @@ describe('searchListsLogic', () => {
expect(logic.values.productsItems.some((item) => item.id === 'product-Data warehouse')).toBe(visible)
})
+ it.each(['support', 'tickets', 'contact support', 'help'])('finds Your tickets when searching "%s"', (query) => {
+ const matches = filterSearchItems(logic.values.miscItems, query)
+
+ expect(matches.find((item) => item.id === 'misc-my-tickets')?.href).toBe(urls.myTickets())
+ })
+
it.each([false, true])('gates the command-menu terminal toggle when enabled=%s', (enabled) => {
logic.unmount()
logic = searchListsLogic({ commandPalette: true })
diff --git a/frontend/src/lib/components/Search/searchListsLogic.tsx b/frontend/src/lib/components/Search/searchListsLogic.tsx
index e5d5d96db744..9d493813e8be 100644
--- a/frontend/src/lib/components/Search/searchListsLogic.tsx
+++ b/frontend/src/lib/components/Search/searchListsLogic.tsx
@@ -1,7 +1,15 @@
import { MakeLogicType, actions, afterMount, connect, kea, key, path, props, reducers, selectors } from 'kea'
import { router } from 'kea-router'
-import { IconBell, IconClock, IconDownload, IconLeave, IconNotification, IconTerminal } from '@posthog/icons'
+import {
+ IconBell,
+ IconClock,
+ IconDownload,
+ IconLeave,
+ IconNotification,
+ IconSupport,
+ IconTerminal,
+} from '@posthog/icons'
import { FEATURE_FLAGS } from 'lib/constants'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
@@ -530,6 +538,27 @@ export const searchListsLogic = kea<searchListsLogicType>([
lastViewedAt: sceneLogViewsByRef['Subscriptions'] ?? null,
record: { type: 'subscriptions' },
},
+ // The user's own tickets with PostHog. The Support product holds tickets from their customers.
+ {
+ id: 'misc-my-tickets',
+ name: 'Your tickets',
+ displayName: 'Your tickets',
+ category: 'misc',
+ productCategory: 'PostHog support',
+ href: urls.myTickets(),
+ icon: <IconSupport />,
+ itemType: 'my_tickets',
+ searchKeywords: [
+ 'my tickets',
+ 'support tickets',
+ 'posthog support',
+ 'contact support',
+ 'support',
+ 'help',
+ ],
+ lastViewedAt: sceneLogViewsByRef['MyTickets'] ?? null,
+ record: { type: 'my_tickets' },
+ },
{
id: 'misc-logout',
name: 'Log out',