: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
Engineering analytics frontend conventions
UI grammar for every scene in this product. frontend/src/AGENTS.md and the repo skills still apply; these rules are the product-specific layer on top. Model new surfaces on RepoOverviewScene.tsx (the repo hub), which is the reference implementation for all of them.
The scope panel bounds what the pickers govern
- Content a window or repo picker modifies lives inside
ScopePanel(components/ScopePanel.tsx): controls dock on its rim via thecontrolsprop, andbusyshows the rim spinner while anything inside reloads. - Current-state content (a backlog, a "now" signal list) sits outside the panel and must not refetch when a picker changes. If a section does not move with the picker, it does not belong inside the border, and the reverse.
- Navigation (repo chip and crumbs via
ScopeBar,showDate={false}when the page has its own picker) sits above the panel; it scopes identity, not time.
One comparison vocabulary per question
- Window-vs-window comparison renders as
WindowComparisonCard("This window / Previous window" bars plus aDeltaBadge). Nothing else: no invented forms (a muted "was N" companion value was tried and removed), noMetricTiledelta 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 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 altitude
- List pages (the Teams roster) are scannable snapshots: few columns, plain numbers, fixed default window stated in tooltips, no picker.
- Detail pages carry the depth: the picker, the comparison cards, charts, and drill-in tables.
Test tables
- The test id cell is
TestIdCell(components/TestIdCell.tsx) in aw-full max-w-0column: link to Trunk when the payload carries atrunk_url, else to the file on GitHub viagithubFileUrlinlib/github.ts. - Include a
Runnercolumn; render times withTZLabel.
Components and copy
- Lemon for all UI chrome;
@posthog/quill-chartsonly for data viz (charts), andMetricfrom@posthog/quill-components/metricfor headline stat tiles. Never raw@posthog/quillprimitives on the current UI. UI behind thetoday-rail-navfeature flag uses quill and followsfrontend/src/design.md. - No boilerplate subheader paragraphs under section titles. Method caveats go in column and card tooltips; the scene subtitle is one plain line.