-
Notifications
You must be signed in to change notification settings - Fork 2.4k
web: Agent Landing Page A/B testing toolkit #9018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Created /pr-reviewer route with new page component - Implemented PRReviewerContent with edgier, more direct messaging - Focus on AI-generated code risks and security concerns - Uses same structure as /reviewer but with completely different copy - Emphasizes paranoid senior developer angle - Highlights specific issues: JWT bugs, regex backtracking, billing errors
…dress real concerns
…Code into feature/pr-reviewer-page
|
🚀 Preview deployed! Your changes have been deployed to Vercel: Preview URL: https://roo-code-website-mn8k0w2n7-roo-code.vercel.app This preview will be updated automatically when you push new commits to this PR. |
| }}> | ||
| <div className="block"> | ||
| <Image | ||
| src={content.hero.image.src || content.hero.image.url!} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The non-null assertion on content.hero.image.url! is unsafe because both src and url are optional in the AgentPageContent interface. If a content variant is created with an image object that lacks both properties, this will pass undefined to the Next.js Image component and cause a runtime error. Consider either making at least one property required in the type definition or adding runtime validation.
Fix it with Roo Code or mention @roomote and request a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roomote fix this by making the hero image url required, and consolidating all uses to use that property (not src)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the unsafe non-null assertion by making hero.image.url required and consolidating all uses. All local checks passed.
To make it easier for us to iterate on the copy of landing pages for different agents, this PR generalizes the structure of the page and moves copy to content-only files which can be easily edited and referenced as variants (A, B, C, etc), falling back to A (which is always required) when an invalid value is passed (or its absent).
To try it out, go to
/reviewer?v=Aand/reviewer?v=Bin the preview environment.To understand how it's used, look into
apps/web-roo-code/src/app/reviewer/page.tsxThis also tweaks the copy of Danny's proposed alternative for the Reviewer page, but mostly leaves it alone.
Important
Introduces A/B testing for agent landing pages with dynamic content selection and refactors content structure for consistency.
getContentVariant()ingetContentVariant.tsto select content variants based on URL parameters.AgentPageContentinterface inagent-page-content.tsfor consistent content structure across agent pages.content-a.tsx,content-b.tsx, andcontent.tsforPR FixerandPR Reviewerwith different content variants.page.tsxforpr-fixerandreviewerto useAgentLandingContentand dynamic content selection.ReviewerContent.tsxandPrFixerContent.tsx, consolidating intoAgentLandingContent.tsx.AgentLandingContent.tsxto dynamically render content based onAgentPageContent.agent-carousel.tsxto include links toPR ReviewerandPR Fixerpages.This description was created by
for a5c3571. You can customize this summary. It will automatically update as commits are pushed.