Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: PostHog/posthog/.coderabbit.yaml Review profile: QUIET Plan: Enterprise Run ID: 📒 Files selected for processing (22)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds a feature-flagged Audience scene with Topics and Suppression tabs, routes, and tab state. It redirects selected Workflows and Broadcasts URLs to Audience when the flag is enabled. It also adds analytics capture for opt-out imports and exports and suppression additions and removals, with tests and Storybook stories. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The flagged Audience scene and messaging-tab redirects appear mergeable after normal checks. No concrete current-head issue remains that would block merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new page reuses existing audience-management controls rather than granting new privileges. No introduced security issue was demonstrated, but server-side authorization and live rollback behavior were not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…o audience (red) Adds the workflows-audience flag and moves the Broadcasts tab parsing into broadcastsSceneLogic so the routing test can mount both scene logics. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nd workflows-audience Declares the Audience scene, its routes and url helpers, and a flagged Messaging sidebar item. With the flag on, the Opt-outs and Suppression list tab URLs of Workflows and Broadcasts are replaced by their Audience tab. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ist tabs The Topics tab renders today's opt-out content and the Suppression list tab renders SuppressionScene. NewCategoryButton moves to its own file so both the shared messaging tabs and Audience can use it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…opened (red) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…opened Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…changes (red) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…test (red) jsdom cannot stream a File through Papa, so the first red failed on file reading rather than on the missing event. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…changes Fires messaging opt-outs exported, messaging opt-outs imported (count), messaging suppression added and messaging suppression removed, with the workflows-audience flag on or off. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ypes Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Workflows re-pushes the moved tab after the redirect, which redirects and tracks a second time. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
workflowsSceneLogic no longer selects a tab that Audience takes over, so its tab url sync cannot push the moved url back after the redirect. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ut (red) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Onboarding and the backend pick a product item by intent without checking its flag, so Audience replaced Broadcasts as the workflows product there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
f406ad0 to
b4453c3
Compare
sidebarProductMeta.test.ts failed for the new Audience item: it has no docsHref and was missing from SIDEBAR_PRODUCTS_WITHOUT_DOCS. Audience has no docs page yet, the same as Broadcasts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… and click Each case mounts only the Workflows or Broadcasts scene logic it opens, so a surface that stops connecting the redirect logic fails its own cases. Every moved tab is opened both before the scene mounts (bookmark) and after (click). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…f link Two crumbs plus the project crumb made the scene header show a back arrow to /audience, the page the user is on. Audience now returns one crumb per tab, like Workflows. The routing test also clears persisted flags before each case, checks the late-flags redirect fires once with REPLACE, and checks each surface keeps its tab with the flag off. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…io imports (red) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…o imports The Topics tab now lives in the Audience scene, so its own actions are adjacent to this change and get usage tracking too. New events: messaging topic created, messaging topic updated, messaging topic deleted, messaging preferences page opened, and messaging customer.io import completed (source api or csv). Each fires after the request succeeds. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The link is generated before window.open, so a browser can block the popup. window.open then returns null and no page opens, and the event no longer fires. The opt-out list test spies on URL.createObjectURL instead of replacing it, and the tracking test fixtures drop their type casts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Problem
/audiencescene that later slices fill with recipients, engagement and setup.workflows-audienceflag. With the flag off, nothing a user sees changes.Changes
workflows-audienceon, a new Audience item under Messaging opens/audiencewith two tabs: Topics (today's opt-out content, unchanged) and Suppression list./audience/topicsor/audience/suppression. Back returns to the page before./audiencewith the flag off renders the not-found page, and the sidebar item is hidden.intentswhile it is flagged. Onboarding and the backend pick a product by intent without checking flags, so Audience would otherwise replace Broadcasts there.messaging tab redirected to audience(tab,from).messaging opt-outs exported,messaging opt-outs imported(count, only when someone was opted out)messaging suppression added,messaging suppression removedmessaging topic created,messaging topic updated,messaging topic deletedmessaging preferences page opened(only when the browser opens the tab)messaging customer.io import completed(source:apiorcsv)products/workflows/CONTEXT.mddefines recipient, topic, topic status, suppressed, unreachable person and engagement events, and separates Audience from batch audience.broadcastsSceneLogic,NewCategoryButtonmoves to its own file, the opt-out header actions wrap in a narrow scene, Audience joins the sidebar products without a docs page, and the generated product files are regenerated.Running dev stack, flag on (invented seed data). These shots predate the one-breadcrumb change, so the header may still show a back arrow that is now gone. The integration stack proof replaces them.
/workflows/opt-outslands on Topics/broadcasts/suppressionlands on Suppression listStorybook, full width and the 520px narrow variant:
How did you test this code?
Test rationale: the closest existing test,
Broadcasts/broadcastsRoutes.test.ts, only resolves routes to scenes, so it cannot see a redirect, a flag gate or an event.Audience/audienceRouting.test.tsmounts only the Workflows or Broadcasts scene logic it opens, with the real router and flag logic. It catches a moved tab that does not redirect with the flag on (by bookmark or click), redirects with the flag off, shows the wrong tab with the flag off, pushes instead of replacing, tracks twice, or misses a late flag. It also checks the tab and breadcrumb each/audienceURL shows.Audience/AudienceScene.test.tsxcatches the scene rendering with the flag off.OptOuts/optOutListLogic.test.ts,OptOuts/topicsUsageTracking.test.tsandSuppression/suppressionListLogic.test.tscatch a dropped, doubled or misplaced tracking event, a wrong import count, and an event for a blocked popup.sidebarProductMeta.test.tsfailed for Audience before this PR listed it among products without docs.hogli ci:preflight --strictwith 0 failures, the diff-aware devex and security semgrep with 0 findings, andtypescript:checkwith no errors in the diff.Verify:
hogli test products/workflows/frontend/Audience/audienceRouting.test.ts products/workflows/frontend/Audience/AudienceScene.test.tsx products/workflows/frontend/OptOuts/topicsUsageTracking.test.ts products/workflows/frontend/OptOuts/optOutListLogic.test.ts products/workflows/frontend/Suppression/suppressionListLogic.test.ts products/workflows/frontend/Broadcasts/broadcastsRoutes.test.ts frontend/src/layout/panel-layout/sidebarProductMeta.test.tsExpect
Test Suites: 7 passed, 7 totalandTests: 103 passed, 103 total(output on002c70e1e4a).👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Release status
The adjacent tracking events fire with the flag off too. Nothing a user sees changes with the flag off.
Automatic notifications
Docs update
None. The glossary lands in
products/workflows/CONTEXT.md.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, claude-opus-5-5
/tdd,/writing-tests,/writing-kea-logics,/writing-ui-components,/writing-user-facing-copy,/writing-code-comments,/domain-modeling,/reviewing-with-coderabbit,/writing-pr-descriptions,/code-review,/writing-voice.*in recipient URLs (deferred to the recipient detail slice), alphabetical sidebar order, the old "category" words (the Topics slice renames them).QA swarm
f406ad03a44). Every fix after that is a new commit.002c70e1e4a.🤖 Generated with Claude Code