: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(engineering-analytics): add the authors tab with friction by author (#106446)
Julian Bezbef6f90f0aa0
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 15c44a4ecacb..e5df01395b35 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -8396,6 +8396,14 @@ snapshots:hash: v1.k794b7964.2912a039cef968631e879d37ceb383cd890aa58a309fe994e54048d32c03fea0.ignhhu_rS-LmWB_l7JsirYO_2D5bsWCZSX5FJr_VMIsscenes-app-engineering-analytics-author--author-without-reviews-or-deploys--light:hash: v1.k794b7964.3cf36ae2af60fafbf05aa99aa8d21b91acfcec55cbc9e68eb880c28bbbb5428e.4LKTJhufJZrTUSXzWSLpd4drYCzho0V1sd5IwbPH52U+ scenes-app-engineering-analytics-authors--author-friction--dark:+ hash: v1.k794b7964.88728c06ce00b8f11db949d90b27a1b2093f0cb8673c28a3bacc0b5ff9a56b5e.OhfSy6zVs-UDsLgYDEhzFETfYob5SWTgB7RTbEuDb_c+ scenes-app-engineering-analytics-authors--author-friction--light:+ hash: v1.k794b7964.eca39040c911e5915e0248649d8a301e9c9d279040f7ba8cb3b3c976d85d0c6b.HgkKTUfXLlpPr13D0Qvmewacq9avFmnPKohtIcUBT9s+ scenes-app-engineering-analytics-authors--author-friction-not-ready--dark:+ hash: v1.k794b7964.92889e0db2ca295765d91586d19fdd5183d8b6af425237baf4c5e6d0273b4949.q-FafIaHo1UO3RKISmWRKJWxEtw8-pgrKYWP4q9DoR8+ scenes-app-engineering-analytics-authors--author-friction-not-ready--light:+ hash: v1.k794b7964.0f7bab03614efa0a14f40334900064ed8f915efd5193e19b6c7845dd7e79bd87.0Xgyj3Z2Vl3_EpcL0OvpPt1TXIPBlCVD8WCSPJcl79oscenes-app-engineering-analytics-delivery-pipeline--all-stages--dark:hash: v1.k794b7964.e6fc5778d62714ed6fd4174b65c767a850d116b902223aa6f2086ce967edcaed.HoZOw65AQI9tW_L6CG_9JN6y7lmyhzy_Q1PQL__zCskscenes-app-engineering-analytics-delivery-pipeline--all-stages--light:diff --git a/frontend/src/products.tsx b/frontend/src/products.tsxindex 4833d372b39c..45bcd98772bf 100644--- a/frontend/src/products.tsx+++ b/frontend/src/products.tsx@@ -156,6 +156,7 @@ export const productRoutes: Record<string, [string, string]> = {'/engineering-analytics/workflows': ['EngineeringAnalytics', 'engineeringAnalyticsWorkflows'],'/engineering-analytics/tests': ['EngineeringAnalytics', 'engineeringAnalyticsTests'],'/engineering-analytics/teams': ['EngineeringAnalytics', 'engineeringAnalyticsTeams'],+ '/engineering-analytics/authors': ['EngineeringAnalytics', 'engineeringAnalyticsAuthors'],'/engineering-analytics/deploys': ['EngineeringAnalytics', 'engineeringAnalyticsDeploys'],'/engineering-analytics/teams/:ownerTeam': ['EngineeringAnalyticsTeam', 'engineeringAnalyticsTeam'],'/engineering-analytics/repos/:repoOwner/:repoName/pull-requests/:number': [@@ -441,7 +442,6 @@ export const productRedirects: Record<combineUrl(urls.engineeringAnalyticsTests(), searchParams, hashParams).url,'/engineering-analytics/health': (_params, searchParams, hashParams): string =>combineUrl(urls.engineeringAnalyticsDeploys(), searchParams, hashParams).url,- '/engineering-analytics/authors': '/engineering-analytics/overview','/error_tracking/:id/fingerprints': (params) =>combineUrl(`/error_tracking/${params.id}`, { manageFingerprints: 'true' }).url,'/error_tracking/configuration': (_params, searchParams, hashParams) =>@@ -1370,6 +1370,7 @@ export const productUrls = {engineeringAnalyticsWorkflows: (): string => '/engineering-analytics/workflows',engineeringAnalyticsTests: (): string => '/engineering-analytics/tests',engineeringAnalyticsTeams: (): string => '/engineering-analytics/teams',+ engineeringAnalyticsAuthors: (): string => '/engineering-analytics/authors',engineeringAnalyticsDeploys: (): string => '/engineering-analytics/deploys',engineeringAnalyticsTeam: (ownerTeam: string): string =>`/engineering-analytics/teams/${encodeURIComponent(ownerTeam)}`,diff --git a/products/engineering_analytics/frontend/AGENTS.md b/products/engineering_analytics/frontend/AGENTS.mdindex 5f37cf995855..46bfeb1c26d4 100644--- a/products/engineering_analytics/frontend/AGENTS.md+++ b/products/engineering_analytics/frontend/AGENTS.md@@ -11,7 +11,7 @@ UI grammar for every scene in this product. `frontend/src/AGENTS.md` and the rep## One comparison vocabulary per question- Window-vs-window comparison renders as `WindowComparisonCard` ("This window / Previous window" bars plus a `DeltaBadge`). Nothing else: no invented forms (a muted "was N" companion value was tried and removed), no `MetricTile` delta pills for windowed metrics.-- Scope-vs-repository comparison (an author or a team against the repository) renders as `ScopeComparisonCard` ("This author / Repo" bars on one scale). The question there is "is this friction unusual here", which a previous window can't answer. It never renders a ranked, sorted or scrollable list of authors by their figures. The standing extra baseline is the author's own team: the ready-to-merge card draws it as muted rows between the author and the repository, one row per team the comparison picked. Another author joins those rows only when the person asking named that author.+- Scope-vs-repository comparison (an author or a team against the repository) renders as `ScopeComparisonCard` ("This author / Repo" bars on one scale). The question there is "is this friction unusual here", which a previous window can't answer. It never renders a list of authors ordered by delivery performance. Friction is not performance (SPEC §2), so the Authors tab lists authors by friction. The standing extra baseline is the author's own team: the ready-to-merge card draws it as muted rows between the author and the repository, one row per team the comparison picked. Another author joins those rows only when the person asking named that author.- Table cells hold plain current values via `CountCell` (`components/CountCell.tsx`). Comparison never lives in a table cell.## Information altitudediff --git a/products/engineering_analytics/frontend/components/FrictionGroupBar.tsx b/products/engineering_analytics/frontend/components/FrictionGroupBar.tsxnew file mode 100644index 000000000000..b7c2d2140bd9--- /dev/null+++ b/products/engineering_analytics/frontend/components/FrictionGroupBar.tsx@@ -0,0 +1,49 @@+import { Tooltip } from '@posthog/lemon-ui'++import type { FrictionGroupShareApi } from '../generated/api.schemas'+import { timesTypical } from '../lib/format'+import { FRICTION_GROUP_COLORS, FRICTION_GROUP_LABELS, FRICTION_GROUP_ORDER } from '../lib/friction'++/** A friction score split by group, as one stacked bar. Its length is the score against ``max``. */+export function FrictionGroupBar({ groups, max }: { groups: FrictionGroupShareApi[]; max: number }): JSX.Element {+ const byGroup = new Map(groups.map((share) => [share.group, share.score]))+ const total = groups.reduce((sum, share) => sum + share.score, 0)+ const tooltip = (+ <div className="flex flex-col gap-0.5">+ {FRICTION_GROUP_ORDER.map((group) => (+ <div key={group} className="flex items-center gap-2">+ <span className={`size-2 rounded-sm ${FRICTION_GROUP_COLORS[group]}`} />+ <span className="flex-1">{FRICTION_GROUP_LABELS[group]}</span>+ <span className="tabular-nums">{timesTypical(byGroup.get(group) ?? 0)}</span>+ </div>+ ))}+ </div>+ )+ return (+ <Tooltip title={tooltip}>+ <div+ className="h-2 w-full rounded-sm bg-fill-secondary"+ tabIndex={0}+ aria-label={FRICTION_GROUP_ORDER.map(+ (group) => `${FRICTION_GROUP_LABELS[group]} ${timesTypical(byGroup.get(group) ?? 0)}`+ ).join(', ')}+ >+ <div+ className="flex h-full overflow-hidden rounded-sm"+ style={{ width: `${max > 0 ? (total / max) * 100 : 0}%` }}+ >+ {FRICTION_GROUP_ORDER.map((group) => {+ const score = byGroup.get(group) ?? 0+ return score > 0 ? (+ <div+ key={group}+ className={FRICTION_GROUP_COLORS[group]}+ style={{ width: `${(score / total) * 100}%` }}+ />+ ) : null+ })}+ </div>+ </div>+ </Tooltip>+ )+}diff --git a/products/engineering_analytics/frontend/lib/format.ts b/products/engineering_analytics/frontend/lib/format.tsindex cec4ffbb8de5..a1e493ef383a 100644--- a/products/engineering_analytics/frontend/lib/format.ts+++ b/products/engineering_analytics/frontend/lib/format.ts@@ -75,3 +75,11 @@ export function compactMinutes(minutes: number | null | undefined): string {export function percent(rate: number | null | undefined, precision: number = 0): string {return rate == null ? '—' : `${(rate * 100).toFixed(precision)}%`}++/** A friction score, as a multiple of the typical author or pull request: 1.0 is typical. */+export function timesTypical(score: number | null | undefined): string {+ if (score == null) {+ return '–'+ }+ return `${score.toFixed(1)}×`+}diff --git a/products/engineering_analytics/frontend/lib/friction.ts b/products/engineering_analytics/frontend/lib/friction.tsnew file mode 100644index 000000000000..f152e3e398c8--- /dev/null+++ b/products/engineering_analytics/frontend/lib/friction.ts@@ -0,0 +1,25 @@+import type { FrictionGroupEnumApi } from '../generated/api.schemas'++/** Friction groups in the order the bars stack them: the heaviest group weight first. */+export const FRICTION_GROUP_ORDER: FrictionGroupEnumApi[] = ['queue', 'review', 'ci', 'rework']++export const FRICTION_GROUP_LABELS: Record<FrictionGroupEnumApi, string> = {+ queue: 'Merge queue',+ review: 'Review',+ ci: 'CI',+ rework: 'Rework',+}++export const FRICTION_GROUP_DESCRIPTIONS: Record<FrictionGroupEnumApi, string> = {+ queue: 'time in the merge queue past 30 minutes, and kickouts',+ review: 'the wait for the first approval',+ ci: 'red CI by cause, re-runs that failed again, and CI time past 10 minutes per push',+ rework: 'own failures fixed by a push, extra pushes, and pushes after approval',+}++export const FRICTION_GROUP_COLORS: Record<FrictionGroupEnumApi, string> = {+ queue: 'bg-[var(--data-color-1)]',+ review: 'bg-[var(--data-color-2)]',+ ci: 'bg-[var(--data-color-3)]',+ rework: 'bg-[var(--data-color-4)]',+}diff --git a/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsAuthors.stories.tsx b/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsAuthors.stories.tsxnew file mode 100644index 000000000000..2880a125153b--- /dev/null+++ b/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsAuthors.stories.tsx@@ -0,0 +1,134 @@+import { Meta, StoryObj } from '@storybook/react'++import { FEATURE_FLAGS } from 'lib/constants'+import { App } from 'scenes/App'+import { urls } from 'scenes/urls'++import { mswDecorator } from '~/mocks/browser'++import type { AuthorFrictionApi, AuthorFrictionListApi, GitHubSourceApi } from '../generated/api.schemas'++const SOURCES: GitHubSourceApi[] = [{ id: 'src-1', repo: 'PostHog/posthog', prefix: '' }]++function author(+ name: string,+ rank: number,+ [queue, review, ci, rework]: [number, number, number, number],+ overrides: Partial<AuthorFrictionApi> = {}+): AuthorFrictionApi {+ return {+ author: name,+ avatar_url: '',+ score: queue + review + ci + rework,+ groups: [+ { group: 'queue', score: queue },+ { group: 'review', score: review },+ { group: 'ci', score: ci },+ { group: 'rework', score: rework },+ ],+ pr_count: 12,+ rank,+ rank_low: Math.max(1, rank - 2),+ rank_high: rank + 4,+ teams: ['team-replay'],+ ...overrides,+ }+}++const FRICTION: AuthorFrictionListApi = {+ available: true,+ window_days: 30,+ ranked_author_count: 6,+ github_team: null,+ has_membership_data: true,+ items: [+ author('jane-dev', 1, [1.4, 0.3, 0.6, 0.2], { pr_count: 18 }),+ author('sam-ops', 2, [0.9, 0.6, 0.3, 0.2], { teams: ['team-infra'] }),+ author('li-web', 3, [0.5, 0.5, 0.2, 0.1], { pr_count: 4, rank_low: 1, rank_high: 6 }),+ author('max-data', 4, [0.3, 0.2, 0.2, 0.1], { teams: ['team-infra'] }),+ author('ana-api', 5, [0.2, 0.2, 0.1, 0.1]),+ author('tom-ui', 6, [0.1, 0.1, 0.1, 0.1], { rank_low: 5 }),+ ],+ teams: [{ github_team: 'team-replay', median_score: 1.0, scored_author_count: 4 }],+}++const meta: Meta = {+ component: App,+ title: 'Scenes-App/Engineering Analytics/Authors',+ parameters: {+ layout: 'fullscreen',+ viewMode: 'story',+ mockDate: '2026-09-24',+ featureFlags: [FEATURE_FLAGS.ENGINEERING_ANALYTICS],+ testOptions: {+ waitForSelector: '[data-attr="engineering-analytics-friction-table"]',+ },+ },+ decorators: [+ mswDecorator({+ get: {+ 'api/projects/:team_id/engineering_analytics/author_friction/': FRICTION,+ 'api/projects/:team_id/engineering_analytics/sources/': SOURCES,+ // Sibling-tab loaders mount with the scene; stub them so the story renders without error toasts.+ 'api/projects/:team_id/engineering_analytics/ci_cards/': {+ open_prs: 0,+ repos: 1,+ stuck: 0,+ failing_ci: 0,+ },+ 'api/projects/:team_id/engineering_analytics/pull_requests/': {+ items: [],+ truncated: false,+ limit: 1000,+ },+ 'api/projects/:team_id/engineering_analytics/workflow_health/': [],+ 'api/projects/:team_id/engineering_analytics/quarantine/': {+ available: false,+ entries: [],+ parse_errors: [],+ parse_warnings: [],+ repo: null,+ source_url: null,+ generated_at: null,+ },+ 'api/projects/:team_id/engineering_analytics/trunk_quarantine/': {+ available: false,+ ttl_days: 15,+ repository: null,+ trunk_url: null,+ teams: [],+ tests: [],+ },+ },+ }),+ ],+}+export default meta++type Story = StoryObj<typeof meta>++export const AuthorFriction: Story = {+ render: () => <App />,+ parameters: { pageUrl: urls.engineeringAnalyticsAuthors() },+}++export const AuthorFrictionNotReady: Story = {+ render: () => <App />,+ parameters: {+ pageUrl: urls.engineeringAnalyticsAuthors(),+ testOptions: { waitForSelector: '[data-attr="engineering-analytics-friction-not-ready"]' },+ },+ decorators: [+ mswDecorator({+ get: {+ 'api/projects/:team_id/engineering_analytics/author_friction/': {+ ...FRICTION,+ available: false,+ ranked_author_count: 0,+ items: [],+ teams: [],+ },+ },+ }),+ ],+}diff --git a/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsAuthors.tsx b/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsAuthors.tsxnew file mode 100644index 000000000000..45a25a0aedcd--- /dev/null+++ b/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsAuthors.tsx@@ -0,0 +1,188 @@+import { useActions, useValues } from 'kea'++import { LemonSelect, LemonTable, LemonTableColumns, Link } from '@posthog/lemon-ui'++import { Lettermark } from 'lib/lemon-ui/Lettermark'+import { urls } from 'scenes/urls'++import { CIAnalyticsLoadError } from '../components/CIAnalyticsLoadError'+import { ConnectGitHubSource } from '../components/ConnectGitHubSource'+import { CountCell } from '../components/CountCell'+import { FrictionGroupBar } from '../components/FrictionGroupBar'+import { SourceScopeChip } from '../components/ScopeBar'+import { ScopePanel } from '../components/ScopePanel'+import { Section } from '../components/Section'+import type { AuthorFrictionApi } from '../generated/api.schemas'+import { timesTypical } from '../lib/format'+import {+ FRICTION_GROUP_COLORS,+ FRICTION_GROUP_DESCRIPTIONS,+ FRICTION_GROUP_LABELS,+ FRICTION_GROUP_ORDER,+} from '../lib/friction'+import { rowNavigationProps } from '../lib/rowNavigation'+import { withCurrentScope } from '../lib/scope'+import { authorFrictionLogic } from './authorFrictionLogic'++function authorUrl(handle: string, sourceId: string | null): string {+ return withCurrentScope(urls.engineeringAnalyticsAuthor(handle), sourceId)+}++const GROUPS_TOOLTIP = FRICTION_GROUP_ORDER.map(+ (group) => `${FRICTION_GROUP_LABELS[group]}: ${FRICTION_GROUP_DESCRIPTIONS[group]}.`+).join(' ')++export function EngineeringAnalyticsAuthors(): JSX.Element {+ const {+ friction,+ frictionLoading,+ frictionFailed,+ frictionNotConnected,+ authors,+ githubTeam,+ teamOptions,+ sourceId,+ } = useValues(authorFrictionLogic)+ const { loadFriction, setGithubTeam } = useActions(authorFrictionLogic)++ const windowLabel = `last ${friction?.window_days ?? 30} days`+ const maxScore = Math.max(0, ...(friction?.items ?? []).map((item) => item.score))++ const columns: LemonTableColumns<AuthorFrictionApi> = [+ {+ title: 'Rank',+ key: 'rank',+ width: 90,+ tooltip: `Position by friction among ${friction?.ranked_author_count ?? 0} authors. The range is where the author lands when their pull requests are resampled, so a wide range means the position is not settled.`,+ sorter: (a, b) => a.rank - b.rank,+ render: (_, row) => (+ <span className="tabular-nums">+ {row.rank}+ {row.rank_low !== row.rank_high && (+ <span className="text-tertiary">+ {' '}+ ({row.rank_low}–{row.rank_high})+ </span>+ )}+ </span>+ ),+ },+ {+ title: 'Author',+ key: 'author',+ sorter: (a, b) => a.author.localeCompare(b.author),+ render: (_, row) => (+ <div className="flex items-center gap-2">+ {row.avatar_url ? (+ <img src={row.avatar_url} alt="" className="size-5 shrink-0 rounded-full" />+ ) : (+ <Lettermark name={row.author} size="small" />+ )}+ <Link+ to={authorUrl(row.author, sourceId)}+ className="text-xs font-medium"+ data-attr="engineering-analytics-friction-author-link"+ >+ {row.author}+ </Link>+ </div>+ ),+ },+ {+ title: 'Friction',+ key: 'score',+ width: 90,+ align: 'right',+ tooltip: `Friction over pull requests merged in the ${windowLabel}, as a multiple of the typical author: 1.0× is typical. It counts what happened to the author, never how much or how fast they ship.`,+ sorter: (a, b) => a.score - b.score,+ render: (_, row) => <span className="tabular-nums">{timesTypical(row.score)}</span>,+ },+ {+ title: 'Where it comes from',+ key: 'groups',+ width: '40%',+ tooltip: GROUPS_TOOLTIP,+ render: (_, row) => <FrictionGroupBar groups={row.groups} max={maxScore} />,+ },+ {+ title: 'Pull requests',+ key: 'pr_count',+ width: 110,+ align: 'right',+ tooltip: `Merged in the ${windowLabel}. An author needs 3 to get a score.`,+ render: (_, row) => <CountCell value={row.pr_count} />,+ },+ ]++ if (frictionNotConnected) {+ return <ConnectGitHubSource />+ }++ const teamFilter = (+ <LemonSelect+ size="small"+ value={githubTeam}+ onChange={(value) => setGithubTeam(value)}+ options={[+ { value: null, label: 'All teams' },+ ...teamOptions.map((team) => ({ value: team, label: team })),+ ]}+ disabledReason={+ !friction+ ? 'Teams load with the friction list.'+ : !friction.has_membership_data+ ? 'Team membership is not synced for this source.'+ : teamOptions.length === 0+ ? 'No team has a member with a friction score yet.'+ : undefined+ }+ data-attr="engineering-analytics-friction-team-filter"+ />+ )++ const legend = (+ <span className="flex flex-wrap items-center gap-3">+ {FRICTION_GROUP_ORDER.map((group) => (+ <span key={group} className="flex items-center gap-1">+ <span className={`size-2 rounded-sm ${FRICTION_GROUP_COLORS[group]}`} />+ {FRICTION_GROUP_LABELS[group]}+ </span>+ ))}+ </span>+ )++ return (+ <div className="flex flex-col gap-4">+ <ScopePanel busy={frictionLoading && !!friction} controls={<SourceScopeChip pickerOnly />}>+ <Section id="author-friction" title="Friction by author" note={legend} right={teamFilter}>+ {frictionFailed ? (+ <CIAnalyticsLoadError onRetry={loadFriction} loading={frictionLoading} />+ ) : friction && !friction.available ? (+ <div className="text-sm text-secondary" data-attr="engineering-analytics-friction-not-ready">+ Friction is not ready for this project yet. It needs a GitHub source with workflow runs,+ workflow jobs and pull requests synced, and it refreshes every 12 hours.+ </div>+ ) : (+ <LemonTable+ data-attr="engineering-analytics-friction-table"+ size="small"+ columns={columns}+ dataSource={authors}+ rowKey={(row) => row.author}+ rowClassName="cursor-pointer"+ onRow={(row) => rowNavigationProps(authorUrl(row.author, sourceId))}+ loading={frictionLoading}+ useURLForSorting={false}+ emptyState={+ githubTeam+ ? 'No one on this team has 3 merged pull requests in the window yet.'+ : 'No author has 3 merged pull requests in the window yet.'+ }+ nouns={['author', 'authors']}+ />+ )}+ </Section>+ </ScopePanel>+ </div>+ )+}diff --git a/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsScene.tsx b/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsScene.tsxindex 61842caa0f1a..1191e8c08da7 100644--- a/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsScene.tsx+++ b/products/engineering_analytics/frontend/scenes/EngineeringAnalyticsScene.tsx@@ -12,6 +12,7 @@ import { ProductKey } from '~/queries/schema/schema-general'import { engineeringAnalyticsEmptyState } from '../emptyState/engineeringAnalyticsEmptyState'import { doraLogic } from './doraLogic'+import { EngineeringAnalyticsAuthors } from './EngineeringAnalyticsAuthors'import { EngineeringAnalyticsDeploys } from './EngineeringAnalyticsDeploys'import { engineeringAnalyticsLogic } from './engineeringAnalyticsLogic'import { EngineeringAnalyticsPullRequests } from './EngineeringAnalyticsPullRequests'@@ -109,6 +110,13 @@ export function EngineeringAnalyticsScene(): JSX.Element {link: combineUrl(urls.engineeringAnalyticsTeams(), linkParams).url,'data-attr': 'engineering-analytics-teams-tab',},+ {+ key: 'authors',+ label: 'Authors',+ content: <EngineeringAnalyticsAuthors />,+ link: combineUrl(urls.engineeringAnalyticsAuthors(), linkParams).url,+ 'data-attr': 'engineering-analytics-authors-tab',+ },]return (diff --git a/products/engineering_analytics/frontend/scenes/authorFrictionLogic.test.ts b/products/engineering_analytics/frontend/scenes/authorFrictionLogic.test.tsnew file mode 100644index 000000000000..12317aee3f3d--- /dev/null+++ b/products/engineering_analytics/frontend/scenes/authorFrictionLogic.test.ts@@ -0,0 +1,117 @@+import { expectLogic } from 'kea-test-utils'++import { ApiConfig } from 'lib/api'++import { initKeaTests } from '~/test/init'++import {+ engineeringAnalyticsAuthorFriction,+ engineeringAnalyticsCiCards,+ engineeringAnalyticsPullRequests,+ engineeringAnalyticsQuarantine,+ engineeringAnalyticsSources,+ engineeringAnalyticsTrunkQuarantine,+ engineeringAnalyticsWorkflowHealth,+} from '../generated/api'+import type { AuthorFrictionApi } from '../generated/api.schemas'+import { authorFrictionLogic } from './authorFrictionLogic'++jest.mock('../generated/api', () => ({+ engineeringAnalyticsAuthorFriction: jest.fn(),+ engineeringAnalyticsCiCards: jest.fn(),+ engineeringAnalyticsPullRequests: jest.fn(),+ engineeringAnalyticsQuarantine: jest.fn(),+ engineeringAnalyticsSources: jest.fn(),+ engineeringAnalyticsTrunkQuarantine: jest.fn(),+ engineeringAnalyticsWorkflowHealth: jest.fn(),+}))++const mockFriction = engineeringAnalyticsAuthorFriction as jest.MockedFunction<+ typeof engineeringAnalyticsAuthorFriction+>++function author(name: string, rank: number, teams: string[]): AuthorFrictionApi {+ return {+ author: name,+ avatar_url: '',+ score: 3 - rank * 0.5,+ groups: [],+ pr_count: 5,+ rank,+ rank_low: rank,+ rank_high: rank,+ teams,+ }+}++describe('authorFrictionLogic', () => {+ let logic: ReturnType<typeof authorFrictionLogic.build>++ beforeEach(() => {+ initKeaTests()+ ApiConfig.setCurrentProjectId(1)+ jest.clearAllMocks()+ mockFriction.mockResolvedValue({+ available: true,+ window_days: 30,+ ranked_author_count: 3,+ github_team: null,+ has_membership_data: true,+ items: [author('blocked', 1, []), author('typical', 2, ['pair']), author('calm', 3, ['pair'])],+ teams: [],+ })+ ;(engineeringAnalyticsCiCards as jest.Mock).mockResolvedValue({+ open_prs: 0,+ repos: 1,+ stuck: 0,+ failing_ci: 0,+ })+ ;(engineeringAnalyticsPullRequests as jest.Mock).mockResolvedValue({ items: [], truncated: false, limit: 1000 })+ ;(engineeringAnalyticsQuarantine as jest.Mock).mockResolvedValue({+ available: false,+ entries: [],+ parse_errors: [],+ parse_warnings: [],+ repo: null,+ source_url: '',+ generated_at: '',+ })+ ;(engineeringAnalyticsSources as jest.Mock).mockResolvedValue([])+ ;(engineeringAnalyticsTrunkQuarantine as jest.Mock).mockResolvedValue({+ available: false,+ owners_resolved: false,+ ttl_days: 15,+ repository: '',+ trunk_url: null,+ truncated: false,+ limit: 500,+ teams: [],+ tests: [],+ })+ ;(engineeringAnalyticsWorkflowHealth as jest.Mock).mockResolvedValue([])+ })++ afterEach(() => logic?.unmount())++ it('keeps repository ranks under a team filter and reloads for a new scope or a refresh', async () => {+ logic = authorFrictionLogic()+ logic.mount()+ await expectLogic(logic).toDispatchActions(['loadFrictionSuccess'])++ logic.actions.setGithubTeam('pair')+ expect(logic.values.teamOptions).toEqual(['pair'])+ expect(logic.values.authors.map(({ author, rank }) => [author, rank])).toEqual([+ ['typical', 2],+ ['calm', 3],+ ])++ logic.actions.setScope('source-2', 'PostHog/posthog-js')+ await expectLogic(logic).toDispatchActions(['loadFrictionSuccess'])+ expect(mockFriction).toHaveBeenLastCalledWith('1', { source_id: 'source-2', repo: 'PostHog/posthog-js' })+ expect(logic.values.githubTeam).toBeNull()++ logic.actions.refresh()+ await expectLogic(logic).toDispatchActions(['loadFrictionSuccess'])+ expect(mockFriction).toHaveBeenCalledTimes(3)+ })+})diff --git a/products/engineering_analytics/frontend/scenes/authorFrictionLogic.ts b/products/engineering_analytics/frontend/scenes/authorFrictionLogic.tsnew file mode 100644index 000000000000..64d684aa89d2--- /dev/null+++ b/products/engineering_analytics/frontend/scenes/authorFrictionLogic.ts@@ -0,0 +1,155 @@+import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'+import { loaders } from 'kea-loaders'++import { ApiConfig } from 'lib/api'++import { engineeringAnalyticsAuthorFriction } from '../generated/api'+import type { AuthorFrictionApi, AuthorFrictionListApi } from '../generated/api.schemas'+import { LoaderStatus, engineeringAnalyticsLogic, loaderStatusFromError } from './engineeringAnalyticsLogic'++const projectId = (): string => String(ApiConfig.getCurrentProjectId())++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface authorFrictionLogicValues {+ scopeRepo: string | null // engineeringAnalyticsLogic+ sourceId: string | null // engineeringAnalyticsLogic+ authors: AuthorFrictionApi[]+ friction: AuthorFrictionListApi | null+ frictionFailed: boolean+ frictionLoading: boolean+ frictionNotConnected: boolean+ frictionStatus: LoaderStatus+ githubTeam: string | null+ teamOptions: string[]+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface authorFrictionLogicActions {+ refresh: () => {+ value: true+ } // engineeringAnalyticsLogic+ setScope: (+ sourceId: string | null,+ scopeRepo: string | null+ ) => {+ scopeRepo: string | null+ sourceId: string | null+ } // engineeringAnalyticsLogic+ setSourceId: (sourceId: string | null) => {+ sourceId: string | null+ } // engineeringAnalyticsLogic+ loadFriction: (_: void) => void+ loadFrictionFailure: (+ error: string,+ errorObject?: any+ ) => {+ error: string+ errorObject?: any+ }+ loadFrictionSuccess: (+ friction: AuthorFrictionListApi,+ payload?: void+ ) => {+ friction: AuthorFrictionListApi+ payload?: void+ }+ setGithubTeam: (githubTeam: string | null) => {+ githubTeam: string | null+ }+}++// Generated by kea-typegen. Update if you're an agent, ignore if you're human.+export interface authorFrictionLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ frictionFailed: (frictionStatus: LoaderStatus) => boolean+ frictionNotConnected: (frictionStatus: LoaderStatus) => boolean+ teamOptions: (friction: AuthorFrictionListApi | null) => string[]+ authors: (friction: AuthorFrictionListApi | null, githubTeam: string | null) => AuthorFrictionApi[]+ }+}++export type authorFrictionLogicType = MakeLogicType<+ authorFrictionLogicValues,+ authorFrictionLogicActions,+ Record<string, any>,+ authorFrictionLogicMeta+>++export const authorFrictionLogic = kea<authorFrictionLogicType>([+ path(['products', 'engineering_analytics', 'frontend', 'scenes', 'authorFrictionLogic']),+ connect(() => ({+ values: [engineeringAnalyticsLogic, ['sourceId', 'scopeRepo']],+ actions: [engineeringAnalyticsLogic, ['setSourceId', 'setScope', 'refresh']],+ })),+ actions({+ setGithubTeam: (githubTeam: string | null) => ({ githubTeam }),+ }),+ loaders(({ values }) => ({+ friction: [+ null as AuthorFrictionListApi | null,+ {+ // A fixed 30-day window from the materialized view, so the date picker does not move this list.+ loadFriction: async (_: void, breakpoint): Promise<AuthorFrictionListApi> => {+ try {+ return await engineeringAnalyticsAuthorFriction(projectId(), {+ source_id: values.sourceId ?? undefined,+ repo: values.scopeRepo ?? undefined,+ })+ } finally {+ // A scope change starts a new request, so a slower answer for the old scope must not land.+ breakpoint()+ }+ },+ },+ ],+ })),+ reducers({+ friction: [+ null as AuthorFrictionListApi | null,+ {+ loadFrictionSuccess: (_, { friction }) => friction,+ // The old rows would link with the new source, so they go as soon as the scope changes.+ setSourceId: () => null,+ setScope: () => null,+ },+ ],+ frictionStatus: [+ 'ok' as LoaderStatus,+ {+ loadFriction: () => 'ok',+ loadFrictionSuccess: () => 'ok',+ loadFrictionFailure: (_, { errorObject }) => loaderStatusFromError(errorObject),+ },+ ],+ githubTeam: [+ null as string | null,+ {+ setGithubTeam: (_, { githubTeam }) => githubTeam,+ setScope: () => null,+ setSourceId: () => null,+ },+ ],+ }),+ selectors({+ frictionFailed: [(s) => [s.frictionStatus], (status: LoaderStatus): boolean => status === 'error'],+ frictionNotConnected: [(s) => [s.frictionStatus], (status: LoaderStatus): boolean => status === 'notConnected'],+ teamOptions: [+ (s) => [s.friction],+ (friction: AuthorFrictionListApi | null): string[] =>+ [...new Set((friction?.items ?? []).flatMap((item) => item.teams ?? []))].sort(),+ ],+ // A team keeps the repository-wide ranks, so a member reads the same with and without the filter.+ authors: [+ (s) => [s.friction, s.githubTeam],+ (friction: AuthorFrictionListApi | null, githubTeam: string | null): AuthorFrictionApi[] =>+ (friction?.items ?? []).filter((item) => !githubTeam || (item.teams ?? []).includes(githubTeam)),+ ],+ }),+ listeners(({ actions }) => ({+ // engineeringAnalyticsLogic refreshes on every source or repo change, so this covers a new scope too.+ refresh: () => actions.loadFriction(),+ })),+ afterMount(({ actions }) => {+ actions.loadFriction()+ }),+])diff --git a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.test.ts b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.test.tsindex 27f2768396f0..2948642a13b4 100644--- a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.test.ts+++ b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.test.ts@@ -464,6 +464,7 @@ describe('engineeringAnalyticsLogic', () => {['workflows', () => urls.engineeringAnalyticsWorkflows()],['tests', () => urls.engineeringAnalyticsTests()],['teams', () => urls.engineeringAnalyticsTeams()],+ ['authors', () => urls.engineeringAnalyticsAuthors()],['team detail', () => urls.engineeringAnalyticsTeam('team-replay')],['deploys', () => urls.engineeringAnalyticsDeploys()],])('the %s route applies ?source and ?repo like the other tabs', async (_label, url) => {diff --git a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.ts b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.tsindex 8b9e58bb13e2..20331ee08958 100644--- a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.ts+++ b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsLogic.ts@@ -1266,6 +1266,7 @@ export const engineeringAnalyticsLogic: LogicWrapper<engineeringAnalyticsLogicTy[urls.engineeringAnalyticsTests()]: (_, s) => applyScope(s.source, s.repo),[urls.engineeringAnalyticsDeploys()]: (_, s) => applyScope(s.source, s.repo),[urls.engineeringAnalyticsTeams()]: (_, s) => applyScope(s.source, s.repo),+ [urls.engineeringAnalyticsAuthors()]: (_, s) => applyScope(s.source, s.repo),'/engineering-analytics/teams/:ownerTeam': (_, s) => applyScope(s.source, s.repo),}}),diff --git a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsSceneLogic.ts b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsSceneLogic.tsindex 29cc3a15562d..c121475c9f58 100644--- a/products/engineering_analytics/frontend/scenes/engineeringAnalyticsSceneLogic.ts+++ b/products/engineering_analytics/frontend/scenes/engineeringAnalyticsSceneLogic.ts@@ -2,8 +2,8 @@ import { MakeLogicType, connect, kea, path, selectors } from 'kea'import { sceneLogic } from '~/scenes/sceneLogic'-/** The root scene's views: the repo hub and the pull request, workflow, test, deploy, and team list pages. */-export type EngineeringAnalyticsView = 'hub' | 'pull-requests' | 'workflows' | 'tests' | 'deploys' | 'teams'+/** The root scene's views: the repo hub and the pull request, workflow, test, deploy, team, and author list pages. */+export type EngineeringAnalyticsView = 'hub' | 'pull-requests' | 'workflows' | 'tests' | 'deploys' | 'teams' | 'authors'export const VIEW_DESCRIPTIONS: Record<EngineeringAnalyticsView, string> = {hub: 'CI health, pull requests, workflows, and cost for the connected repo.',@@ -13,6 +13,7 @@ export const VIEW_DESCRIPTIONS: Record<EngineeringAnalyticsView, string> = {deploys:'DORA-style deploy metrics from GitHub deployments: frequency, merge to deploy lead time, and failure proxies.',teams: 'Tests each team owns and their CI signal, from the owners.yaml map.',+ authors: 'Friction each author meets in CI, review, and the merge queue, against the typical author.',}const SCENE_KEY_TO_VIEW: Record<string, EngineeringAnalyticsView> = {@@ -21,6 +22,7 @@ const SCENE_KEY_TO_VIEW: Record<string, EngineeringAnalyticsView> = {engineeringAnalyticsWorkflows: 'workflows',engineeringAnalyticsTests: 'tests',engineeringAnalyticsTeams: 'teams',+ engineeringAnalyticsAuthors: 'authors',engineeringAnalyticsDeploys: 'deploys',}diff --git a/products/engineering_analytics/manifest.tsx b/products/engineering_analytics/manifest.tsxindex e4606502b7df..d1c2fe9eb2cd 100644--- a/products/engineering_analytics/manifest.tsx+++ b/products/engineering_analytics/manifest.tsx@@ -70,6 +70,7 @@ export const manifest: ProductManifest = {'/engineering-analytics/workflows': ['EngineeringAnalytics', 'engineeringAnalyticsWorkflows'],'/engineering-analytics/tests': ['EngineeringAnalytics', 'engineeringAnalyticsTests'],'/engineering-analytics/teams': ['EngineeringAnalytics', 'engineeringAnalyticsTeams'],+ '/engineering-analytics/authors': ['EngineeringAnalytics', 'engineeringAnalyticsAuthors'],'/engineering-analytics/deploys': ['EngineeringAnalytics', 'engineeringAnalyticsDeploys'],'/engineering-analytics/teams/:ownerTeam': ['EngineeringAnalyticsTeam', 'engineeringAnalyticsTeam'],'/engineering-analytics/repos/:repoOwner/:repoName/pull-requests/:number': [@@ -94,10 +95,6 @@ export const manifest: ProductManifest = {combineUrl(urls.engineeringAnalyticsTests(), searchParams, hashParams).url,'/engineering-analytics/health': (_params, searchParams, hashParams): string =>combineUrl(urls.engineeringAnalyticsDeploys(), searchParams, hashParams).url,- // The author *list* (leaderboards / rankings) stays removed — analytics aggregate at team/repo- // level only (see README locked decisions). The per-author page is a filtered PR view, reachable- // only via the author links on PR rows, so it keeps its route above.- '/engineering-analytics/authors': '/engineering-analytics/overview',},urls: {engineeringAnalytics: (): string => '/engineering-analytics/overview',@@ -105,6 +102,7 @@ export const manifest: ProductManifest = {engineeringAnalyticsWorkflows: (): string => '/engineering-analytics/workflows',engineeringAnalyticsTests: (): string => '/engineering-analytics/tests',engineeringAnalyticsTeams: (): string => '/engineering-analytics/teams',+ engineeringAnalyticsAuthors: (): string => '/engineering-analytics/authors',engineeringAnalyticsDeploys: (): string => '/engineering-analytics/deploys',engineeringAnalyticsTeam: (ownerTeam: string): string =>`/engineering-analytics/teams/${encodeURIComponent(ownerTeam)}`,diff --git a/services/mcp/src/tools/links/app-url-manifest.json b/services/mcp/src/tools/links/app-url-manifest.jsonindex 1b4d38613449..c96b3990359b 100644--- a/services/mcp/src/tools/links/app-url-manifest.json+++ b/services/mcp/src/tools/links/app-url-manifest.json@@ -604,6 +604,11 @@"params": ["handle"],"scope": "project"},+ "engineeringAnalyticsAuthors": {+ "template": "/engineering-analytics/authors",+ "params": [],+ "scope": "project"+ },"engineeringAnalyticsDeploys": {"template": "/engineering-analytics/deploys","params": [],diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.jsonindex f97a3b38cbda..bec4ad844b4b 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/generate-app-url.json@@ -13,7 +13,7 @@"type": "object"},"url": {- "description": "A path template copied verbatim from the catalog below (e.g. `/persons/{uuid}`). Its `{placeholders}` are filled from `params`. These slugs come from PostHog's canonical route table, so they are always correct — never pass a path that is not in this list.\n\n/account-connected/{kind}\n/account/credential-review\n/account/social-connected\n/activity-logs\n/activity/{tab}\n/agentic/account-mismatch\n/agentic/authorize\n/ai\n/ai-enrichment\n/ai-evals/datasets\n/ai-evals/datasets/{id}\n/ai-evals/evaluations\n/ai-evals/evaluations/offline/experiments\n/ai-evals/evaluations/offline/experiments/{experimentId}\n/ai-evals/evaluations/templates\n/ai-evals/evaluations/{id}\n/ai-evals/taggers\n/ai-evals/taggers/{id}\n/ai-gateway\n/ai-observability/clusters\n/ai-observability/clusters/{runId}/{clusterId}\n/ai-observability/dashboard\n/ai-observability/errors\n/ai-observability/generations\n/ai-observability/playground\n/ai-observability/reviews\n/ai-observability/self-driving\n/ai-observability/sentiment\n/ai-observability/sessions\n/ai-observability/sessions/{id}\n/ai-observability/tools\n/ai-observability/traces\n/ai-observability/traces/{id}\n/ai-observability/users\n/ai/history\n/alerts\n/approvals/{id}\n/billing/authorization_status\n/broadcasts\n/broadcasts/new\n/broadcasts/{id}\n/business-knowledge\n/business-knowledge/settings\n/business-knowledge/{id}\n/canvas\n/cli/authorize\n/cli/live\n/code-review\n/code/canvas/{channelId}/{dashboardId}\n/code/channel/{channelId}\n/code/loop/{loopId}\n/code/task/{taskId}\n/cohorts\n/cohorts/{id}\n/cohorts/{id}/calculation-history\n/connect/vercel/link\n/coupons/{campaign}\n/create-organization\n/customer_analytics\n/customer_analytics/accounts\n/customer_analytics/accounts/by-external-id/{externalId}\n/customer_analytics/accounts/{accountId}\n/customer_analytics/announcements\n/customer_analytics/configuration\n/customer_analytics/dashboard\n/customer_analytics/feature-requests\n/customer_analytics/feed\n/customer_analytics/journeys\n/customer_analytics/journeys/new\n/customer_analytics/journeys/templates\n/customer_analytics/journeys/{id}/edit\n/customer_analytics/notes\n/customer_analytics/tasks\n/dashboard\n/dashboard/templates/{templateId}/copy-to-project\n/dashboard/{id}\n/dashboard/{id}/sharing\n/dashboard/{id}/subscriptions\n/dashboard/{id}/subscriptions/{subscriptionId}\n/dashboard/{id}/tiles/{tileId}\n/data-catalog\n/data-catalog/metrics/{name}\n/data-management/actions\n/data-management/actions/new\n/data-management/actions/new/\n/data-management/actions/{id}\n/data-management/annotations\n/data-management/annotations/{id}\n/data-management/core-events\n/data-management/database\n/data-management/destinations\n/data-management/event-filtering\n/data-management/events\n/data-management/events/{id}\n/data-management/events/{id}/edit\n/data-management/history\n/data-management/ingestion-warnings\n/data-management/ingestion-warnings-v2\n/data-management/managed-viewsets\n/data-management/materialized-columns\n/data-management/properties\n/data-management/properties/{id}\n/data-management/properties/{id}/edit\n/data-management/revenue\n/data-management/schema\n/data-management/sources\n/data-management/sources/{id}/schemas\n/data-management/sources/{sourceId}/schemas/{schemaId}\n/data-management/transformations\n/data-management/variables\n/data-management/variables/{id}\n/data-management/variables/{id}/edit\n/data-management/warehouse-destinations\n/data-management/warehouse-properties\n/data-ops\n/data-warehouse/connect\n/data-warehouse/new-source\n/debug\n/debug/hog\n/debug/precompute\n/early_access_features\n/early_access_features/{id}\n/embedded/{token}\n/endpoints\n/endpoints/{name}\n/engineering-analytics/authors/{handle}\n/engineering-analytics/deploys\n/engineering-analytics/overview\n/engineering-analytics/pull-requests\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/runs/{runId}\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/workflows/{workflowName}\n/engineering-analytics/repos/{repoOwner}/{repoName}/pull-requests/{number}\n/engineering-analytics/teams\n/engineering-analytics/teams/{ownerTeam}\n/engineering-analytics/tests\n/engineering-analytics/workflows\n/error_tracking\n/error_tracking/alerts/new/{templateId}\n/error_tracking/alerts/{id}\n/error_tracking/fingerprint/{fingerprint}\n/error_tracking/{id}\n/events/{id}/{timestamp}\n/experiments\n/experiments/shared-metrics\n/experiments/shared-metrics/{id}\n/experiments/staff\n/experiments/{id}\n/exports\n/feature_flags\n/feature_flags/new\n/feature_flags/staff\n/feature_flags/staff/cohorts\n/feature_flags/templates\n/feature_flags/{id}\n/files\n/functions/new/{templateId}\n/functions/{id}\n/games/368hedgehogs\n/games/flappyhog\n/games/shipit\n/groups/{groupTypeIndex}\n/groups/{groupTypeIndex}/new\n/groups/{groupTypeIndex}/{groupKey}\n/health\n/health/alerts\n/health/pipeline-status\n/health/sdk-health\n/health/{category}\n/heatmaps\n/heatmaps/new\n/heatmaps/recording\n/heatmaps/{id}\n/home\n/identity-matching\n/inbox\n/inbox/reports/triage\n/inbox/scouts/findings\n/inbox/scouts/runs\n/inbox/scouts/scratchpad\n/inbox/scouts/{skillName}\n/inbox/{tab}/{reportId}\n/insights\n/insights/new\n/insights/quick-start\n/insights/{id}\n/insights/{id}/edit\n/insights/{id}/sharing\n/insights/{id}/subscriptions\n/insights/{id}/subscriptions/{subscriptionId}\n/insights/{insightShortId}/alerts\n/instance/async_migrations\n/instance/async_migrations/future\n/instance/async_migrations/settings\n/instance/dead_letter_queue\n/instance/kafka_inspector\n/instance/metrics\n/instance/settings\n/instance/staff_users\n/instance/status\n/integrations/stripe/confirm-install\n/integrations/vercel/link-error\n/integrations/{kind}/callback\n/integrations/{slug}\n/legal\n/legal/new/{type}\n/link/{id}\n/links\n/live-debugger\n/login\n/login/2fa\n/login/2fa_setup\n/logs\n/logs/alerts/{alertId}/notifications/{hogFunctionId}\n/logs/alerts/{id}\n/logs/drop-rules/new\n/logs/drop-rules/{id}\n/logs/retention-rules/new\n/logs/retention-rules/{id}\n/managed_migrations\n/managed_migrations/new\n/marketing\n/mcp-analytics\n/mcp-analytics/activity\n/mcp-analytics/dashboard\n/mcp-analytics/intent-clustering\n/mcp-analytics/missing-capabilities\n/mcp-analytics/notifications\n/mcp-analytics/sessions\n/mcp-analytics/tool-quality\n/mcp-analytics/tool-quality/{toolName}\n/mcp-registry\n/mcp-servers\n/mcp-servers/agent/{id}\n/mcp-servers/member/{id}\n/mcp-servers/server/{id}\n/mcp-servers/{tab}\n/metrics\n/models\n/models/{id}\n/move-to-cloud\n/my-tickets\n/notebooks\n/notebooks/widgets/{widgetId}\n/notebooks/{shortId}\n/oauth/authorize\n/onboarding\n/organization-deactivated\n/organization-pending-deletion\n/organization/billing\n/organization/billing/overview\n/organization/billing/real-time-usage\n/organization/confirm-creation\n/organization/create-project\n/person/{id}\n/persons\n/persons/{uuid}\n/pipeline/batch-exports/new/{service}\n/pipeline/batch-exports/{id}\n/pipeline/new/\n/pipeline/plugins/{id}\n/preflight\n/product_tours\n/product_tours/{id}\n/project-pending-deletion\n/prompt-management/prompts\n/prompt-management/prompts/{name}\n/pulse\n/replay-vision\n/replay-vision/new/template\n/replay-vision/observations/{observationId}\n/replay-vision/{id}/budget\n/replay-vision/{id}/configure\n/replay-vision/{id}/details\n/replay-vision/{id}/overview\n/replay-vision/{id}/self-driving\n/replay-vision/{id}/template\n/replay-vision/{id}/triggers\n/replay/file-playback\n/replay/home\n/replay/kiosk\n/replay/playlists/{id}\n/replay/settings\n/replay/{id}\n/reset\n/reset/{userUuid}/{token}\n/reset_2fa/{userUuid}/{token}\n/resource-transfer/{resourceKind}/{resourceId}\n/sessions/{id}\n/settings/environment-approvals\n/settings/organization-authentication/{feature}/{configId}\n/settings/project\n/settings/user-feature-previews\n/shared/{token}\n/shared_dashboard/{shareToken}\n/signup\n/signup/{id}\n/site/{url}\n/skills\n/skills/community\n/skills/{categoryTab}\n/skills/{name}\n/slack-task-context\n/sql\n/stamphog\n/stamphog/digests\n/stamphog/install/callback\n/stamphog/runs\n/startups\n/streamlit-apps\n/streamlit-apps/new\n/streamlit-apps/{id}\n/streamlit-apps/{id}/edit\n/subscriptions\n/subscriptions/new\n/subscriptions/{id}\n/subscriptions/{id}/edit\n/support\n/support/settings\n/support/tickets\n/support/tickets/{ticketId}\n/surveys\n/surveys/form/new\n/surveys/guided/new\n/surveys/{id}\n/tasks\n/tasks/new\n/tasks/{taskId}\n/terminal\n/themes/custom-css\n/toolbar\n/tracing\n/tracing/retention-rules/new\n/tracing/retention-rules/{id}\n/unsubscribe\n/user_research\n/user_research/{id}\n/user_research/{topicId}/response/{responseId}\n/verify_email\n/visual_review\n/visual_review/repos/{repoId}/flakiness\n/visual_review/repos/{repoId}/runs\n/visual_review/repos/{repoId}/snapshots\n/visual_review/repos/{repoId}/{runType}/snapshots/{identifier}\n/visual_review/runs/{runId}\n/visual_review/settings\n/web\n/web-scripts\n/web-scripts/new\n/web/agents\n/web/bots\n/web/content-autopilot\n/web/health\n/web/live\n/web/marketing\n/web/page-performance\n/web/page-reports\n/web/recap\n/web/session-attribution-explorer\n/web/web-vitals\n/wizard/runs\n/workflows\n/workflows/library/messages/{id}\n/workflows/library/templates/new\n/workflows/library/templates/{id}\n/workflows/new/workflow\n/workflows/{id}/{tab}",+ "description": "A path template copied verbatim from the catalog below (e.g. `/persons/{uuid}`). Its `{placeholders}` are filled from `params`. These slugs come from PostHog's canonical route table, so they are always correct — never pass a path that is not in this list.\n\n/account-connected/{kind}\n/account/credential-review\n/account/social-connected\n/activity-logs\n/activity/{tab}\n/agentic/account-mismatch\n/agentic/authorize\n/ai\n/ai-enrichment\n/ai-evals/datasets\n/ai-evals/datasets/{id}\n/ai-evals/evaluations\n/ai-evals/evaluations/offline/experiments\n/ai-evals/evaluations/offline/experiments/{experimentId}\n/ai-evals/evaluations/templates\n/ai-evals/evaluations/{id}\n/ai-evals/taggers\n/ai-evals/taggers/{id}\n/ai-gateway\n/ai-observability/clusters\n/ai-observability/clusters/{runId}/{clusterId}\n/ai-observability/dashboard\n/ai-observability/errors\n/ai-observability/generations\n/ai-observability/playground\n/ai-observability/reviews\n/ai-observability/self-driving\n/ai-observability/sentiment\n/ai-observability/sessions\n/ai-observability/sessions/{id}\n/ai-observability/tools\n/ai-observability/traces\n/ai-observability/traces/{id}\n/ai-observability/users\n/ai/history\n/alerts\n/approvals/{id}\n/billing/authorization_status\n/broadcasts\n/broadcasts/new\n/broadcasts/{id}\n/business-knowledge\n/business-knowledge/settings\n/business-knowledge/{id}\n/canvas\n/cli/authorize\n/cli/live\n/code-review\n/code/canvas/{channelId}/{dashboardId}\n/code/channel/{channelId}\n/code/loop/{loopId}\n/code/task/{taskId}\n/cohorts\n/cohorts/{id}\n/cohorts/{id}/calculation-history\n/connect/vercel/link\n/coupons/{campaign}\n/create-organization\n/customer_analytics\n/customer_analytics/accounts\n/customer_analytics/accounts/by-external-id/{externalId}\n/customer_analytics/accounts/{accountId}\n/customer_analytics/announcements\n/customer_analytics/configuration\n/customer_analytics/dashboard\n/customer_analytics/feature-requests\n/customer_analytics/feed\n/customer_analytics/journeys\n/customer_analytics/journeys/new\n/customer_analytics/journeys/templates\n/customer_analytics/journeys/{id}/edit\n/customer_analytics/notes\n/customer_analytics/tasks\n/dashboard\n/dashboard/templates/{templateId}/copy-to-project\n/dashboard/{id}\n/dashboard/{id}/sharing\n/dashboard/{id}/subscriptions\n/dashboard/{id}/subscriptions/{subscriptionId}\n/dashboard/{id}/tiles/{tileId}\n/data-catalog\n/data-catalog/metrics/{name}\n/data-management/actions\n/data-management/actions/new\n/data-management/actions/new/\n/data-management/actions/{id}\n/data-management/annotations\n/data-management/annotations/{id}\n/data-management/core-events\n/data-management/database\n/data-management/destinations\n/data-management/event-filtering\n/data-management/events\n/data-management/events/{id}\n/data-management/events/{id}/edit\n/data-management/history\n/data-management/ingestion-warnings\n/data-management/ingestion-warnings-v2\n/data-management/managed-viewsets\n/data-management/materialized-columns\n/data-management/properties\n/data-management/properties/{id}\n/data-management/properties/{id}/edit\n/data-management/revenue\n/data-management/schema\n/data-management/sources\n/data-management/sources/{id}/schemas\n/data-management/sources/{sourceId}/schemas/{schemaId}\n/data-management/transformations\n/data-management/variables\n/data-management/variables/{id}\n/data-management/variables/{id}/edit\n/data-management/warehouse-destinations\n/data-management/warehouse-properties\n/data-ops\n/data-warehouse/connect\n/data-warehouse/new-source\n/debug\n/debug/hog\n/debug/precompute\n/early_access_features\n/early_access_features/{id}\n/embedded/{token}\n/endpoints\n/endpoints/{name}\n/engineering-analytics/authors\n/engineering-analytics/authors/{handle}\n/engineering-analytics/deploys\n/engineering-analytics/overview\n/engineering-analytics/pull-requests\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/runs/{runId}\n/engineering-analytics/repos/{repoOwner}/{repoName}/actions/workflows/{workflowName}\n/engineering-analytics/repos/{repoOwner}/{repoName}/pull-requests/{number}\n/engineering-analytics/teams\n/engineering-analytics/teams/{ownerTeam}\n/engineering-analytics/tests\n/engineering-analytics/workflows\n/error_tracking\n/error_tracking/alerts/new/{templateId}\n/error_tracking/alerts/{id}\n/error_tracking/fingerprint/{fingerprint}\n/error_tracking/{id}\n/events/{id}/{timestamp}\n/experiments\n/experiments/shared-metrics\n/experiments/shared-metrics/{id}\n/experiments/staff\n/experiments/{id}\n/exports\n/feature_flags\n/feature_flags/new\n/feature_flags/staff\n/feature_flags/staff/cohorts\n/feature_flags/templates\n/feature_flags/{id}\n/files\n/functions/new/{templateId}\n/functions/{id}\n/games/368hedgehogs\n/games/flappyhog\n/games/shipit\n/groups/{groupTypeIndex}\n/groups/{groupTypeIndex}/new\n/groups/{groupTypeIndex}/{groupKey}\n/health\n/health/alerts\n/health/pipeline-status\n/health/sdk-health\n/health/{category}\n/heatmaps\n/heatmaps/new\n/heatmaps/recording\n/heatmaps/{id}\n/home\n/identity-matching\n/inbox\n/inbox/reports/triage\n/inbox/scouts/findings\n/inbox/scouts/runs\n/inbox/scouts/scratchpad\n/inbox/scouts/{skillName}\n/inbox/{tab}/{reportId}\n/insights\n/insights/new\n/insights/quick-start\n/insights/{id}\n/insights/{id}/edit\n/insights/{id}/sharing\n/insights/{id}/subscriptions\n/insights/{id}/subscriptions/{subscriptionId}\n/insights/{insightShortId}/alerts\n/instance/async_migrations\n/instance/async_migrations/future\n/instance/async_migrations/settings\n/instance/dead_letter_queue\n/instance/kafka_inspector\n/instance/metrics\n/instance/settings\n/instance/staff_users\n/instance/status\n/integrations/stripe/confirm-install\n/integrations/vercel/link-error\n/integrations/{kind}/callback\n/integrations/{slug}\n/legal\n/legal/new/{type}\n/link/{id}\n/links\n/live-debugger\n/login\n/login/2fa\n/login/2fa_setup\n/logs\n/logs/alerts/{alertId}/notifications/{hogFunctionId}\n/logs/alerts/{id}\n/logs/drop-rules/new\n/logs/drop-rules/{id}\n/logs/retention-rules/new\n/logs/retention-rules/{id}\n/managed_migrations\n/managed_migrations/new\n/marketing\n/mcp-analytics\n/mcp-analytics/activity\n/mcp-analytics/dashboard\n/mcp-analytics/intent-clustering\n/mcp-analytics/missing-capabilities\n/mcp-analytics/notifications\n/mcp-analytics/sessions\n/mcp-analytics/tool-quality\n/mcp-analytics/tool-quality/{toolName}\n/mcp-registry\n/mcp-servers\n/mcp-servers/agent/{id}\n/mcp-servers/member/{id}\n/mcp-servers/server/{id}\n/mcp-servers/{tab}\n/metrics\n/models\n/models/{id}\n/move-to-cloud\n/my-tickets\n/notebooks\n/notebooks/widgets/{widgetId}\n/notebooks/{shortId}\n/oauth/authorize\n/onboarding\n/organization-deactivated\n/organization-pending-deletion\n/organization/billing\n/organization/billing/overview\n/organization/billing/real-time-usage\n/organization/confirm-creation\n/organization/create-project\n/person/{id}\n/persons\n/persons/{uuid}\n/pipeline/batch-exports/new/{service}\n/pipeline/batch-exports/{id}\n/pipeline/new/\n/pipeline/plugins/{id}\n/preflight\n/product_tours\n/product_tours/{id}\n/project-pending-deletion\n/prompt-management/prompts\n/prompt-management/prompts/{name}\n/pulse\n/replay-vision\n/replay-vision/new/template\n/replay-vision/observations/{observationId}\n/replay-vision/{id}/budget\n/replay-vision/{id}/configure\n/replay-vision/{id}/details\n/replay-vision/{id}/overview\n/replay-vision/{id}/self-driving\n/replay-vision/{id}/template\n/replay-vision/{id}/triggers\n/replay/file-playback\n/replay/home\n/replay/kiosk\n/replay/playlists/{id}\n/replay/settings\n/replay/{id}\n/reset\n/reset/{userUuid}/{token}\n/reset_2fa/{userUuid}/{token}\n/resource-transfer/{resourceKind}/{resourceId}\n/sessions/{id}\n/settings/environment-approvals\n/settings/organization-authentication/{feature}/{configId}\n/settings/project\n/settings/user-feature-previews\n/shared/{token}\n/shared_dashboard/{shareToken}\n/signup\n/signup/{id}\n/site/{url}\n/skills\n/skills/community\n/skills/{categoryTab}\n/skills/{name}\n/slack-task-context\n/sql\n/stamphog\n/stamphog/digests\n/stamphog/install/callback\n/stamphog/runs\n/startups\n/streamlit-apps\n/streamlit-apps/new\n/streamlit-apps/{id}\n/streamlit-apps/{id}/edit\n/subscriptions\n/subscriptions/new\n/subscriptions/{id}\n/subscriptions/{id}/edit\n/support\n/support/settings\n/support/tickets\n/support/tickets/{ticketId}\n/surveys\n/surveys/form/new\n/surveys/guided/new\n/surveys/{id}\n/tasks\n/tasks/new\n/tasks/{taskId}\n/terminal\n/themes/custom-css\n/toolbar\n/tracing\n/tracing/retention-rules/new\n/tracing/retention-rules/{id}\n/unsubscribe\n/user_research\n/user_research/{id}\n/user_research/{topicId}/response/{responseId}\n/verify_email\n/visual_review\n/visual_review/repos/{repoId}/flakiness\n/visual_review/repos/{repoId}/runs\n/visual_review/repos/{repoId}/snapshots\n/visual_review/repos/{repoId}/{runType}/snapshots/{identifier}\n/visual_review/runs/{runId}\n/visual_review/settings\n/web\n/web-scripts\n/web-scripts/new\n/web/agents\n/web/bots\n/web/content-autopilot\n/web/health\n/web/live\n/web/marketing\n/web/page-performance\n/web/page-reports\n/web/recap\n/web/session-attribution-explorer\n/web/web-vitals\n/wizard/runs\n/workflows\n/workflows/library/messages/{id}\n/workflows/library/templates/new\n/workflows/library/templates/{id}\n/workflows/new/workflow\n/workflows/{id}/{tab}","type": "string"}},