Repository navigation
feat(workflows): let other products open a broadcast or workflow for an audience - #112985
Conversation
|
😎 Merged successfully - details. |
🤖 CI report✅ Trunk lane — non-backend lane (
|
| Function | Location | Complexity | Limit |
|---|---|---|---|
WorkflowSceneHeader |
products/workflows/frontend/Workflows/WorkflowSceneHeader.tsx:35 |
38 | 10 |
toAudienceFilter |
products/workflows/frontend/Broadcasts/broadcastAudiencePrefill.ts:55 |
25 | 10 |
launchBroadcast |
products/workflows/frontend/Broadcasts/broadcastWizardLogic.ts:1459 |
25 | 10 |
WorkflowScene |
products/workflows/frontend/Workflows/WorkflowScene.tsx:60 |
23 | 10 |
<anonymous> |
products/workflows/frontend/Broadcasts/broadcastWizardLogic.ts:986 |
22 | 10 |
<anonymous> |
products/workflows/frontend/Broadcasts/broadcastWizardLogic.ts:1738 |
15 | 10 |
snapshotBroadcast |
products/workflows/frontend/Broadcasts/broadcastUsage.ts:63 |
14 | 10 |
setEmail |
products/workflows/frontend/Broadcasts/broadcastWizardLogic.ts:1245 |
12 | 10 |
saveName |
products/workflows/frontend/Broadcasts/broadcastWizardLogic.ts:1301 |
11 | 10 |
moveToDraft |
products/workflows/frontend/Broadcasts/broadcastWizardLogic.ts:1626 |
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 — 4% of added code lines are comments (16 of 439)
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 |
|---|---|---|
products/workflows/frontend/Broadcasts/broadcastAudiencePrefill.ts |
5 | 87 |
products/workflows/frontend/Broadcasts/broadcastWizardLogic.ts |
4 | 88 |
products/workflows/frontend/Broadcasts/broadcastUsage.ts |
3 | 24 |
products/workflows/frontend/MessageAudience/messageAudience.ts |
2 | 39 |
products/workflows/frontend/Workflows/workflowTriggerPrefill.ts |
2 | 14 |
This check does not block merging. It updates on every push and clears when the share drops.
⚠️ Bundle size — 🔺 +64.6 KiB (+0.1%)
Uncompressed size of every built .js bundle, compared against the base branch.
Total: 76.45 MiB · 🔺 +64.6 KiB (+0.1%)
| File | Size | Δ vs base |
|---|---|---|
render-query/src/render-query/render-query.js |
25.51 MiB | 🔺 +31.7 KiB (+0.1%) |
posthog-app/_parent/products/business_intelligence/frontend/BusinessIntelligenceScene.js |
96.7 KiB | 🔺 +14.5 KiB (+17.7%) |
posthog-app/src/scenes/saved-insights/SavedInsights.js |
106.0 KiB | 🔺 +13.4 KiB (+14.4%) |
posthog-app/_parent/products/metrics/frontend/MetricsScene.js |
31.6 KiB | 🟢 -8.1 KiB (-20.5%) |
posthog-app/_parent/products/business_intelligence/frontend/BIWorksheetsScene.js |
7.7 KiB | 🔺 +7.7 KiB (new) |
posthog-app/src/scenes/insights/InsightScene.js |
53.7 KiB | 🔺 +4.0 KiB (+8.0%) |
posthog-app/src/layout/today/TodayProductsSidebar.js |
3.9 KiB | 🔺 +3.9 KiB (new) |
posthog-app/_parent/products/alerts/frontend/views/InsightAlerts.js |
13.3 KiB | 🔺 +3.3 KiB (+33.4%) |
posthog-app/src/layout/today/TodayToolsSidebar.js |
removed | 🟢 -3.1 KiB (-100.0%) |
posthog-app/src/layout/today/TodayLibrarySidebar.js |
removed | 🟢 -2.4 KiB (-100.0%) |
posthog-app/_parent/products/managed_migrations/frontend/ManagedMigration.js |
31.1 KiB | 🔺 +2.0 KiB (+7.0%) |
posthog-app/src/layout/today/TodayMoreSidebar.js |
removed | 🟢 -2.0 KiB (-100.0%) |
posthog-app/_parent/products/autoresearch/frontend/AutoresearchScene.js |
16.0 KiB | 🔺 +1.7 KiB (+11.7%) |
posthog-app/_parent/products/workflows/frontend/Broadcasts/BroadcastScene.js |
87.4 KiB | 🔺 +1.6 KiB (+1.9%) |
exporter/src/exporter/scenes/ExporterNotebookScene.js |
3.73 MiB | 🔺 +1.6 KiB (+0.0%) |
posthog-app/_parent/products/cross_project_dashboards/frontend/CrossProjectDashboardScene.js |
36.6 KiB | 🔺 +1.4 KiB (+4.0%) |
exporter/_parent/products/workflows/frontend/Workflows/Workflow.js |
126.3 KiB | 🔺 +1.4 KiB (+1.1%) |
exporter/src/queries/schema.js |
1.25 MiB | 🔺 +1.2 KiB (+0.1%) |
posthog-app/src/queries/schema.js |
1.25 MiB | 🔺 +1.2 KiB (+0.1%) |
posthog-app/_parent/products/autoresearch/frontend/AutoresearchPipelineScene.js |
55.5 KiB | 🔺 +1.1 KiB (+2.0%) |
posthog-app/src/scenes/feature-flags/FeatureFlag.js |
130.5 KiB | 🔺 +1.1 KiB (+0.8%) |
posthog-app/_parent/products/tracing/frontend/TracingScene.js |
188.8 KiB | 🔺 +1.1 KiB (+0.6%) |
Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report
✅ Eager graph — within 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.65 MiB · 23 files | 🔺 +5.7 KiB (+0.3%) | █████████░ 89.6% of 1.84 MiB |
logged-out boot: index + App + bootApp (preloaded by every page, including /login)src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts |
3.78 MiB · 670 files | 🔺 +42.2 KiB (+1.1%) | █████████░ 93.9% of 4.03 MiB |
authenticated shell (every logged-in page)src/scenes/AuthenticatedShell.tsx |
7.68 MiB · 2,422 files | 🔺 +17.3 KiB (+0.2%) | █████████░ 92.0% of 8.34 MiB |
dashboard scenesrc/scenes/dashboard/Dashboard.tsx |
9.91 MiB · 3,502 files | 🔺 +32.3 KiB (+0.3%) | █████████░ 90.8% of 10.92 MiB |
today home pathsrc/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx |
7.70 MiB · 2,434 files | 🔺 +18.5 KiB (+0.2%) | █████████░ 89.7% of 8.58 MiB |
events scenesrc/scenes/activity/explore/EventsScene.tsx |
9.53 MiB · 3,353 files | 🔺 +29.6 KiB (+0.3%) | █████████░ 90.7% of 10.51 MiB |
replay detail scenesrc/scenes/session-recordings/detail/SessionRecordingDetail.tsx |
12.24 MiB · 4,161 files | 🔺 +17.6 KiB (+0.1%) | ████████░░ 77.9% of 15.72 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/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
🟢 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/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
🟢 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
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.5 KiB | ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js |
| 3.9 KiB | ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js |
| 1.4 KiB | ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js |
| 1.3 KiB | src/index.tsx |
| 1.3 KiB | src/RootErrorBoundary.tsx |
| 912 B | ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js |
| 839 B | src/scenes/ChunkLoadErrorBoundary.tsx |
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
| Size | File |
|---|---|
| 316.7 KiB | ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 221.0 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.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 |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | src/products.tsx |
| 68.7 KiB | src/lib/lemon-ui/icons/icons.tsx |
| 40.7 KiB | src/lib/utils/eventUsageLogic.ts |
| 38.7 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 |
| 33.9 KiB | ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js |
| 29.0 KiB | ../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
| Size | File |
|---|---|
| 316.7 KiB | ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 281.0 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 221.0 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 93.3 KiB | src/products.tsx |
| 90.6 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/dashboard/Dashboard.tsx
| Size | File |
|---|---|
| 316.7 KiB | ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 281.0 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 221.0 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 181.9 KiB | src/queries/validators.js |
| 153.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 93.3 KiB | src/products.tsx |
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx + src/scenes/project-homepage/ProjectHomepage.tsx + src/scenes/project-homepage/today/TodayHome.tsx
| Size | File |
|---|---|
| 316.7 KiB | ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 281.0 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 221.0 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 153.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 93.3 KiB | src/products.tsx |
| 90.6 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/activity/explore/EventsScene.tsx
| Size | File |
|---|---|
| 316.7 KiB | ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 281.0 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 221.0 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 181.9 KiB | src/queries/validators.js |
| 153.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 KiB | ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js |
| 93.3 KiB | src/products.tsx |
Largest files eagerly shipped from src/scenes/session-recordings/detail/SessionRecordingDetail.tsx
| Size | File |
|---|---|
| 316.7 KiB | ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs |
| 316.0 KiB | ../node_modules/.pnpm/posthog-js@1.438.1_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/rrweb.js |
| 281.0 KiB | src/taxonomy/core-filter-definitions-by-group.json |
| 221.0 KiB | ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
| 181.9 KiB | src/queries/validators.js |
| 153.7 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 |
| 112.3 KiB | ../packages/quill/packages/quill/dist/index.js |
| 99.7 KiB | src/lib/api.ts |
| 93.3 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.23 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.23 MiB · 19 files | 🔺 +3.9 KiB (+0.2%) | ████░░░░░░ 39.0% of 5.72 MiB |
| Deferred (lazy) | 2.11 MiB · 44 files | no change | 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 |
|---|---|
| 858.2 KiB | dist/toolbar/toolbar-app-TSGDYHMJ.css |
| 668.2 KiB | dist/toolbar/chunk-chunk-KNXWAVPL.js |
| 259.4 KiB | dist/toolbar/chunk-chunk-5UE4YDI5.js |
| 138.2 KiB | dist/toolbar/chunk-chunk-BGWYB7NC.js |
| 131.8 KiB | dist/toolbar/chunk-chunk-FDH2IBXT.js |
| 75.2 KiB | dist/toolbar/toolbar-app-PKSA4YXK.js |
| 69.0 KiB | dist/toolbar/chunk-chunk-TSAL54PB.js |
| 35.6 KiB | dist/toolbar/chunk-chunk-Z5EJQRZQ.js |
| 21.0 KiB | dist/toolbar/chunk-chunk-QIQG3WQ7.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 — 🔺 +1.55 MiB (+0.2%)
Total size of the built frontend/dist folder (all assets), compared against the base branch.
Total: 1004.65 MiB · 🔺 +1.55 MiB (+0.2%)
✅ 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 606cdaf · box box-8f15285e334b · ready in 821s (push → usable) · build log · rebuilds on every push, torn down on close
HostHog preview —
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 WalkthroughWalkthroughThe change adds message audience links for broadcast and workflow destinations. Broadcast links can include audience filters, a name, and a source. The broadcast wizard parses audience filters from the URL, applies available prefill values, records source analytics, clears prefill parameters, and loads the audience preview. If the audience cannot be parsed, the wizard shows a warning and offers a send-to-everyone action. The wizard also stores entry sources and includes them in launch analytics. Workflow trigger-prefill parsing accepts non-string values, and the workflow header recognizes new workflows created from valid trigger-prefill links. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Link-opened broadcasts retain their source for launch analytics, and an empty rejected audience remains blocked until the sender explicitly chooses to send to everyone. No concrete merge-blocking risk remains. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Existing access checks, audience previews, sending limits, and explicit launch actions constrain exposure. However, reloading a rejected audience link after its parameters are removed loses the rejection warning and permits the normal send-to-everyone flow. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
Full details: Description checkExplanation The description covers the problem, user-visible changes, testing, screenshots, release status, docs, and agent context. However, the release status section retains checkbox syntax and all three options instead of one plain bullet. The agent context also omits the required duplicate-PR, patch-coverage, new-events-schema, and public-artifact gate results. Resolution Replace the release status section with exactly one plain bullet and remove the other options. Add reviewer-facing results for the duplicate search, patch coverage, new-events-schema applicability and outcome, and public-artifact check. State any applicable labels or explain why each gate does not apply.
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
- Review profile: QUIET
- Plan: Enterprise
- Run ID:
c7839c38-8ab1-4aaf-a3ad-68266a689fda
📒 Files selected for processing (6)
products/workflows/frontend/Broadcasts/broadcastAudiencePrefill.test.tsproducts/workflows/frontend/Broadcasts/broadcastAudiencePrefill.tsproducts/workflows/frontend/Broadcasts/broadcastWizardLogic.test.tsproducts/workflows/frontend/Broadcasts/broadcastWizardLogic.tsproducts/workflows/frontend/MessageAudience/MessageAudienceButton.tsxproducts/workflows/frontend/MessageAudience/messageAudience.ts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Preserve entrySource when continuing from a link-opened… · broadcastWizardLogic.ts:1575
products/workflows/frontend/Broadcasts/broadcastWizardLogic.ts:1575
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winPreserve
entrySourcewhen continuing from a link-opened broadcast.When Continue creates a draft, the wizard replaces
/broadcasts/newwith the draft URL. The route ID changes thebroadcastWizardLogickey, so the new logic instance startsentrySourceasnulland draft hydration does not restore it. A laterbroadcast launchedevent can therefore sendentry_source: null. Carry the source into the saved-draft logic instance or persist and restore it with the draft.
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
- Review profile: QUIET
- Plan: Enterprise
- Run ID:
e96bbb82-b2ed-4567-ab95-4a98dc38842d
📒 Files selected for processing (3)
products/workflows/frontend/Broadcasts/broadcastWizardLogic.test.tsproducts/workflows/frontend/Broadcasts/broadcastWizardLogic.tsproducts/workflows/frontend/Broadcasts/steps/BroadcastRecipientsStep.tsx
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.
…pty and keep the entry source after saving
|
Risk: No findings This increment hardens the broadcast/workflow audience prefill parsing: filters from links are rebuilt from a known field allowlist, operators must be known enum values, cohort ids must be positive integers, and values must be non-empty scalars or arrays of scalars; batch workflow trigger audiences now get the same check. I traced every silent-audience-widening hypothesis to the backend and each path fails closed with a visible error, so I found no new security issues in these changes. Sentinel reviewed |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
There was a problem hiding this comment.
Not approved — this change needs a human reviewer.
Re-add the stamphog label to request another review once you have addressed this.
An unresolved security comment from veria-ai on broadcastAudiencePrefill.ts is valid, and the PR hasn't addressed it. A link filter carrying a hidden invalid field, such as a negative group_type_index, passes the frontend check. The backend then drops that filter, so the broadcast audience can widen to everyone while the filter still shows in the wizard. This is the exact case the PR says it prevents.
- Author wrote 69% of the modified lines and has 30 merged PRs in these paths (familiarity MODERATE).
- products/workflows/frontend/Broadcasts/broadcastAudiencePrefill.ts: isUsableAudienceFilter returns the raw filter objects, so extra fields like group_type_index: -1 pass through. In posthog/models/property/parse.py, parse_properties drops any filter that Property.init rejects, which widens the audience without setting linkAudienceRejected.
- The unresolved veria-ai inline thread has no author reply or fix.
- Suggested fix: rebuild each accepted filter from an allowlist of fields (key, type, operator, value, and cohort_name for cohorts), or reject filters with unknown fields. Add a test for a person filter with group_type_index: -1.
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 329L, 9F substantive, 414L/12F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (414L, 12F, single-area, feat) |
| stamphog 2.3.1 | .stamphog/policy.yml @ abe0646 · reviewed head abe0646 |
…elds the audience uses
There was a problem hiding this comment.
Approved.
Frontend-only change in the workflows product, by an author on the owning team. It touches no auth, billing, or API contracts, and it adds tests. The earlier CodeRabbit concern about losing the entry source on draft creation is addressed with session storage.
- Author wrote 64% of the modified lines and has 30 merged PRs in these paths (familiarity MODERATE).
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 376L, 9F substantive, 494L/12F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1d-complex (494L, 12F, single-area, feat) |
| stamphog 2.3.1 | .stamphog/policy.yml @ 606cdaf · reviewed head 606cdaf |
|
/trunk merge |
Problem
/broadcasts/newalways opens an empty audience, so people rebuild it by hand.?trigger=), but nothing for Broadcasts, and no shared way for a product to offer both.Changes
/broadcasts/new?audience=<filters>&name=<name>&source=<surface>opens the wizard with the audience and name filled in. The params are removed from the URL after load.group_type_index) can't make it drop the filter. A workflow link's batch audience goes through the same check. Each filter must be one the backend can apply: a cohort needs its id, a person filter needs a value unless it isis setoris not set. A link with any other filter adds no recipients. The Recipients step then shows a warning and blocks Continue while the audience is empty, until the person adds a condition or picks "Send to everyone", so a broken link never quietly widens the audience to everyone. The link's name still applies.sourceis kept on the wizard, carried to the saved draft for the tab, and sent asentry_sourceonbroadcast launched, plus abroadcast prefilled from linkevent, so each entry point's launches can be measured.?trigger=link can be created as a draft right away. Before, "Create as draft" said "No changes to save" until something was edited, the same as the cohort page's existing workflow link. The trigger param is also accepted when kea-router has already parsed it into an object.products/workflows/frontend/MessageAudience/:messageAudienceUrlbuilds the broadcast or workflow link for an audience,captureMessageAudienceClickedtracks the click, andMessageAudienceButtonis a "Message these people" button with "Send a broadcast" and "Start a workflow". Nothing uses them in this PR. The entry-point PRs do.How did you test this code?
Local app, Playwright, Postgres read back:
/broadcasts/newwith that cohort asaudience,name=Beta is now live,source=e2e. The Recipients step showed the cohort card ("Beta testers, List, 1 person"), the title read "Beta is now live", and the URL was back to/broadcasts/new.posthog_hogflowbefore and after opening the link: 308 and 308, so no draft was created on open.Beta is now liveand trigger filters[{"key": "id", "type": "cohort", "value": 124, …}].audience=not-json: the wizard opened empty, and the params were removed.$browser) as the audience was ignored.audience=[{"key":"email","type":"person","operator":"exact"}](no value) withname=Bad link test: no filter added, the title read "Bad link test", the warning banner showed, and Continue was disabled with "Fix errors before continuing". Clicking "Send to everyone" removed the banner and enabled Continue. In a second run, adding a condition did the same. Removing that condition again brought the banner back and disabled Continue. Broadcast rows inposthog_hogflowstayed at 326 and 326.audience=[{"key":"email","type":"person","operator":"is_set"}]: the "Email address is set" filter was added and the reach dropped to 251 of 2,403 demo persons.A link whose audience can't be used: no filter is added, a warning stays on the step, and Continue is blocked.
/workflows/new/workflow?trigger=<$exception event trigger>. Before: "Create as draft" was disabled with "No changes to save", andposthog_hogflowstayed at 1453 rows. After: the button was enabled. Clicking it saved a draft whose trigger action config is{"type": "event", "filters": {"events": [{"id": "$exception", …}], "bytecode": […]}}. The same check passed with the link builder's exact URL./workflows/new/workflowwithout a trigger still shows "No changes to save".source=cohortand clicked Continue: the URL moved to the new draft (broadcast rows 326 to 327), and session storagebroadcasts-entry-sourcesheldcohortfor that draft id, also after a reload.audience=[{"key":"email","type":"person","operator":"exact","value":"<one person's email>","group_type_index":-1}]: the reach read "approximately 1 of 2,403 people" (not everyone), and after Continue the saved trigger filters were[{"key": "email", "type": "person", "value": "…", "operator": "exact"}], with nogroup_type_index.Not checked in the browser: the two analytics events. Local dev sends no capture requests (only
/flags), so they are covered by reading the code only.MessageAudienceButtonis exercised in the entry-point PRs.Test rationale:
broadcastAudiencePrefill.test.tscovers the URL round trip and the rejected inputs (missing, malformed, empty, object, event filter, a person filter without a value, a cohort without an id, one bad filter next to a good one) and the value-lessis setfilter that must still pass. The newbroadcastWizardLogiccase catches a regression where opening a prefilled link creates a draft or drops the name or source.Release status
Automatic notifications
Docs update
None. The entry points will be documented once they land.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5 (claude-opus-5-5)
🤖 Generated with Claude Code
https://claude.ai/code/session_01BR6LoqsDMB9Wfnftcy2KiG