Repository navigation
feat(toolbar): add events, vitals, more and experiments to the side panel - #121480
trunk-io[bot] merged 4 commits into
Conversation
🤖 CI report🚨 Trunk lane — universal laneThis PR is assigned to the universal lane. It cannot merge in parallel with other PRs, so it can take longer to merge. Ask dev-ex if you think this is wrong.
|
| Function | Location | Complexity | Limit |
|---|---|---|---|
Toolbar |
frontend/src/toolbar/bar/Toolbar.tsx:479 |
31 | 10 |
ToolbarInfoMenu |
frontend/src/toolbar/bar/Toolbar.tsx:370 |
24 | 10 |
ExtensionEventsMenu |
frontend/src/toolbar/extension/ExtensionEventsMenu.tsx:31 |
19 | 10 |
iframeEventListener |
frontend/src/toolbar/bar/toolbarLogic.ts:1010 |
16 | 10 |
EventDebugMenu |
frontend/src/toolbar/debug/EventDebugMenu.tsx:45 |
16 | 10 |
handleCommand |
frontend/src/toolbar/extension/extensionPageExperimentsLogic.ts:280 |
15 | 10 |
run |
frontend/src/toolbar/extension/pageAgent.ts:156 |
14 | 10 |
inspectElementSelected |
frontend/src/toolbar/experiments/experimentsTabLogic.tsx:522 |
13 | 10 |
ExtensionScreenshotForEvent |
frontend/src/toolbar/extension/ExtensionScreenshotForEvent.tsx:13 |
13 | 10 |
setMode |
frontend/src/toolbar/extension/extensionPageToolbarLogic.ts:224 |
13 | 10 |
setVisibleMenu |
frontend/src/toolbar/bar/toolbarLogic.ts:765 |
11 | 10 |
ExtensionExperimentEditor |
frontend/src/toolbar/extension/ExtensionExperimentEditor.tsx:26 |
11 | 10 |
ToolBody |
frontend/src/toolbar/extension/ExtensionPageToolbarTools.tsx:28 |
11 | 10 |
handleCommand |
frontend/src/toolbar/extension/extensionPageEventsLogic.ts:237 |
11 | 10 |
✅ Duplication (Python) — clean
New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.
✅ Duplication (TypeScript) — clean
New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.
⚠️ Comment density — 3% of added code lines are comments (115 of 3483)
This section warns when comments are more than 3% of the code lines a PR adds, and alerts above 6%. Before agent-assisted PRs, the typical share was about 2%. Only full-line comments count. Docstrings, generated files, snapshots, migrations, and workflow files are left out.
Comments that restate the code, record how the change came about, or narrate the next line add noise for the next reader. Keep the comments that explain a reason the code cannot show, and remove the rest. See .agents/skills/writing-code-comments/SKILL.md for the house rules.
Files with the most added comment lines:
| File | Comment lines | Added lines |
|---|---|---|
frontend/src/toolbar/extension/pageToolbarBridge.ts |
14 | 115 |
frontend/src/toolbar/extension/extensionExperimentsLogic.ts |
11 | 258 |
frontend/src/toolbar/extension/extensionPageEventsLogic.ts |
9 | 268 |
frontend/src/toolbar/extension/extensionPageExperimentsLogic.ts |
9 | 330 |
frontend/src/toolbar/extension/extensionPageMoreLogic.ts |
9 | 364 |
frontend/src/toolbar/experiments/webExperimentEditorContext.ts |
8 | 43 |
frontend/src/toolbar/actions/SelectorCountContext.ts |
5 | 20 |
frontend/src/toolbar/experiments/experimentsTabLogic.tsx |
5 | 46 |
This check does not block merging. It updates on every push and clears when the share drops.
⚠️ Bundle size — 🔺 +1.7 KiB (+0.0%)
Uncompressed size of every built .js bundle, compared against the base branch.
Total: 77.11 MiB · 🔺 +1.7 KiB (+0.0%)
No file changed by more than 1000 B.
Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report
⚠️ Eager graph — 3 over budget
How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.
| Root | Eager (shipped) | Δ vs base | Budget |
|---|---|---|---|
entry (logged-out pages, app bootstrap)src/index.tsx |
1.01 MiB · 25 files | no change | █████████░ 88.1% of 1.14 MiB |
logged-out boot: index + App + bootApp (preloaded by every page, including /login)src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts |
2.97 MiB · 621 files | no change | ██████████ 97.9% of 3.03 MiB |
🟡 authenticated shell (every logged-in page)src/scenes/AuthenticatedShell.tsx |
7.58 MiB · 2,566 files | no change | ██████████ 101.1% of 7.50 MiB |
dashboard scenesrc/scenes/dashboard/Dashboard.tsx |
9.95 MiB · 3,731 files | no change | ██████████ 99.3% of 10.01 MiB |
🟡 today home pathsrc/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx |
7.76 MiB · 2,659 files | no change | ██████████ 100.3% of 7.74 MiB |
🟡 AI-first home pathsrc/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx |
8.01 MiB · 2,652 files | no change | ██████████ 101.3% of 7.91 MiB |
events scenesrc/scenes/activity/explore/EventsScene.tsx |
9.39 MiB · 3,512 files | no change | ██████████ 97.9% of 9.59 MiB |
web analytics scenesrc/scenes/web-analytics/WebAnalyticsScene.tsx |
10.33 MiB · 3,764 files | no change | ██████████ 95.3% of 10.83 MiB |
replay detail scenesrc/scenes/session-recordings/detail/SessionRecordingDetail.tsx |
8.41 MiB · 3,088 files | no change | █████████░ 88.8% of 9.47 MiB |
🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/index.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/layout/navigation-3000/navigationLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/dashboard/dashboardLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/lemon-ui/LemonMarkdown/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/RichContentEditor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/CodeSnippet/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/zod/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/billing/billingLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/ProductEmptyState/productSetupPreloadLogic.ts stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/dashboards/frontend/widgets/previews/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 products/wizard/frontend/runs/WizardRunDetailsDrawer.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayShell.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayContextPanelFloating.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodaySidePanel.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/TodayTopBar.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/layout/today/todayRailItems.tsx stays out of src/scenes/AuthenticatedShell.tsx
🟢 zod/v4/locales/de.js stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/svg/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 node_modules/@posthog/brand/dist/generated/hoggies/components/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/queries/validators.js stays out of src/scenes/dashboard/Dashboard.tsx
🟢 src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/scenes/project-homepage/today/TodayReportPage.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 packages/quill/packages/charts/ stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/VisualizationWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/components/tool/widgets/RecordingsWidget.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/queries/Query/Query.tsx stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 products/posthog_ai/frontend/api/primitives.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/scenes/notebooks/Notebook/notebookLogic.ts stays out of src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
🟢 src/scenes/session-recordings/playlist/SessionRecordingsPlaylist.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/queries/validators.js stays out of src/scenes/activity/explore/EventsScene.tsx
🟢 src/scenes/web-analytics/LiveMetricsDashboard/LiveWebAnalyticsMetrics.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 products/product_analytics/frontend/insights/trends/WorldMap/countryVectors.tsx stays out of src/scenes/web-analytics/WebAnalyticsScene.tsx
🟢 src/scenes/settings/SettingsMap.tsx stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
🟢 @jspm/core/nodelibs/browser/fs stays out of src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
Largest files eagerly shipped from src/index.tsx
| Size | File |
|---|---|
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 24.6 KiB | ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js |
| 6.3 KiB | ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js |
| 4.7 KiB | ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js |
| 4.0 KiB | ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js |
| 1.7 KiB | ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js |
| 1.7 KiB | src/index.tsx |
| 1.6 KiB | src/lib/utils/bootTiming.ts |
| 1.2 KiB | src/RootErrorBoundary.tsx |
| 949 B | src/scenes/ChunkLoadErrorBoundary.tsx |
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
| Size | File |
|---|---|
| 322.9 KiB | ../node_modules/.pnpm/posthog-js@1.438.23_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 217.5 KiB | ../node_modules/.pnpm/@posthog+icons@0.39.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 86.2 KiB | src/lib/api.ts |
| 68.3 KiB | src/lib/lemon-ui/icons/icons.tsx |
| 41.9 KiB | ../node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js |
| 36.4 KiB | ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js |
| 27.0 KiB | ../node_modules/.pnpm/tailwind-merge@2.2.2/node_modules/tailwind-merge/dist/bundle-mjs.mjs |
| 24.6 KiB | ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
| Size | File |
|---|---|
| 322.9 KiB | ../node_modules/.pnpm/posthog-js@1.438.23_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@posthog+icons@0.39.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 86.2 KiB | src/lib/api.ts |
Largest files eagerly shipped from src/scenes/dashboard/Dashboard.tsx
| Size | File |
|---|---|
| 322.9 KiB | ../node_modules/.pnpm/posthog-js@1.438.23_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@posthog+icons@0.39.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 144.1 KiB | ../packages/quill/packages/primitives/dist/index.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
| Size | File |
|---|---|
| 322.9 KiB | ../node_modules/.pnpm/posthog-js@1.438.23_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@posthog+icons@0.39.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 86.2 KiB | src/lib/api.ts |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/ai-first/AiFirstHomepage.tsx
| Size | File |
|---|---|
| 322.9 KiB | ../node_modules/.pnpm/posthog-js@1.438.23_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@posthog+icons@0.39.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 144.1 KiB | ../packages/quill/packages/primitives/dist/index.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
Largest files eagerly shipped from src/scenes/activity/explore/EventsScene.tsx
| Size | File |
|---|---|
| 322.9 KiB | ../node_modules/.pnpm/posthog-js@1.438.23_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@posthog+icons@0.39.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 144.1 KiB | ../packages/quill/packages/primitives/dist/index.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
Largest files eagerly shipped from src/scenes/web-analytics/WebAnalyticsScene.tsx
| Size | File |
|---|---|
| 322.9 KiB | ../node_modules/.pnpm/posthog-js@1.438.23_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@posthog+icons@0.39.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 182.9 KiB | src/queries/validators.js |
| 153.8 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 144.1 KiB | ../packages/quill/packages/primitives/dist/index.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
| Size | File |
|---|---|
| 322.9 KiB | ../node_modules/.pnpm/posthog-js@1.438.23_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 316.1 KiB | ../node_modules/.pnpm/posthog-js@1.438.23_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js |
| 286.4 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 239.9 KiB | ../packages/quill/packages/quill/dist/index.js |
| 217.5 KiB | ../node_modules/.pnpm/@posthog+icons@0.39.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.8 KiB | ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js |
| 126.8 KiB | ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js |
| 102.1 KiB | src/products.tsx |
| 94.5 KiB | ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js |
| 92.5 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479
✅ Toolbar bundle — eager 2.30 MiB within budget
What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.
| Metric | Size | Δ vs base | Budget |
|---|---|---|---|
| Eager (shipped) entry + static imports |
2.30 MiB · 18 files | 🔺 +699 B (+0.0%) | ████░░░░░░ 40.3% of 5.72 MiB |
| Deferred (lazy) | 2.11 MiB · 40 files | 🔺 +1.1 KiB (+0.1%) | n/a — loads on demand |
Loader dist/toolbar.js |
1.2 KiB | no change | █░░░░░░░░░ 6.0% of 19.5 KiB |
Largest eagerly-shipped chunks
| Size | File |
|---|---|
| 914.6 KiB | dist/toolbar/toolbar-app-YBVNN4Q2.css |
| 695.4 KiB | dist/toolbar/chunk-chunk-JXHLL4XQ.js |
| 260.0 KiB | dist/toolbar/chunk-chunk-WXVSJG6X.js |
| 131.8 KiB | dist/toolbar/chunk-chunk-FDH2IBXT.js |
| 130.4 KiB | dist/toolbar/chunk-chunk-LPBNVREQ.js |
| 75.6 KiB | dist/toolbar/toolbar-app-SI5TXLK3.js |
| 69.0 KiB | dist/toolbar/chunk-chunk-TSAL54PB.js |
| 35.6 KiB | dist/toolbar/chunk-chunk-ZIESNPDZ.js |
| 21.7 KiB | dist/toolbar/chunk-chunk-O7M5PFP7.js |
| 6.8 KiB | dist/toolbar/chunk-chunk-DV7IWQNF.js |
Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile
✅ Dist folder size — 🔺 +14.3 KiB (+0.0%)
Total size of the built frontend/dist folder (all assets), compared against the base branch.
Total: 971.13 MiB · 🔺 +14.3 KiB (+0.0%)
✅ Hogbox preview — ready, open the preview
▶ Open the preview
| 🔑 Login | test@posthog.com / 12345678 (demo data) |
| 🧩 Running | this PR's backend and frontend, on the PostHog :master base |
| 🔗 Link | stable across rebuilds: a re-push swaps the box underneath, the URL stays |
| 🔒 Access | tailnet only (PostHog VPN) |
| 🛠️ Admin | inspect & debug state in hogland |
| 💤 Idle | sleeps after ~30 min idle (snapshot to S3, zero node cost) and wakes on your next visit in ~30s, behind a brief "waking up" screen |
commit 97b113e · box box-a18947dc804a · ready in 1088s (push → usable) · build log · rebuilds on every push, torn down on close
|
Risk: No findings This increment wires the web-experiments editor into the extension side panel: the panel edits a copy of the experiment form, commands flow to the page over the extension port, and the page previews variants. The command channel stays extension-only (the page cannot reach it), page-sourced state is rendered only as escaped text, and all HTML/CSS applied to the page goes through the existing sanitizers, so no new attack surface is introduced. Sentinel reviewed |
There was a problem hiding this comment.
PostHog Review · Standard · reviewed dc016e1: 8 Should fix. This pull request is large, so the review ran in 4 parts with less depth than usual.
This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.
| openWebVitals: () => { | ||
| if (!webVitalsToolbarLogic.findMounted()) { | ||
| webVitalsToolbarLogic.mount() | ||
| } |
There was a problem hiding this comment.
P2 · Start collecting web vitals before the tool opens
When the page emits $web_vitals before the user opens this tool, webVitalsToolbarLogic has no listener yet and permanently misses those measurements. Opening the tool leaves the affected local metric cards spinning, and Reload only fetches remote metrics. Mount the collector when the page tools start, as ToolbarApp already does.
| const next: PageToolbarWebVitalsState = { | ||
| autocaptureEnabled: !!posthog?.webVitalsAutocapture?.isEnabled, | ||
| pathname: window.location.pathname, | ||
| localWebVitals: webVitals?.localWebVitals ?? NO_WEB_VITALS, | ||
| remoteWebVitals: webVitals?.remoteWebVitals ?? NO_WEB_VITALS, |
There was a problem hiding this comment.
P2 · Refresh web vitals when the page path changes
After an SPA navigates with pushState, this state labels retained metrics with the new pathname. The extension forwards navigation to currentPageLogic.setHref, but webVitalsToolbarLogic resets and fetches through urlToAction; pushState emits no popstate. Wire page URL changes to reset local metrics and fetch the new path's remote metrics.
| reducers({ | ||
| // The page filters with the search a moment later, so the input keeps what the user typed meanwhile. | ||
| searchText: ['', { setSearchText: (_, { searchText }) => searchText }], |
There was a problem hiding this comment.
P2 · Restore the page's search when reopening Events
After filtering Events, switching to another tool and reopening Events remounts extensionEventsLogic with an empty searchText. The page keeps eventDebugMenuLogic mounted with the previous filter, so the list remains filtered while the input appears empty. Include the page's search in its state and restore the input when the panel logic mounts.
| uploadScreenshot: () => { | ||
| actions.sendMoreCommand({ type: 'upload-screenshot' }) | ||
| capturePageToolUsed('screenshot-for-event') |
There was a problem hiding this comment.
P2 · Block duplicate screenshot commands before the page acknowledges them
Clicking Upload twice before the page's throttled state update sends two upload-screenshot commands. submitUpload starts both media uploads before its first breakpoint, leaving the superseded upload unattached and wasting bandwidth and storage. The remote screenshot.uploading flag cannot close this window; set and guard pending state locally when dispatching.
| <LemonButton | ||
| size="small" | ||
| type="secondary" | ||
| icon={<IconRefresh />} | ||
| onClick={() => sendCommand({ tool: 'web-vitals', command: { type: 'reload-web-vitals' } })} | ||
| data-attr="toolbar-extension-web-vitals-reload" |
There was a problem hiding this comment.
P2 · Disable web vitals reload while a request is running
When web vitals requests are slow, Reload stays enabled and every click starts another getWebVitals request. The loader checks its breakpoint only after the HTTP request completes, so superseded requests continue consuming network and server resources. Forward remoteWebVitalsLoading through the bridge and disable Reload while the request runs.
| expandedEventId: expandedEvent ?? null, | ||
| expandedProperties: open && !Array.isArray(expandedProperties) ? expandedProperties : {}, | ||
| expandedEventPayload, |
There was a problem hiding this comment.
P2 · Send expanded event payloads separately from streaming row updates
With a large $snapshot expanded, each incoming event changes pageState, so PageToolbarHost retransmits the unchanged recording payload up to ten times per second. Both expandedProperties and expandedEventPayload contain its properties, multiplying serialization and panel rendering costs. Send expanded details separately when the selection changes.
| if (!webVitalsToolbarLogic.findMounted()) { | ||
| webVitalsToolbarLogic.mount() |
There was a problem hiding this comment.
P2 · Unmount the web vitals router before resetting the context
Opening Web vitals permanently mounts webVitalsToolbarLogic and its router connection. When the panel closes long enough for PageToolbarHost.stop(), resetting the context leaves the router's popstate listener attached because its cleanup runs only on unmount. Reopening accumulates listeners and duplicate navigation dispatches; explicitly tear down these mounts before resetting.
| if (reply.kind === 'event-captured') { | ||
| for (const callback of this.eventCapturedCallbacks) { | ||
| callback(reply.event) |
There was a problem hiding this comment.
P2 · Validate captured event payloads at the page boundary
Any script on the inspected page can forge an event-captured reply through window.postMessage. A payload such as { event: null } passes directly into eventDebugMenuLogic; classifyEvent then throws on startsWith, blocking toolbar state generation while the poisoned event remains stored. Validate the event schema before invoking callbacks.
| listeners(({ actions }) => ({ | ||
| sendMoreCommand: ({ command }) => actions.sendCommand({ tool: 'more', command }), | ||
| openSessionRecording: ({ url }) => { | ||
| void openTab(url) |
There was a problem hiding this comment.
Low: Page-supplied URL passed to tabs.create without a scheme check
url here is debugInfo.sessionReplayUrl, which the page agent reads from the page's own window.posthog.get_session_replay_url(). Any script on the page can override that to return an arbitrary string, and the extension then opens it with tabs.create when the user clicks "View current session recording". Browsers reject javascript: there, but Chrome does allow chrome:// pages (which web content can't navigate to itself) and any http(s) URL, so a page can make the extension's trusted UI open an attacker-chosen page. The floating toolbar's Link already filters this; the panel path should at least restrict to http(s), ideally to the configured UI host.
| void openTab(url) | |
| if (/^https?:\/\//i.test(url)) { | |
| void openTab(url) | |
| } |
PR overviewThe PR adds events, web vitals, and additional tools to the toolbar side panel, including an action to open the current session recording. One issue remains open, with none addressed so far: the session-recording action opens a page-supplied URL without checking its scheme. If a page script overrides that URL, a user clicking the action can be sent to an attacker-chosen website or a Chrome internal page. The impact is limited to user-triggered navigation; browsers reject javascript: URLs in this API. Open issues (1)
Fixed/addressed: 0 · PR risk: 4/10 |
dc016e1 to
7411919
Compare
|
7411919 to
d043bfb
Compare
|
Stacked PR 121483 was cancelled: the stack changed after it was queued. |
| case 'set-experiment-form': | ||
| tab.setExperimentFormValues(command.form) | ||
| // Shows the edited HTML and CSS on the page as the user types. | ||
| tab.applyVariant(values.selectedVariant) |
There was a problem hiding this comment.
P2 · Apply experiment previews only when their transforms change
Editing an experiment's name sends set-experiment-form, which unconditionally calls applyVariant. That restores every saved subtree and reapplies all selected transforms, repeating sanitization and DOM replacement despite unchanged preview content. On large targets this causes unnecessary layout work and resets live DOM state; skip preview application for metadata-only edits.
There was a problem hiding this comment.
Not approved yet — waiting on the conditions below.
Re-add the stamphog label to request another review once you have addressed this.
The size gate refused this pull request: it changes 4316 substantive lines across 53 files, and the ceiling for auto-review is 800 lines (4435 lines across 59 files once docs, generated files and snapshots are counted). The other gates passed, but this one alone is enough to stop it, and stamphog won't review it.
The simplest way forward is to split it into smaller pull requests. The description already suggests natural seams: the events, web vitals and "more" menu work, the web experiments editor, and the mechanical moves of shared components and helpers out of the toolbar. Each could go up on its own. If splitting isn't practical, ask a human reviewer to look at it directly.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✗ | too large for auto-review (4316L substantive in global — ceiling is 800L; 4316L, 53F total, 4435L/59F incl. docs/generated/snapshots) |
| tier | ✓ | T1-agent / T1d-complex (4435L, 59F, single-area, feat) |
| stamphog 2.6.1 | .stamphog/policy.yml @ unknown · reviewed head 05cedbd |
Screen.Recording.2026-10-27.at.08.57.15.movscreenshot upload feature is broken |
fercgomes
left a comment
There was a problem hiding this comment.
fixing the screenshot upload bug and this should be good
|
This looks really nice! |
05cedbd to
1adafc5
Compare
|
Stacked PR 123749 was cancelled: it waited too long to become mergeable. |
- Events: the toolbar's event debugger runs in the content script, fed by the page agent's eventCaptured forwarding. The panel shows the newest 200 filtered rows with search, type filters, the hide toggles, pinning, pause, clear, export and the open event's properties. - Web vitals: the toolbar's web vitals logic runs in the page, with the project's P90 metrics and the page load's $web_vitals. - More: debug info read from the page's posthog-js, the current session recording link, the PII masking preview and screenshots for events. - The panel follows the browser's dark mode. - Mechanical: EventRow, the debugger's menu items, the JSON export, WebVitalsReport and the PII masking warnings move out of their toolbar components, and screenshots skip the extension's overlay root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The side panel lists the project's web experiments, creates and edits them, and previews each variant on the page. The content script runs the toolbar's experimentsLogic and experimentsTabLogic, so picking an element, the HTML sanitization and the transforms match the floating toolbar. The page goes back to its original state when the user leaves an experiment, saves it, or closes the tool. A page whose snippet sets disable_web_experiments shows the toolbar's warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s editor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…typegen kea-typegen prints the connected selectedExperimentId type without its 'new' literal, so the regenerated inline types didn't parse. Read the value through experimentsTabLogic's selector instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1adafc5 to
8fed4a4
Compare
|
This pull request was merged into |
Problem
Changes
Events, web vitals and more
/regex/, the PostHog, custom and replay filters, the hide toggles, pinning, pause, clear and export, and each event's properties.new Functionthrough pixi.js, which Manifest V3 extension code can't run.$snapshotpayloads only when the replay filter is on.WebVitalsReport,readPosthogDebugInfoand the PII masking stylesheet helpers move out of the toolbar components. The floating toolbar and the panel both use them.Web experiments
disable_web_experimentsshows the toolbar's warning.experimentsTabLogic:WebExperimentVariant, its header, the transform field and header, andSelectorEditor) now take values and callbacks. The floating toolbar and the panel both drive them.How did you test this code?
Events, web vitals and more:
Web experiments:
Test rationale:
Events, web vitals and more:
pagePosthogBridge.test.tschecks that a debug info request ends when the page has no posthog-js. Without that check the request hangs until the timeout.Web experiments:
experimentsTabLogic.test.tscovers each toolbar regression on the floating toolbar:Release status
Docs update
The extension README and
TELEMETRY.mdcover the new tools and experiments.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5 (
claude-opus-5-5)/simplifypass made the toolbar's components shared instead./simplifyand/code-reviewran over the whole stack./writing-ui-components,/writing-kea-logics,/writing-tests,/writing-user-facing-copy.🤖 Generated with Claude Code