: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
feat(navigation): explain apps with descriptive tooltips (#104861)
Marius Andrad838f81facdf
diff --git a/docs/published/handbook/engineering/project-structure.md b/docs/published/handbook/engineering/project-structure.mdindex 9ff468d61352..8350a76840a2 100644--- a/docs/published/handbook/engineering/project-structure.md+++ b/docs/published/handbook/engineering/project-structure.md@@ -48,6 +48,8 @@ The PostHog web application, built with React and TypeScript. Uses [Kea](https:/- `src/toolbar` – Code for the [PostHog Toolbar](https://posthog.com/docs/user-guides/toolbar)The app-level Files scene lives in `src/scenes/project-files` and reuses the project tree from `src/layout/panel-layout/ProjectTree`.+The Apps sidebar shows descriptive tooltips with concrete examples in `navbar/tabs/NavAppTooltip.tsx`.+These reuse scene descriptions where available, with additional copy for the main apps and a fallback for custom group types.Open `/project/<project_id>/files` to browse the project, or add `?folder=Research` to start in a folder.Starred folders in the sidebar use the same "New..." menu and "Empty folder" state as project folders.With `simple-sidepanel` enabled, each user gets a public `Users/<name>` home folder in each project, starred on creation.diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 1d61833bdcce..aca401abfaba 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -3776,6 +3776,22 @@ snapshots:hash: v1.k794b7964.e6a7236cbaa1a5530b0852dcd8b96a5e5ede18d51fff382fd2fbc0ed38499629.keu2JbNJYulSkSEQ0u0Mf9BgTGq-AwusNFvYRVoWt9slayout-apps-and-files--search--light:hash: v1.k794b7964.a85d66153be5eac425203199a972841836cb4304db9e4fddae78fc2989e860f9.xOCcUQ4og59re2zFHEUSv6tDnAxW4f-nj9TBxlmXz3w+ layout-apps-app-tooltip--dark--dark:+ hash: v1.k794b7964.52ba01b050e579d7c600df08497a2dfab2dba9cf670553e032afce3819d6d00d.4TCn-X9vJ_FhNwb6WjhB2V_zEkQCnG4FoEE7hf6L9-o+ layout-apps-app-tooltip--dark--light:+ hash: v1.k794b7964.417a2d56a0422336f9efc43030a7cdae3f122cf78e3fbbad82601aef1cf74ad4.GzperVKz3nFp11HKgg_JzdNuxUVZJpmkcceN_uRXU90+ layout-apps-app-tooltip--group--dark:+ hash: v1.k794b7964.cc4132fcaed3783a4a3c47285151e300ab3eb34e33cea95baeb1bd3f78acb016.1SxBAHglfl3kz8BLVFa2e8sgiRNgxsTYJ6EjErp4ChY+ layout-apps-app-tooltip--group--light:+ hash: v1.k794b7964.895e59c1f4cdf1e389c481da36861b257ad57867f197f3b5959dfb458d506f97.tkjRKbDLufF5M3aFHU-Lk4AjZbply-wqhnEGQWdhoaA+ layout-apps-app-tooltip--replay--dark:+ hash: v1.k794b7964.b37017f4341e1d0ec831d9059b50e25057ffb2c3d9a5fdb8adceda44eb368056.93ynxBmYnvfumttTefVN_YVSKFD92ZGObDlmrclXSd0+ layout-apps-app-tooltip--replay--light:+ hash: v1.k794b7964.7a2dd15cd78019b2c965d3ba20ae56fde8d7f1a96f13b13f0f99def766e4d878.2f0BS7pHq8KUjj_xHcIwW_65ESpicQLBPih9GOLK6iQ+ layout-apps-app-tooltip--sql--dark:+ hash: v1.k794b7964.52ba01b050e579d7c600df08497a2dfab2dba9cf670553e032afce3819d6d00d.3aMN43n3xOgF5_2noQ0WET35p2S_eiSQc0RPE_fFmw0+ layout-apps-app-tooltip--sql--light:+ hash: v1.k794b7964.417a2d56a0422336f9efc43030a7cdae3f122cf78e3fbbad82601aef1cf74ad4.vJZOOKfKKvbdiUHLkKnQELItxF23-RSFz5zpD_ZTRPIlayout-flat-nav-browse--default--dark:hash: v1.k794b7964.5d1f1b535bb3492e1ecdfa3e1acac30e856bcacb109136cf4b88654a8fa2bfcb.N4pOX84PDiTGfw5A6cgk634GGZ5U2Z-1QQNM82ZTp8Ylayout-flat-nav-browse--default--light:diff --git a/frontend/src/layout/panel-layout/navbar/tabs/NavAppRow.tsx b/frontend/src/layout/panel-layout/navbar/tabs/NavAppRow.tsxindex b28c6f13514b..e52f658365b3 100644--- a/frontend/src/layout/panel-layout/navbar/tabs/NavAppRow.tsx+++ b/frontend/src/layout/panel-layout/navbar/tabs/NavAppRow.tsx@@ -6,6 +6,7 @@ import { LemonButton, LemonMenu, LemonTag } from '@posthog/lemon-ui'import { LemonMenuItems } from 'lib/lemon-ui/LemonMenu'import { Link } from 'lib/lemon-ui/Link'+import { Tooltip } from 'lib/lemon-ui/Tooltip'import { getProductAccessDisabledReason } from 'lib/utils/accessControlUtils'import { eventUsageLogic } from 'lib/utils/eventUsageLogic'import { removeProjectIdIfPresent } from 'lib/utils/kea-router'@@ -20,9 +21,9 @@ import { getCustomIcon } from '../../ProjectTree/customIconRegistry'import { ProductIconWrapper, iconForType } from '../../ProjectTree/defaultTree'import { projectTreeDataLogic } from '../../ProjectTree/projectTreeDataLogic'import { joinPath, splitPath } from '../../ProjectTree/utils'-import { sidebarToolMeta } from '../../sidebarToolMeta'import { appsItemName } from './appsCatalog'import { NavAppMenu } from './NavAppMenu'+import { NavAppTooltip } from './NavAppTooltip'export function NavAppRow({ item }: { item: FileSystemImport }): JSX.Element {const { pathname } = useValues(panelLayoutLogic)@@ -84,40 +85,40 @@ export function NavAppRow({ item }: { item: FileSystemImport }): JSX.Element {return (<div className="group/app-row relative flex items-center gap-px min-w-0">- <Link- to={disabledReason ? undefined : href}- disabledReason={disabledReason}- buttonProps={{- menuItem: true,- active,- disabled: !!disabledReason,- className:- 'flex-1 min-w-0 -outline-offset-2 group-hover/app-row:pr-7 group-focus-within/app-row:pr-7',- }}- data-attr="nav-apps-item"- tooltip={sidebarToolMeta(item).description || label}- tooltipPlacement="right"- onClick={() => {- reportNavItemClicked(item.path, 'tools')- resetPanelLayout(false)- }}- >- <span className="size-4 shrink-0">- {CustomIcon ? (- <ProductIconWrapper type={iconType} colorOverride={item.iconColor}>- <CustomIcon />- </ProductIconWrapper>- ) : (- iconForType(iconType, item.iconColor)+ <Tooltip title={disabledReason || <NavAppTooltip item={item} />} placement="right">+ <Link+ to={disabledReason ? undefined : href}+ disabledReason={disabledReason}+ buttonProps={{+ menuItem: true,+ active,+ disabled: !!disabledReason,+ className:+ 'flex-1 min-w-0 -outline-offset-2 group-hover/app-row:pr-7 group-focus-within/app-row:pr-7',+ }}+ data-attr="nav-apps-item"+ onClick={() => {+ reportNavItemClicked(item.path, 'tools')+ resetPanelLayout(false)+ }}+ >+ <span className="size-4 shrink-0">+ {CustomIcon ? (+ <ProductIconWrapper type={iconType} colorOverride={item.iconColor}>+ <CustomIcon />+ </ProductIconWrapper>+ ) : (+ iconForType(iconType, item.iconColor)+ )}+ </span>+ <span className="flex-1 truncate">{label}</span>+ {item.tags?.[0] && (+ <LemonTag type={item.tags[0] === 'alpha' ? 'completion' : 'warning'} size="small">+ {item.tags[0]}+ </LemonTag>)}- </span>- <span className="flex-1 truncate">{label}</span>- {item.tags?.[0] && (- <LemonTag type={item.tags[0] === 'alpha' ? 'completion' : 'warning'} size="small">- {item.tags[0]}- </LemonTag>- )}- </Link>+ </Link>+ </Tooltip><LemonMenu placement="right-start" items={menuItems}><LemonButtonsize="xsmall"diff --git a/frontend/src/layout/panel-layout/navbar/tabs/NavAppTooltip.stories.tsx b/frontend/src/layout/panel-layout/navbar/tabs/NavAppTooltip.stories.tsxnew file mode 100644index 000000000000..ba4eb3b09c95--- /dev/null+++ b/frontend/src/layout/panel-layout/navbar/tabs/NavAppTooltip.stories.tsx@@ -0,0 +1,21 @@+import type { Meta, StoryObj } from '@storybook/react'++import { NavAppTooltip } from './NavAppTooltip'++const meta: Meta<typeof NavAppTooltip> = {+ title: 'Layout/Apps/App tooltip',+ component: NavAppTooltip,+ decorators: [+ (Story) => (+ <div className="Tooltip bg-[var(--color-bg-surface-tooltip)] rounded p-2 w-fit">+ <Story />+ </div>+ ),+ ],+}+export default meta+type Story = StoryObj<typeof NavAppTooltip>+export const SQL: Story = { args: { item: { path: 'SQL editor', sceneKey: 'SQLEditor' } } }+export const Replay: Story = { args: { item: { path: 'Session replay', sceneKey: 'Replay' } } }+export const Group: Story = { args: { item: { path: 'Companies', iconType: 'group' } } }+export const Dark: Story = { ...SQL, globals: { theme: 'dark' } }diff --git a/frontend/src/layout/panel-layout/navbar/tabs/NavAppTooltip.tsx b/frontend/src/layout/panel-layout/navbar/tabs/NavAppTooltip.tsxnew file mode 100644index 000000000000..355df0754bea--- /dev/null+++ b/frontend/src/layout/panel-layout/navbar/tabs/NavAppTooltip.tsx@@ -0,0 +1,164 @@+import { FileSystemImport } from '~/queries/schema/schema-general'++import { sidebarToolMeta } from '../../sidebarToolMeta'+import { appsItemName } from './appsCatalog'++const descriptions: Record<string, string> = {+ Home: 'Pick up where you left off with the insights, dashboards, and activity that matter to your project.',+ Activity:+ 'Explore the events people send to your project. Inspect their properties to understand exactly what happened.',+ 'SQL editor':+ 'Ask questions that need more than a chart builder. Query your events and warehouse tables together, then turn the results into a table or visualization.',+ 'Product analytics':+ 'Find out how people discover, use, and return to your product. Explore trends, conversion funnels, retention, and the paths people take.',+ Dashboards:+ 'Bring related insights together in one place. Follow your key metrics over time and share the same view of progress with your team.',+ 'Session replay':+ 'Watch how people actually experience your product. Follow their clicks and navigation to understand the behavior behind a metric or bug report.',+ 'Feature flags':+ 'Choose who sees a feature without another deployment. Roll changes out gradually, target a specific group, or turn a feature off when something goes wrong.',+ Experiments:+ 'Compare product changes with a controlled test. Measure their effect on the metrics you care about before deciding what to ship.',+ 'Web analytics':+ 'Understand who visits your website, where they come from, and which pages lead to conversions. Start with traffic, then explore what drives it.',+ 'Error tracking':+ 'Turn exceptions into issues you can investigate. See who was affected and connect errors with the context you need to find the cause.',+ Surveys:+ 'Ask people about their experience while it is still fresh. Collect feedback in your product and use it to explain what your analytics cannot.',+ Heatmaps:+ 'See where people click and how far they scroll. Spot overlooked calls to action and places where a page loses attention.',+ Notebooks:+ 'Keep an investigation together with notes, insights, and recordings. Give your team the evidence and context behind your conclusions.',+ 'LLM analytics':+ 'Follow your AI application from prompts to responses. Inspect traces, latency, token usage, and cost to understand quality and performance.',+ Persons:+ 'Explore the people behind your events, including their properties and activity. Connect an individual experience with the patterns in your analytics.',+ Cohorts:+ 'Group people by what they do and who they are. Reuse those audiences in analysis, feature targeting, and experiments.',+ 'SQL variables':+ 'Define reusable values for SQL queries so you can change a shared parameter without editing every query.',+ 'Core events':+ 'Choose the events that signal meaningful use of your product. Give your team a shared starting point for understanding customer activity.',+ 'Revenue definitions':+ 'Tell PostHog which events represent revenue and where to find their amounts and currencies. Use consistent revenue measures across your analyses.',+ 'Property groups':+ 'Organize related properties into reusable groups. Make a large tracking schema easier to navigate and understand.',+ 'Event definitions':+ 'Explore the events captured in your project and document what they mean. Help your team choose the right events for an analysis.',+ 'Property definitions':+ 'Explore the properties attached to your events and people. Document their meaning so everyone interprets the same data consistently.',+ 'Managed viewsets':+ 'Set up collections of warehouse views built for a particular kind of analysis. Reuse prepared data models instead of starting each query from scratch.',+ 'Event ingestion warnings':+ 'Find problems encountered while processing your events. Inspect the warnings to identify tracking issues and improve the data you analyze.',+ Annotations:+ 'Add context to changes in your metrics. Mark releases, campaigns, and other milestones so your team can connect a chart with what happened.',+ Sources:+ 'Bring data from your other tools into PostHog. Combine it with product events to answer questions that span your business.',+ Destinations:+ 'Send events from PostHog to the tools that need them. Connect product activity with the rest of your workflows.',+ Transformations:+ 'Reshape incoming events before they reach your analyses. Keep event names and properties consistent across your tracking.',+ Models: 'Turn SQL queries into reusable views and materialized views. Build on shared data models instead of repeating the same preparation in every analysis.',+}++const examples: Record<string, string> = {+ Home: 'Return to a dashboard you were investigating yesterday.',+ Activity: 'Check which properties arrive with a signup event.',+ 'SQL editor': 'Join signup events with billing data to compare activation by plan.',+ 'Product analytics': 'Find the step where new users drop out of onboarding.',+ Dashboards: 'Keep activation, retention, and revenue on a weekly team dashboard.',+ 'Session replay': 'Watch a failed checkout to see what got in the way.',+ 'Feature flags': 'Try a new navigation with your team before rolling it out to everyone.',+ Experiments: 'Test whether a shorter signup flow improves activation.',+ 'Web analytics': 'Find which referral sources bring visitors who sign up.',+ 'Error tracking': 'Investigate an exception that appeared after a release.',+ Surveys: 'Ask people who abandon a flow what they were trying to do.',+ Heatmaps: 'Check whether visitors reach your pricing call to action.',+ Notebooks: 'Share a funnel drop-off alongside recordings that explain it.',+ 'LLM analytics': 'Find the model calls making an assistant slow or expensive.',+ Persons: 'Review a user’s recent events while investigating a support question.',+ Cohorts: 'Compare people who tried a feature with those who have not.',+ 'AI gateway': 'Compare model usage across projects through a shared API.',+ Apps: 'Build an internal Python dashboard using your project data.',+ Broadcasts: 'Send an announcement to a cohort of beta testers.',+ 'Business knowledge': 'Give your AI assistant context about how your business works.',+ Clusters: 'Discover common themes in conversations with your AI assistant.',+ 'Code review': 'Review automated findings on a pull request before it merges.',+ 'Customer analytics': 'Explore activity across the accounts that use your product.',+ 'Data catalog': 'Find the agreed definition of a metric before using it.',+ 'Data warehouse': 'Manage the shared data your team uses for analysis.',+ Datasets: 'Keep representative prompts and expected answers for testing.',+ 'Early access features': 'Let interested users opt into a public beta.',+ Endpoints: 'Serve a saved query to your application and track its usage.',+ 'Engineering analytics': 'Find workflows that slow down pull requests.',+ Evaluations: 'Check whether AI responses meet your quality criteria.',+ 'Identity matching': 'Review how identities connect across your data.',+ Inbox: 'Review a report about friction discovered in user sessions.',+ Links: 'Create a trackable link for a new campaign.',+ 'Live Debugger': 'Inspect the state of running code when a breakpoint fires.',+ Logs: 'Search application logs around the time an error occurred.',+ 'MCP analytics': 'See which tools AI users call and what they are trying to achieve.',+ 'MCP servers': 'Find a server that gives your agent the tools it needs.',+ 'Marketing analytics': 'Compare campaign performance alongside your product data.',+ Metrics: 'Investigate a change in application performance over time.',+ Playground: 'Try a revised prompt before using it in your application.',+ 'Product tours': 'Guide new users through their first useful action.',+ Prompts: 'Keep track of changes to the prompts your application uses.',+ Pulse: 'Follow what is happening across your project.',+ 'Replay vision': 'Explore patterns found in session recordings.',+ Skills: 'Share reusable instructions with the agents your team uses.',+ Support: 'Investigate and respond to a customer’s support request.',+ Taggers: 'Label AI generations so you can compare different kinds of requests.',+ Tasks: 'Ask an agent to investigate an issue and prepare a code change.',+ Toolbar: 'Inspect elements on your website while setting up tracking.',+ Tracing: 'Follow a slow request across services to find the bottleneck.',+ 'User research': 'Run a voice research campaign about a recent product experience.',+ 'Visual review': 'Review visual changes before they reach users.',+ 'Web scripts': 'Add a website tag without changing your application code.',+ Wizard: 'Review the code changes an agent prepares to set up PostHog.',+ Workflows: 'Send a follow-up when someone completes an onboarding step.',+ Actions: 'Combine related clicks into a single event for analysis.',+ Annotations: 'Mark a release date to help explain a change in a chart.',+ 'Core events': 'Define the events that represent meaningful product usage.',+ Destinations: 'Send captured events to another tool your team uses.',+ 'Event definitions': 'Check what an event means before adding it to an insight.',+ 'Event ingestion filtering': 'Filter unwanted events before they enter your project.',+ 'Event ingestion warnings': 'Investigate events that were not ingested as expected.',+ 'Managed migrations': 'Bring historical events into PostHog.',+ 'Managed viewsets': 'Set up a collection of warehouse views for analysis.',+ Models: 'Save a reusable query as a view for other analyses.',+ 'Property definitions': 'Check the meaning and format of an event property.',+ 'Property groups': 'Organize related properties so they are easier to find.',+ 'Revenue definitions': 'Choose the events and properties that represent revenue.',+ 'SQL variables': 'Reuse the same date boundary across several queries.',+ Sources: 'Connect billing or support data to your product analytics.',+ Transformations: 'Clean or reshape incoming data before you analyze it.',+ 'Warehouse destinations': 'Choose where a warehouse source sends its synced rows.',+ 'Warehouse properties': 'Add account attributes from a warehouse table to your groups.',+}++export function NavAppTooltip({ item }: { item: FileSystemImport }): JSX.Element {+ const description = descriptions[item.path] ?? sidebarToolMeta(item).description+ const example = examples[item.path]+ const isGroup = item.iconType === 'group' || item.iconType?.startsWith('group_') || item.type?.startsWith('group_')+ return (+ <div className="w-72 max-w-full p-1 text-left whitespace-normal">+ <div className="text-sm font-semibold mb-2">{appsItemName(item)}</div>+ <div className="text-xs leading-relaxed">+ {description ??+ (isGroup+ ? 'Explore the organizations, accounts, or other groups behind your events. Understand usage at the group level.'+ : `Explore ${appsItemName(item).toLowerCase()} in your project.`)}+ </div>+ {(example || isGroup) && (+ <div className="mt-3 border-t border-current/20 pt-2">+ <div className="text-xs font-semibold mb-1">For example</div>+ <div className="text-xs leading-relaxed text-secondary">+ {example ?? 'Compare activity across customer accounts.'}+ </div>+ </div>+ )}+ </div>+ )+}