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.

chore(toolbar): add chrome web store listing images for the extension (#127495)

Rafael Audibert375571050c2c
diff --git a/frontend/src/toolbar/extension/README.md b/frontend/src/toolbar/extension/README.md
index 7c3c532c163f..12ab87f2c02e 100644
--- a/frontend/src/toolbar/extension/README.md
+++ b/frontend/src/toolbar/extension/README.md
@@ -71,6 +71,34 @@ The panel sends usage events only when the user allows `technicalAndInteraction`
Firefox lets the user change this in the add-on's settings, and the panel applies the change right away.
The content script never sends usage events or logs, because it mounts the toolbar without `instrument`.
+## Store listing images
+
+`store-listing/images/` holds the images of the Chrome Web Store listing: five 1280×800 screenshots, the 440×280 small promo tile and the 1400×560 marquee promo tile.
+They are 24-bit PNGs without alpha, which is what the store accepts.
+
+`store-listing/generate.mjs` makes them. Run it from `frontend/` after a build:
+
+```sh
+pnpm build:toolbar-extension
+node src/toolbar/extension/store-listing/generate.mjs [path/to/unpacked/extension]
+```
+
+The path defaults to `dist/toolbar-extension/chrome`. Point it at the unzipped release build to show exactly what the store item ships.
+
+Each screenshot shows a browser window with a website on the left and the side panel on the right:
+
+- The website comes from a capture of an invented site with the page tools running. The script downloads each capture from the `PostHog/pr-assets` repository and hides the old panel in it.
+- The panel is a fresh render of the built `panel.html` with a fake `browser` API, like `ExtensionPanel.stories.tsx`. `store-listing/panelStates.mjs` holds the state of each tool, and it matches what the capture shows.
+
+To change an image:
+
+- **Headline or caption:** edit `SCREENSHOTS` in `generate.mjs`.
+- **Panel UI:** rebuild the extension and run the script again. A change to the state shape of a tool also needs an update in `panelStates.mjs`.
+- **Tile color, tagline or hedgehog:** edit `TILE_COLOR`, `TILE_TAGLINE` or the `@posthog/brand` import in `generate.mjs`.
+- **Website side:** take a new capture with the extension on the site, upload it with `hogli pr:upload-image`, and replace the `capture` URL. A capture must be 1681×864 points at 2x, with a 44-point browser bar on top and the panel in the right 401 points.
+
+Upload the new images to the store item by hand. The store doesn't take them from this folder.
+
## How the page tools work
The page tools run the floating toolbar's own logics in the content script, and draw its overlays in the content script's shadow root:
diff --git a/frontend/src/toolbar/extension/store-listing/generate.mjs b/frontend/src/toolbar/extension/store-listing/generate.mjs
new file mode 100644
index 000000000000..696f60ff668c
--- /dev/null
+++ b/frontend/src/toolbar/extension/store-listing/generate.mjs
@@ -0,0 +1,314 @@
+import { chromium } from '@playwright/test'
+import fs from 'node:fs'
+import os from 'node:os'
+import path from 'node:path'
+import { fileURLToPath, pathToFileURL } from 'node:url'
+import { createElement } from 'react'
+import { renderToStaticMarkup } from 'react-dom/server'
+
+// Renders the extension's store listing images into ./images. See "Store listing images" in ../README.md.
+import { roundHogBoldUrl, roundHogMediumUrl } from '@posthog/brand/fonts'
+import cursorHogUrl from '@posthog/brand/hoggies/png/cursor'
+import { Logo } from '@posthog/brand/logo'
+
+import { PANEL_STATES } from './panelStates.mjs'
+
+const HERE = path.dirname(fileURLToPath(import.meta.url))
+const OUT_DIR = path.join(HERE, 'images')
+const extensionDir = path.resolve(process.argv[2] ?? path.join(HERE, '../../../../dist/toolbar-extension/chrome'))
+const workDir = fs.mkdtempSync(path.join(os.tmpdir(), 'toolbar-store-listing-'))
+
+// Site captures of an invented website, taken with the built extension and the PostHog API mocked. Each one is
+// 1681x864 points at 2x: a 44-point browser bar, the site, then a 401-point side panel that the screenshots replace
+// with a fresh render of the current panel.
+const PR_ASSETS = 'https://raw.githubusercontent.com/PostHog/pr-assets'
+const SCREENSHOTS = [
+ {
+ file: 'screenshot-1-heatmaps.png',
+ tool: 'heatmap',
+ capture: `${PR_ASSETS}/27e0f0f7e953a1b8e4dc0cf1e36f8616dfcbce6a/2026/10/798494be-3d08-4f27-8098-a82a7fd43968.png`,
+ title: 'See where people click',
+ subtitle: 'Heatmaps, clickmaps and scroll depth on your live site',
+ },
+ {
+ file: 'screenshot-2-inspect.png',
+ tool: 'inspect',
+ capture: `${PR_ASSETS}/521bc21aa47401892fba163deb1b8e2cfb047340/2026/10/91795ef3-5229-4fc3-b24e-10631d9b4fb3.png`,
+ title: 'Inspect any element',
+ subtitle: 'See its selector, clicks and actions, then create an action from it',
+ },
+ {
+ file: 'screenshot-3-feature-flags.png',
+ tool: 'flags',
+ capture: `${PR_ASSETS}/08f1b71ce12c27f330166e11428a02abfa9caa30/2026/10/15f8cb5d-9725-409f-994d-53e2e57627d1.png`,
+ title: 'Override feature flags on the page',
+ subtitle: 'Try each variant and payload in your browser without changing code',
+ },
+ {
+ file: 'screenshot-4-events.png',
+ tool: 'events',
+ capture: `${PR_ASSETS}/02038f1dc6c53b4e6335a458096049efba8d98c6/2026/10/a65dd337-f722-48bf-96f8-66ad4d28427d.png`,
+ title: 'Watch events as they happen',
+ subtitle: 'Check every event and property posthog-js sends from the page',
+ },
+ {
+ file: 'screenshot-5-experiments.png',
+ tool: 'experiments',
+ capture: `${PR_ASSETS}/5032a99804a861bade3e77e0df2299d1027fe48e/2026/10/f92228c9-3e47-4f2a-b0fd-586dce8f5629.png`,
+ title: 'Build no-code experiments',
+ subtitle: 'Edit a variant and preview it on the page before you launch',
+ },
+]
+const CAPTURE = { width: 1681, siteWidth: 1279, barHeight: 44 }
+const PANEL = { width: 400, height: 820 }
+
+const TILE_COLOR = '#ff5c1c'
+const TILE_TAGLINE = 'Toolbar in<br>a side panel'
+const TILES = [
+ {
+ file: 'small-promo-tile.png',
+ width: 440,
+ height: 280,
+ logo: 190,
+ tagline: 30,
+ hog: 250,
+ hogRight: -18,
+ hogBottom: -24,
+ padLeft: 30,
+ },
+ {
+ file: 'marquee-promo-tile.png',
+ width: 1400,
+ height: 560,
+ logo: 420,
+ tagline: 66,
+ hog: 560,
+ hogRight: 230,
+ hogBottom: -40,
+ padLeft: 150,
+ },
+]
+
+// The site and the panel share one scale, so the window reads as one real browser window.
+const SCREEN = { width: 1280, height: 800, margin: 49, barHeight: 34 }
+const SCALE = (SCREEN.width - 2 * SCREEN.margin) / (CAPTURE.siteWidth + PANEL.width)
+const SITE_WIDTH = CAPTURE.siteWidth * SCALE
+const PANEL_WIDTH = PANEL.width * SCALE
+const CONTENT_HEIGHT = PANEL.height * SCALE
+const WINDOW_TOP = SCREEN.height - SCREEN.barHeight - CONTENT_HEIGHT
+
+const UI_HOST = 'https://us.posthog.com'
+const TEAM = { id: 1, project_id: 1, name: 'Trailmark website' }
+const USER = {
+ uuid: '0192f0e4-0000-7000-8000-000000000001',
+ distinct_id: 'jane-example',
+ email: '[email protected]',
+ first_name: 'Jane',
+ team: TEAM,
+ organization: { id: 'org-1', name: 'Trailmark', teams: [TEAM] },
+}
+const MIME_TYPES = {
+ '.html': 'text/html',
+ '.js': 'text/javascript',
+ '.css': 'text/css',
+ '.png': 'image/png',
+ '.svg': 'image/svg+xml',
+ '.woff2': 'font/woff2',
+}
+
+/** Runs in the panel page before its scripts. Mirrors components/panel/__mocks__/fakeExtensionBrowser.ts. */
+function installFakeBrowser({ state, uiHost }) {
+ const fakeEvent = () => ({ addListener() {}, removeListener() {} })
+ const storage = {
+ posthogUiHost: uiHost,
+ posthogToolbarTokens: { [`${uiHost}|1`]: { accessToken: 'pha_fake', refreshToken: null, clientId: 'fake' } },
+ }
+ const fakePort = () => {
+ const listeners = []
+ const send = (message) => setTimeout(() => listeners.forEach((listener) => listener(message)))
+ return {
+ name: 'posthog-toolbar-page',
+ postMessage(message) {
+ if (message?.type === 'start') {
+ send({ type: 'state', state })
+ }
+ },
+ disconnect() {},
+ onMessage: { addListener: (listener) => listeners.push(listener), removeListener() {} },
+ onDisconnect: fakeEvent(),
+ }
+ }
+ globalThis.browser = {
+ tabs: {
+ query: async () => [{ id: 1, url: 'https://www.example.com/' }],
+ create: async () => ({ id: 2 }),
+ remove: async () => undefined,
+ connect: fakePort,
+ sendMessage: async () => true,
+ onActivated: fakeEvent(),
+ onRemoved: fakeEvent(),
+ onUpdated: fakeEvent(),
+ },
+ windows: { getCurrent: async () => ({ id: 1 }) },
+ storage: {
+ local: {
+ get: async (key) => ({ [key]: storage[key] }),
+ set: async (items) => Object.assign(storage, items),
+ },
+ },
+ scripting: { executeScript: async () => [{}] },
+ runtime: { onMessage: fakeEvent(), onConnect: fakeEvent(), getURL: (file) => `/${file}` },
+ permissions: {
+ contains: async () => true,
+ request: async () => true,
+ getAll: async () => ({ origins: [] }),
+ onAdded: fakeEvent(),
+ onRemoved: fakeEvent(),
+ },
+ action: { onClicked: fakeEvent() },
+ }
+}
+
+async function renderPanel(browser, tool) {
+ const context = await browser.newContext({
+ viewport: { width: PANEL.width, height: PANEL.height },
+ deviceScaleFactor: 2,
+ colorScheme: 'light',
+ })
+ await context.route('**/*', async (route) => {
+ const url = new URL(route.request().url())
+ if (url.host === 'extension.test') {
+ const file = path.join(extensionDir, decodeURIComponent(url.pathname))
+ return fs.existsSync(file)
+ ? route.fulfill({ body: fs.readFileSync(file), contentType: MIME_TYPES[path.extname(file)] })
+ : route.fulfill({ status: 404 })
+ }
+ if (url.origin === UI_HOST && url.pathname.startsWith('/api/users/@me')) {
+ return route.fulfill({ json: USER })
+ }
+ if (url.origin === UI_HOST && url.pathname.includes('toolbar_entitlements')) {
+ return route.fulfill({ json: { entitlements: { toolbar_heatmaps: true } } })
+ }
+ if (url.origin === UI_HOST && url.pathname.startsWith('/api/organizations/')) {
+ return route.fulfill({ json: { app_urls: ['https://www.example.com'], data_attributes: ['data-attr'] } })
+ }
+ return route.fulfill({ json: {} })
+ })
+ const page = await context.newPage()
+ const errors = []
+ page.on('pageerror', (error) => errors.push(error.message))
+ await page.addInitScript(installFakeBrowser, { state: PANEL_STATES[tool], uiHost: UI_HOST })
+ await page.goto('http://extension.test/panel.html')
+ await page.waitForLoadState('networkidle')
+ const file = path.join(workDir, `panel-${tool}.png`)
+ await page.screenshot({ path: file })
+ await context.close()
+ if (errors.length) {
+ throw new Error(`The ${tool} panel threw: ${errors.join('; ')}`)
+ }
+ return file
+}
+
+async function downloadCapture(url, tool) {
+ const response = await fetch(url)
+ if (!response.ok) {
+ throw new Error(`Could not download the ${tool} capture: ${response.status} ${url}`)
+ }
+ const file = path.join(workDir, `capture-${tool}.png`)
+ fs.writeFileSync(file, Buffer.from(await response.arrayBuffer()))
+ return file
+}
+
+const fileUrl = (file) => pathToFileURL(file).href
+const svg = (props) =>
+ renderToStaticMarkup(createElement(Logo, { ...props, style: { display: 'block', width: '100%' } }))
+const baseCss = `
+@font-face { font-family: RoundHog; font-weight: 500; src: url(${roundHogMediumUrl}) format('woff2'); }
+@font-face { font-family: RoundHog; font-weight: 700; src: url(${roundHogBoldUrl}) format('woff2'); }
+* { box-sizing: border-box; margin: 0; padding: 0; }
+body { font-family: RoundHog, sans-serif; -webkit-font-smoothing: antialiased; position: relative; overflow: hidden; }
+`
+
+function screenshotHtml({ title, subtitle, captureFile, panelFile }) {
+ return `<!doctype html><html><head><style>${baseCss}
+body { width: ${SCREEN.width}px; height: ${SCREEN.height}px; background: #eeefe9; }
+.copy { position: absolute; inset: 0 0 auto; height: ${WINDOW_TOP}px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding-bottom: 6px; }
+h1 { font-size: 46px; font-weight: 700; color: #151515; letter-spacing: -0.5px; }
+p { font-size: 22px; font-weight: 500; color: #5b5d55; }
+.window { position: absolute; left: ${SCREEN.margin}px; top: ${WINDOW_TOP}px; width: ${SITE_WIDTH + PANEL_WIDTH + 2}px; height: ${SCREEN.barHeight + CONTENT_HEIGHT + 20}px; border: 1px solid #c9cbc2; border-radius: 12px 12px 0 0; overflow: hidden; background: #fff; box-shadow: 0 18px 48px rgba(40, 42, 35, 0.18), 0 2px 6px rgba(40, 42, 35, 0.08); }
+.bar { height: ${SCREEN.barHeight}px; background: #e3e4dd; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid #d3d4cc; }
+.dot { width: 11px; height: 11px; border-radius: 50%; }
+.url { margin-left: 14px; height: 22px; width: 520px; border-radius: 11px; background: #fff; font: 500 12px -apple-system, 'Helvetica Neue', sans-serif; color: #44463f; display: flex; align-items: center; padding: 0 12px; }
+.extension-icon { margin-left: auto; width: 34px; }
+.content { display: flex; }
+.site { width: ${SITE_WIDTH}px; height: ${CONTENT_HEIGHT}px; overflow: hidden; }
+.site img { display: block; width: ${CAPTURE.width * SCALE}px; margin-top: ${-CAPTURE.barHeight * SCALE}px; }
+.panel { display: block; width: ${PANEL_WIDTH}px; height: ${CONTENT_HEIGHT}px; border-left: 1px solid #d3d4cc; }
+</style></head><body>
+<div class="copy"><h1>${title}</h1><p>${subtitle}</p></div>
+<div class="window">
+ <div class="bar">
+ <span class="dot" style="background: #ff5f57"></span><span class="dot" style="background: #febc2e"></span><span class="dot" style="background: #28c840"></span>
+ <span class="url">https://www.example.com</span>
+ <span class="extension-icon">${svg({ layout: 'logomark' })}</span>
+ </div>
+ <div class="content">
+ <div class="site"><img src="${fileUrl(captureFile)}"></div>
+ <img class="panel" src="${fileUrl(panelFile)}">
+ </div>
+</div>
+</body></html>`
+}
+
+// Google asks for saturated full-bleed color, little text, and a tile that still reads at half size.
+function tileHtml(tile) {
+ return `<!doctype html><html><head><style>${baseCss}
+body { width: ${tile.width}px; height: ${tile.height}px; background: ${TILE_COLOR}; }
+.copy { position: absolute; left: ${tile.padLeft}px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; gap: ${Math.round(tile.tagline * 0.55)}px; }
+.logo { width: ${tile.logo}px; }
+.tagline { font-size: ${tile.tagline}px; font-weight: 700; color: #fff; line-height: 1.12; letter-spacing: -0.3px; }
+.hog { position: absolute; right: ${tile.hogRight}px; bottom: ${tile.hogBottom}px; width: ${tile.hog}px; height: ${tile.hog}px; }
+</style></head><body>
+<div class="copy"><div class="logo">${svg({ variant: 'mono', color: '#fff' })}</div><div class="tagline">${TILE_TAGLINE}</div></div>
+<img class="hog" src="${cursorHogUrl}">
+</body></html>`
+}
+
+async function capture(browser, { html, width, height, file }) {
+ // The store wants exact sizes in 24-bit PNG without alpha, which is what a Chromium screenshot at 1x gives.
+ const page = await browser.newPage({ viewport: { width, height }, deviceScaleFactor: 1 })
+ const htmlFile = path.join(workDir, `${path.basename(file, '.png')}.html`)
+ fs.writeFileSync(htmlFile, html)
+ await page.goto(fileUrl(htmlFile))
+ await page.evaluate(() => document.fonts.ready)
+ await page.waitForLoadState('networkidle')
+ await page.screenshot({ path: path.join(OUT_DIR, file) })
+ await page.close()
+ console.info(`Wrote ${path.relative(process.cwd(), path.join(OUT_DIR, file))}`)
+}
+
+if (!fs.existsSync(path.join(extensionDir, 'panel.html'))) {
+ throw new Error(`No built extension in ${extensionDir}. Run "pnpm build:toolbar-extension" in frontend/ first.`)
+}
+fs.mkdirSync(OUT_DIR, { recursive: true })
+const browser = await chromium.launch()
+try {
+ for (const screenshot of SCREENSHOTS) {
+ const [captureFile, panelFile] = await Promise.all([
+ downloadCapture(screenshot.capture, screenshot.tool),
+ renderPanel(browser, screenshot.tool),
+ ])
+ await capture(browser, {
+ html: screenshotHtml({ ...screenshot, captureFile, panelFile }),
+ width: SCREEN.width,
+ height: SCREEN.height,
+ file: screenshot.file,
+ })
+ }
+ for (const tile of TILES) {
+ await capture(browser, { html: tileHtml(tile), width: tile.width, height: tile.height, file: tile.file })
+ }
+} finally {
+ await browser.close()
+ fs.rmSync(workDir, { recursive: true, force: true })
+}
diff --git a/frontend/src/toolbar/extension/store-listing/images/marquee-promo-tile.png b/frontend/src/toolbar/extension/store-listing/images/marquee-promo-tile.png
new file mode 100644
index 000000000000..063979c48909
Binary files /dev/null and b/frontend/src/toolbar/extension/store-listing/images/marquee-promo-tile.png differ
diff --git a/frontend/src/toolbar/extension/store-listing/images/screenshot-1-heatmaps.png b/frontend/src/toolbar/extension/store-listing/images/screenshot-1-heatmaps.png
new file mode 100644
index 000000000000..5e9774bac56b
Binary files /dev/null and b/frontend/src/toolbar/extension/store-listing/images/screenshot-1-heatmaps.png differ
diff --git a/frontend/src/toolbar/extension/store-listing/images/screenshot-2-inspect.png b/frontend/src/toolbar/extension/store-listing/images/screenshot-2-inspect.png
new file mode 100644
index 000000000000..8b522006f9ce
Binary files /dev/null and b/frontend/src/toolbar/extension/store-listing/images/screenshot-2-inspect.png differ
diff --git a/frontend/src/toolbar/extension/store-listing/images/screenshot-3-feature-flags.png b/frontend/src/toolbar/extension/store-listing/images/screenshot-3-feature-flags.png
new file mode 100644
index 000000000000..4019966750f2
Binary files /dev/null and b/frontend/src/toolbar/extension/store-listing/images/screenshot-3-feature-flags.png differ
diff --git a/frontend/src/toolbar/extension/store-listing/images/screenshot-4-events.png b/frontend/src/toolbar/extension/store-listing/images/screenshot-4-events.png
new file mode 100644
index 000000000000..484598f4da42
Binary files /dev/null and b/frontend/src/toolbar/extension/store-listing/images/screenshot-4-events.png differ
diff --git a/frontend/src/toolbar/extension/store-listing/images/screenshot-5-experiments.png b/frontend/src/toolbar/extension/store-listing/images/screenshot-5-experiments.png
new file mode 100644
index 000000000000..302d01c65baf
Binary files /dev/null and b/frontend/src/toolbar/extension/store-listing/images/screenshot-5-experiments.png differ
diff --git a/frontend/src/toolbar/extension/store-listing/images/small-promo-tile.png b/frontend/src/toolbar/extension/store-listing/images/small-promo-tile.png
new file mode 100644
index 000000000000..5f0f5d71beef
Binary files /dev/null and b/frontend/src/toolbar/extension/store-listing/images/small-promo-tile.png differ
diff --git a/frontend/src/toolbar/extension/store-listing/panelStates.mjs b/frontend/src/toolbar/extension/store-listing/panelStates.mjs
new file mode 100644
index 000000000000..27ffe631d114
--- /dev/null
+++ b/frontend/src/toolbar/extension/store-listing/panelStates.mjs
@@ -0,0 +1,240 @@
+// The page state the content script would send to the side panel, one per screenshot. It matches what each site capture shows.
+const PAGE_URL = 'https://www.example.com/'
+
+const base = {
+ mode: 'none',
+ inspect: { element: null, isSelected: false },
+ selectorCounts: {},
+ heatmap: {
+ wildcardHref: PAGE_URL,
+ autoWildcardEnabled: false,
+ wildcardHrefTooSpecific: false,
+ wildcardHrefEndsWithSlash: true,
+ commonFilters: { date_from: '-7d' },
+ heatmapFilters: { enabled: true, type: 'click', viewportAccuracy: 0.9, aggregation: 'total_count' },
+ heatmapColorPalette: 'default',
+ heatmapFixedPositionMode: 'fixed',
+ viewportRange: { min: 1152, max: 1408 },
+ rawHeatmapLoading: false,
+ heatmapsCollection: 'enabled',
+ scrollDepthPosthogJsError: null,
+ clickmapsEnabled: true,
+ clickmapLoading: false,
+ processingProgress: null,
+ matchLinksByHref: true,
+ countedElements: [
+ { text: 'Start free trial', tagName: 'a', count: 1280 },
+ { text: 'Book a demo', tagName: 'a', count: 613 },
+ { text: 'Pricing', tagName: 'a', count: 402 },
+ { text: 'Features', tagName: 'a', count: 188 },
+ { text: 'Log in', tagName: 'a', count: 96 },
+ ],
+ clickCount: 2579,
+ canLoadMoreElementStats: false,
+ loadedElementStatsCount: 5,
+ loadingAllElementStats: false,
+ areaSelectionActive: false,
+ areaFilter: null,
+ savingHeatmap: false,
+ saveProgress: null,
+ saveResult: null,
+ },
+ actions: {
+ allActionsLoading: false,
+ actions: [
+ { id: 1, name: 'Started a free trial' },
+ { id: 2, name: 'Booked a demo' },
+ { id: 3, name: 'Viewed pricing' },
+ ],
+ selectedActionId: null,
+ actionForm: { name: null, steps: [{}] },
+ formRevision: 0,
+ actionFormElementsChains: {},
+ inspectingElement: null,
+ saving: false,
+ saveResult: null,
+ },
+ flags: {
+ available: true,
+ loading: false,
+ flags: [
+ {
+ key: 'launch-banner',
+ id: 11,
+ value: false,
+ currentValue: true,
+ hasOverride: true,
+ variants: [],
+ payloadOverride: { message: 'Trailmark 2.0: plan a sprint from a template' },
+ },
+ {
+ key: 'hero-copy',
+ id: 12,
+ value: 'control',
+ currentValue: 'bold',
+ hasOverride: true,
+ variants: [
+ { key: 'control', name: 'Current copy', rolloutPercentage: 50 },
+ { key: 'bold', name: 'Shorter headline', rolloutPercentage: 50 },
+ ],
+ payloadOverride: undefined,
+ },
+ {
+ key: 'new-onboarding',
+ id: 13,
+ value: true,
+ currentValue: true,
+ hasOverride: false,
+ variants: [],
+ payloadOverride: undefined,
+ },
+ {
+ key: 'pricing-layout',
+ id: 14,
+ value: false,
+ currentValue: false,
+ hasOverride: false,
+ variants: [],
+ payloadOverride: undefined,
+ },
+ ],
+ countFlagsOverridden: 2,
+ impersonatedDistinctId: null,
+ payloadErrors: {},
+ mutationPending: false,
+ mutationError: null,
+ mutationRevision: 0,
+ },
+ events: {
+ available: true,
+ selectedEventTypes: ['posthog', 'custom'],
+ hidePostHogProperties: false,
+ hidePostHogFlags: false,
+ relativeTimestamps: false,
+ isPaused: false,
+ bufferedCount: 0,
+ totalCount: 4,
+ filteredCount: 4,
+ countsByType: { posthog: 2, custom: 2, snapshot: 0 },
+ rows: [
+ { uuid: 'e4', event: 'demo_booked', timestamp: '2026-01-15T17:30:27.528Z', pinned: false },
+ { uuid: 'e3', event: 'plan_selected', timestamp: '2026-01-15T17:30:21.114Z', pinned: false },
+ { uuid: 'e2', event: '$autocapture', timestamp: '2026-01-15T17:30:20.902Z', pinned: false },
+ { uuid: 'e1', event: '$pageview', timestamp: '2026-01-15T17:30:02.311Z', pinned: false },
+ ],
+ expandedEventId: 'e3',
+ expandedProperties: {
+ $active_feature_flags: ['new-onboarding'],
+ $browser: 'Chrome',
+ $current_url: PAGE_URL,
+ distinct_id: '0192f0e4-visitor-example',
+ '$feature/new-onboarding': true,
+ $lib: 'web',
+ $os: 'Mac OS X',
+ $pathname: '/',
+ billing: 'monthly',
+ plan: 'team',
+ seats: 6,
+ },
+ expandedEventPayload: { event: 'plan_selected', properties: { plan: 'team', seats: 6, billing: 'monthly' } },
+ },
+ webVitals: {
+ autocaptureEnabled: true,
+ pathname: '/',
+ localWebVitals: { FCP: 812, LCP: 1640, INP: 96, CLS: 0.04 },
+ remoteWebVitals: { FCP: 1210, LCP: 2380, INP: 180, CLS: 0.08 },
+ },
+ experiments: {
+ loading: false,
+ experiments: [
+ { id: 21, name: 'Shorter hero headline' },
+ { id: 22, name: 'Demo button copy' },
+ ],
+ webExperimentsDisabled: false,
+ selectedExperimentId: null,
+ experimentForm: { name: '', variants: {} },
+ formRevision: 0,
+ selectedVariant: '',
+ selectedElementType: 'all-elements',
+ inspectingElement: null,
+ addVariantAvailable: true,
+ removeVariantAvailable: false,
+ saving: false,
+ saveResult: null,
+ },
+ more: {
+ debugInfo: {
+ version: '1.300.0',
+ apiHost: 'https://us.i.posthog.com',
+ uiHost: null,
+ autocapture: true,
+ rageclicks: true,
+ deadClicks: true,
+ heatmaps: true,
+ sessionRecordingStarted: true,
+ sessionRecordingStatus: 'active',
+ sessionReplayUrl: 'https://us.posthog.com/project/1/replay/session-1',
+ surveysCount: 2,
+ },
+ debugInfoLoading: false,
+ piiMaskingEnabled: false,
+ piiMaskingColor: '#cccccc',
+ piiWarnings: [],
+ screenshot: {
+ taking: false,
+ open: false,
+ eventName: '',
+ suggestions: [],
+ suggestionsLoading: false,
+ selectedEventId: null,
+ uploading: false,
+ result: null,
+ },
+ },
+}
+
+export const PANEL_STATES = {
+ heatmap: { ...base, mode: 'heatmap' },
+ inspect: {
+ ...base,
+ mode: 'inspect',
+ inspect: {
+ isSelected: true,
+ element: {
+ tagName: 'a',
+ actionStep: {
+ event: '$autocapture',
+ tag_name: 'a',
+ text: 'Start free trial',
+ selector: '[data-attr="hero-signup"]',
+ href: '/signup',
+ url: PAGE_URL,
+ },
+ stats: { count: 1312, clickCount: 1280, rageclickCount: 14, deadclickCount: 6, rank: 1 },
+ actions: [{ id: 1, name: 'Started a free trial' }],
+ },
+ },
+ },
+ flags: { ...base, mode: 'flags' },
+ events: { ...base, mode: 'events' },
+ experiments: {
+ ...base,
+ mode: 'experiments',
+ experiments: {
+ ...base.experiments,
+ selectedExperimentId: 21,
+ selectedVariant: 'short-headline',
+ experimentForm: {
+ name: 'Shorter hero headline',
+ variants: {
+ control: { transforms: [], conditions: null, rollout_percentage: 50 },
+ 'short-headline': {
+ transforms: [{ selector: '.hero h1', html: 'Plan less. Ship more.', css: '' }],
+ conditions: null,
+ rollout_percentage: 50,
+ },
+ },
+ },
+ },
+ },
+}