Skip to content

feat(marketing): hero positioning A/B test + solid primary download CTA - #5832

Merged
saddlepaddle merged 1 commit into
mainfrom
posthog-growth-setup
Jul 21, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
posthog-growth-setup

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Jul 21, 2026 •

Copy link
Copy Markdown
Collaborator

What

Hero positioning experiment (landing-hero-positioning, PostHog experiment 386395, draft — launch after this deploys):

  • control — current "The Code Editor for AI Agents."
  • capability-mac — "Run parallel coding agents on your Mac." with improved subheadline ("Isolated workspaces for Claude Code, Codex, and any CLI agent — run them side by side and review every change from one dashboard. Free to start.")
  • Variant only applies to Mac platforms (isMacPlatform); Windows/Linux/mobile always see control. Experiment exposure is additionally filtered to $os = Mac OS X in PostHog so non-Mac flag evaluations don't dilute analysis.
  • Baseline: ~4,400 Mac visitors/wk on superset.sh, ~25% visitor→download click. 10% relative MDE, 50/50 split, 3-week pre-registered runtime.

Download CTA restyle (ship-lane change, no experiment): transparent orange → solid primary (bg-foreground text-background), matching the design system's primary button (e.g. WaitlistForm submit).

Drive-by: Biome format fix on desktop CommitRow.tsx (was committed unformatted; repo-wide lint:fix picked it up).

Notes

  • Flag read via useFeatureFlagVariantKey; the hero's 600ms typewriter delay masks flag-load latency, so no flicker handling needed.
  • Experiment tracked in Notion: Growth → Experiment Log.

https://claude.ai/code/session_01CALU4gFuyo3ABdp1Cc7BJh


Summary by cubic

Adds a Mac-only hero copy A/B test and updates the Download CTA to the solid primary button for a clearer, more consistent landing experience.

  • New Features

    • Adds landing-hero-positioning experiment (PostHog 386395): control vs capability-mac headline/subheadline, shown to Mac visitors only. Uses useFeatureFlagVariantKey from posthog-js/react; the typewriter delay masks flag load.
    • Restyles Download CTA to solid primary (bg-foreground text-background) with opacity hover.
  • Refactors

    • Biome format fix in CommitRow.tsx (no behavior change).

Written for commit 8ac6f71. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added platform- and variant-specific messaging to the marketing hero section.
    • Updated hero headlines and supporting text dynamically based on active configuration.
  • Style

    • Refined the download button appearance with improved contrast and opacity-based hover feedback.
  • Refactor

    • Simplified commit row formatting without changing its behavior.

- Gate hero headline/subheadline on the landing-hero-positioning PostHog
  flag (control vs capability-mac), Mac visitors only; non-Mac platforms
  always render control copy
- Restyle download CTA from transparent orange to solid primary
  (bg-foreground/text-background)
- Drive-by: Biome format fix on desktop CommitRow

Claude-Session: https://claude.ai/code/session_01CALU4gFuyo3ABdp1Cc7BJh
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

HeroSection now uses platform and feature-flag variants for hero copy. DownloadButton styling uses foreground/background colors and opacity hover behavior. CommitRow formatting preserves conditional wrapping and truncation behavior.

Changes

Feature-flagged hero copy

Layer / File(s) Summary
Hero copy selection and rendering
apps/marketing/src/app/components/HeroSection/HeroSection.tsx
Typed hero copy variants are selected using macOS platform detection and the active feature flag, then rendered through the headline and subheadline components.

Download button styling

Layer / File(s) Summary
Download button visual styles
apps/marketing/src/app/components/DownloadButton/DownloadButton.tsx
Button classes now use foreground/background colors, opacity-based hover styling, and an opacity transition.

Commit row formatting

Layer / File(s) Summary
Commit message display formatting
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/CommitFilterDropdown/components/CommitRow/CommitRow.tsx
Props are destructured across multiple lines, while commit messages continue switching between wrapping and truncation based on wrap.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HeroSection
  participant Platform
  participant FeatureFlags
  participant TypewriterText
  HeroSection->>Platform: read platform
  HeroSection->>FeatureFlags: read HERO_POSITIONING_FLAG variant
  HeroSection->>HeroSection: select HERO_COPY content
  HeroSection->>TypewriterText: render headline and segments
Loading

Possibly related PRs

Suggested reviewers: kitenite

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main changes: a hero positioning A/B test and a primary CTA restyle.
Description check ✅ Passed The description clearly explains the changes and rationale, though it omits the testing section and checklist from the template.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch posthog-growth-setup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/marketing/src/app/components/HeroSection/HeroSection.tsx (1)

