Repository navigation
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 |
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughWorkflow email actions with configured HTML now display previews in the editor and tree view. Node dimensions, layout, and edge handle offsets use action-specific sizes. Branch-join dropzones are centered using the target node width. The example email action now uses a styled HTML template, and tests cover email-node layout and dropzone centering. Priority: ➖ Normal Merge Risk: 🟡 Moderate · up to Opening a workflow can now request externally hosted images in its email previews, exposing the viewer’s IP address to those hosts. Restrict those requests or explicitly accept that exposure before merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The previews retain script and same-origin isolation. However, opening a workflow can now load remote images embedded in its email content without opening the email editor. This creates a limited privacy risk; access to application credentials or other workflows has not been demonstrated. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Note
Quiet mode is enabled, so only the most important comments were posted inline. Other review comments are grouped below.
🟡 Other comments (1)
products/workflows/frontend/Workflows/hogflows/steps/components/EmailStepPreview.tsx-9-9 (1)
9-9: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep each email’s doctype ahead of the preview style.
scaleToWidthputs<style>before the configured HTML. When that HTML begins with a doctype, the iframe parser has already entered quirks mode before it reaches the doctype. Quirks-mode table sizing can change these table-based previews. The proposed<!doctype html>prefix would take precedence over an authored doctype. Preserve an existing doctype, and add an HTML5 doctype only when the input has none.Suggested fix
function scaleToWidth(html: string, width: number): string { - return `<style>html{zoom:${width / EMAIL_LAYOUT_WIDTH};overflow:hidden}</style>${html}` + const style = `<style>html{zoom:${width / EMAIL_LAYOUT_WIDTH};overflow:hidden}</style>` + const doctype = html.match(/^\s*<!doctype\b[^>]*>/i)?.[0] + if (doctype) { + return `${doctype}${style}${html.slice(doctype.length)}` + } + return `<!doctype html>${style}${html}` }
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: PostHog/posthog/.coderabbit.yaml
- Review profile: QUIET
- Plan: Enterprise
- Run ID:
660dec19-01a2-4981-a48f-94327559abb3
📒 Files selected for processing (11)
products/workflows/frontend/Workflows/hogflows/hogFlowEditorLogic.test.tsproducts/workflows/frontend/Workflows/hogflows/hogFlowEditorLogic.tsxproducts/workflows/frontend/Workflows/hogflows/react_flow_utils/autolayout.tsproducts/workflows/frontend/Workflows/hogflows/react_flow_utils/constants.tsproducts/workflows/frontend/Workflows/hogflows/react_flow_utils/nodeSize.tsproducts/workflows/frontend/Workflows/hogflows/steps/Nodes.tsxproducts/workflows/frontend/Workflows/hogflows/steps/components/EmailStepPreview.tsxproducts/workflows/frontend/Workflows/hogflows/steps/components/StepView.tsxproducts/workflows/frontend/Workflows/hogflows/steps/emailStepHtml.tsproducts/workflows/frontend/Workflows/hogflows/tree/HogFlowTreeStep.tsxproducts/workflows/frontend/Workflows/hogflows/tree/exampleWorkflows.ts
💤 Files with no reviewable changes (1)
- products/workflows/frontend/Workflows/hogflows/react_flow_utils/constants.ts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 4 remain after this review.
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:
d7b8a1e5-2887-4425-bb34-766ddd5269bd
📒 Files selected for processing (7)
frontend/src/lib/components/EmailPreviewThumbnail/EmailPreviewThumbnail.tsxproducts/workflows/frontend/Workflows/hogflows/hogFlowEditorLogic.test.tsproducts/workflows/frontend/Workflows/hogflows/hogFlowEditorLogic.tsxproducts/workflows/frontend/Workflows/hogflows/react_flow_utils/nodeSize.tsproducts/workflows/frontend/Workflows/hogflows/steps/components/StepView.tsxproducts/workflows/frontend/Workflows/hogflows/tree/HogFlowTreeStep.tsxproducts/workflows/frontend/Workflows/hogflows/tree/exampleWorkflows.ts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 4 remain after this review.
|
Risk: No findings The increment since the last review only tightens the workflow editor's Sentinel reviewed |
Email steps render a scaled preview of their HTML in the graph editor and the list view. Graph nodes for email steps are taller, so the layout and edge handles use each node's size. In dark mode the preview is inverted. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Reuse EmailPreviewThumbnail so previews stay out of session replay and render the email at its 600px layout. Center the branch-join dropzone on wider email nodes, and invert the clipped thumbnail in dark mode so no white corners show. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
5af3b90 to
e8f6965
Compare
|
Note 🤖 GPT-6.1 Sol responding on behalf of Michael Replaced by the draft fork PR #356 in its native fork stack. @meikelmosby will start migrating the stack from the fork into PostHog/posthog for upstream review and CI. Closing this master-targeted copy to keep the handoff clear. |
Problem
Note
🔵 Merge risk: low (merge-risk rubric)
Changes
EmailPreviewThumbnail, which is sandboxed, runs no scripts, and keeps the HTML out of session replay withph-no-capture. Two sizes are added to it.function_emailsteps and for generic steps that use the email template.{{ person.properties.first_name }}.nodeSizehelper, and the story fixtures get a realistic email template.Before, an email step looked like every other step: a title card with no content. These screenshots replace the first upload, which showed an earlier iteration.
Note
Known limits:
How did you test this code?
Test rationale:
hogFlowEditorLogic.test.tsgets four cases. The closest existing tests, "graph identity across rebuilds" and "showDropzones branch-join placement", do not check sizes.function_emailand for generic email-template steps: fails when the layout or the edge handles ignore the email node size, which makes the preview overlap the next step.Verify with
hogli test products/workflows/frontend/Workflows/hogflows/hogFlowEditorLogic.test.ts. Expect 31 passing tests, including the "email step layout" block.👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Release status
Automatic notifications
Docs update
None.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code, Claude Opus 5.5. Review panel: GPT-6.1 Sol through Codex, plus Claude Opus.
/tdd,/writing-tests,/writing-ui-components,/reviewing-with-coderabbit,/writing-pr-descriptions,/share-preview,/qa-swarm,/merge-risk,/leaving-pr-comments.EmailPreviewThumbnail, which fixed session replay capture and email media queries. It also found the generic email-template steps, the dropzone offset, and the sibling-row offset.dark:classes, not an inversion inside the email document. Storybook sets onlybody[theme], andcolor-schemedid not reach the iframe's media query in Chromium.🤖 Generated with Claude Code