82-89: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Improve screen reader accessibility for the typewriter effect.

Currently, the animated text wrapper is exposed to assistive technologies, causing screen readers to painfully announce the headline character-by-character as it types out.

You can improve the accessibility by hiding the animated text from screen readers using aria-hidden="true" and adding a visually hidden (sr-only) element containing the complete headline for them to read instantly.

♿ Proposed accessibility fix
-								<span className="absolute inset-0">
+								<span className="absolute inset-0" aria-hidden="true">
 									<TypewriterText
 										key={copy.headline}
 										segments={copy.segments}
 										speed={40}
 										delay={600}
 									/>
 								</span>
+								<span className="sr-only">{copy.headline}</span>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/marketing/src/app/components/HeroSection/HeroSection.tsx` around lines
82 - 89, Update the typewriter wrapper around TypewriterText in HeroSection to
include aria-hidden="true", then add an sr-only element containing the complete
headline text for immediate screen-reader access. Keep the existing animated
rendering and headline content unchanged for visual users.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/marketing/src/app/components/HeroSection/HeroSection.tsx`:
- Around line 55-60: Update the hero copy selection in the copy expression to
use Object.hasOwn(HERO_COPY, heroVariant) instead of the in operator, while
preserving the existing platform, string-type, and control-copy fallback checks.

---

Nitpick comments:
In `@apps/marketing/src/app/components/HeroSection/HeroSection.tsx`:
- Around line 82-89: Update the typewriter wrapper around TypewriterText in
HeroSection to include aria-hidden="true", then add an sr-only element
containing the complete headline text for immediate screen-reader access. Keep
the existing animated rendering and headline content unchanged for visual users.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: be7ab783-1230-4646-8370-bd97916ffb57

📥 Commits

Reviewing files that changed from the base of the PR and between 3a48f22 and 8ac6f71.

📒 Files selected for processing (3)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/CommitFilterDropdown/components/CommitRow/CommitRow.tsx
  • apps/marketing/src/app/components/DownloadButton/DownloadButton.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx

Comment on lines +55 to +60
const copy =
isMacPlatform(platform) &&
typeof heroVariant === "string" &&
heroVariant in HERO_COPY
? HERO_COPY[heroVariant as keyof typeof HERO_COPY]
: HERO_COPY.control;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Prevent prototype pollution by using Object.hasOwn.

Using the in operator checks the entire prototype chain. If PostHog were to return a string like "toString" for the variant key, the check would pass, but HERO_COPY["toString"] would return a function instead of a HeroCopy object, leading to a broken/empty render.

Use Object.hasOwn to safely check for direct properties on the object literal.

🛡️ Proposed fix
 	const copy =
 		isMacPlatform(platform) &&
 		typeof heroVariant === "string" &&
-		heroVariant in HERO_COPY
+		Object.hasOwn(HERO_COPY, heroVariant)
 			? HERO_COPY[heroVariant as keyof typeof HERO_COPY]
 			: HERO_COPY.control;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const copy =
isMacPlatform(platform) &&
typeof heroVariant === "string" &&
heroVariant in HERO_COPY
? HERO_COPY[heroVariant as keyof typeof HERO_COPY]
: HERO_COPY.control;
const copy =
isMacPlatform(platform) &&
typeof heroVariant === "string" &&
Object.hasOwn(HERO_COPY, heroVariant)
? HERO_COPY[heroVariant as keyof typeof HERO_COPY]
: HERO_COPY.control;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/marketing/src/app/components/HeroSection/HeroSection.tsx` around lines
55 - 60, Update the hero copy selection in the copy expression to use
Object.hasOwn(HERO_COPY, heroVariant) instead of the in operator, while
preserving the existing platform, string-type, and control-copy fallback checks.

@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@saddlepaddle
saddlepaddle merged commit 0e0247b into main Jul 21, 2026
19 checks passed
saddlepaddle added a commit that referenced this pull request Aug 4, 2026
Closes out the landing-hero-positioning A/B test (PostHog experiment
386395). Result was flat on download_clicked, so the control copy stays.
Reverts the experiment wiring from #5832 and the flag bootstrap from
#5884; the hero renders the control copy unconditionally again.

Claude-Session: https://claude.ai/code/session_016SyQq825A17ZMGGDgyaoPE

This branch was previously deployed

1 inactive deployment
preview — 8ac6f71a Deployed Jul 21, 2026 by saddlepaddle via Deploy Admin #6726
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant