| 
 | 1 | +"use client"  | 
 | 2 | + | 
 | 3 | +import { ArrowRight, GitPullRequest, History, Key, MessageSquareCode, Wrench, type LucideIcon } from "lucide-react"  | 
 | 4 | +import Image from "next/image"  | 
 | 5 | +import Link from "next/link"  | 
 | 6 | + | 
 | 7 | +import { Button } from "@/components/ui"  | 
 | 8 | +import { AnimatedBackground } from "@/components/homepage"  | 
 | 9 | +import { EXTERNAL_LINKS } from "@/lib/constants"  | 
 | 10 | +import { trackGoogleAdsConversion } from "@/lib/analytics/google-ads"  | 
 | 11 | + | 
 | 12 | +// Workaround for next/image choking on these for some reason  | 
 | 13 | +import hero from "/public/heroes/agent-pr-fixer.png"  | 
 | 14 | + | 
 | 15 | +interface Feature {  | 
 | 16 | +	icon: LucideIcon  | 
 | 17 | +	title: string  | 
 | 18 | +	description: string | React.ReactNode  | 
 | 19 | +	logos?: string[]  | 
 | 20 | +}  | 
 | 21 | + | 
 | 22 | +const workflowSteps: Feature[] = [  | 
 | 23 | +	{  | 
 | 24 | +		icon: GitPullRequest,  | 
 | 25 | +		title: "1. Connect your GitHub repositories",  | 
 | 26 | +		description: "Pick which repos the PR Fixer can work on by pushing to ongoing branches.",  | 
 | 27 | +	},  | 
 | 28 | +	{  | 
 | 29 | +		icon: MessageSquareCode,  | 
 | 30 | +		title: "2. Invoke from a comment",  | 
 | 31 | +		description:  | 
 | 32 | +			'Ask the agent to fix issues directly from GitHub PR comments (e.g. "@roomote: fix these review comments"). It’s fully aware of the entire comment history and latest diffs and focuses on fixing them – not random changes to your code.',  | 
 | 33 | +	},  | 
 | 34 | +	{  | 
 | 35 | +		icon: Wrench,  | 
 | 36 | +		title: "3. Get clean scoped commits",  | 
 | 37 | +		description: (  | 
 | 38 | +			<>  | 
 | 39 | +				The agent proposes targeted changes and pushes concise commits or patch suggestions you (or{" "}  | 
 | 40 | +				<Link href="/pr-reviewer">PR Reviewer</Link>) can review and merge quickly.  | 
 | 41 | +			</>  | 
 | 42 | +		),  | 
 | 43 | +	},  | 
 | 44 | +]  | 
 | 45 | + | 
 | 46 | +const howItWorks: Feature[] = [  | 
 | 47 | +	{  | 
 | 48 | +		icon: History,  | 
 | 49 | +		title: "Comment-history aware",  | 
 | 50 | +		description:  | 
 | 51 | +			"Understands the entire conversation on the PR – previous reviews, your replies, follow-ups – and uses that context to produce accurate fixes.",  | 
 | 52 | +	},  | 
 | 53 | +	{  | 
 | 54 | +		icon: Key,  | 
 | 55 | +		title: "Bring your own key",  | 
 | 56 | +		description:  | 
 | 57 | +			"Use your preferred models at full strength. We optimize prompts and execution without capping your model to protect our margins.",  | 
 | 58 | +	},  | 
 | 59 | +	{  | 
 | 60 | +		icon: GitPullRequest,  | 
 | 61 | +		title: "Repository- and diff-aware",  | 
 | 62 | +		description:  | 
 | 63 | +			"Analyzes the full repo context and the latest diff to ensure fixes align with project conventions and pass checks.",  | 
 | 64 | +	},  | 
 | 65 | +]  | 
 | 66 | + | 
 | 67 | +export function PrFixerContent() {  | 
 | 68 | +	return (  | 
 | 69 | +		<>  | 
 | 70 | +			<section className="relative flex md:h-[calc(70vh-theme(spacing.12))] items-center overflow-hidden">  | 
 | 71 | +				<AnimatedBackground />  | 
 | 72 | +				<div className="container relative flex items-center h-full z-10 mx-auto px-4 sm:px-6 lg:px-8">  | 
 | 73 | +					<div className="grid h-full relative gap-4 md:gap-20 lg:grid-cols-2">  | 
 | 74 | +						<div className="flex flex-col px-4 justify-center space-y-6 sm:space-y-8">  | 
 | 75 | +							<div>  | 
 | 76 | +								<h1 className="text-3xl font-bold tracking-tight mt-8  md:text-left md:text-4xl lg:text-5xl lg:mt-0">  | 
 | 77 | +									<Wrench className="size-12 mb-4" />  | 
 | 78 | +									State-of-the-art fixes for the comments on your PRs.  | 
 | 79 | +								</h1>  | 
 | 80 | + | 
 | 81 | +								<div className="mt-4 max-w-lg space-y-4 text-base text-muted-foreground md:text-left sm:mt-6">  | 
 | 82 | +									<p>  | 
 | 83 | +										Roo Code{"'"}s PR Fixer applies high-quality changes to your PRs, right from  | 
 | 84 | +										GitHub. Invoke via a PR comment and it will read the entire comment history to  | 
 | 85 | +										understand context, agreements, and tradeoffs — then implement the right fix.  | 
 | 86 | +									</p>  | 
 | 87 | +									<p>  | 
 | 88 | +										As always, you bring the model key; we orchestrate smart, efficient workflows.  | 
 | 89 | +									</p>  | 
 | 90 | +								</div>  | 
 | 91 | + | 
 | 92 | +								{/* Cross-agent link */}  | 
 | 93 | +								<div className="mt-6 flex flex-col md:flex-row md:items-center gap-2">  | 
 | 94 | +									Works great with  | 
 | 95 | +									<Link  | 
 | 96 | +										href="/reviewer"  | 
 | 97 | +										className="flex p-4 items-center rounded-full border border-blue-500/30 bg-blue-500/10 px-3 py-1 text-sm text-blue-600 backdrop-blur-sm transition-colors hover:bg-blue-500/20 dark:text-blue-400"  | 
 | 98 | +										aria-label="Works great with PR Reviewer">  | 
 | 99 | +										<GitPullRequest className="size-4 mr-2" />  | 
 | 100 | +										PR Reviewer Agent  | 
 | 101 | +										<ArrowRight className="ml-2 h-4 w-4" />  | 
 | 102 | +									</Link>  | 
 | 103 | +								</div>  | 
 | 104 | +							</div>  | 
 | 105 | + | 
 | 106 | +							<div className="flex flex-col space-y-3 sm:flex-row sm:space-x-4 sm:space-y-0 md:items-center">  | 
 | 107 | +								<Button  | 
 | 108 | +									size="lg"  | 
 | 109 | +									className="w-full sm:w-auto backdrop-blur-sm border hover:shadow-[0_0_20px_rgba(59,130,246,0.5)] transition-all duration-300"  | 
 | 110 | +									asChild>  | 
 | 111 | +									<a  | 
 | 112 | +										href={EXTERNAL_LINKS.CLOUD_APP_SIGNUP_PRO}  | 
 | 113 | +										target="_blank"  | 
 | 114 | +										rel="noopener noreferrer"  | 
 | 115 | +										onClick={trackGoogleAdsConversion}  | 
 | 116 | +										className="flex w-full items-center justify-center">  | 
 | 117 | +										Start 14-day Free Trial  | 
 | 118 | +										<ArrowRight className="ml-2" />  | 
 | 119 | +									</a>  | 
 | 120 | +								</Button>  | 
 | 121 | +								<span className="text-sm text-center md:text-left text-muted-foreground md:ml-2">  | 
 | 122 | +									(cancel anytime)  | 
 | 123 | +								</span>  | 
 | 124 | +							</div>  | 
 | 125 | +						</div>  | 
 | 126 | + | 
 | 127 | +						<div className="flex items-center justify-end mx-auto h-full mt-8 lg:mt-0">  | 
 | 128 | +							<div className="md:w-[670px] md:h-[600px] relative overflow-clip">  | 
 | 129 | +								<div className="block">  | 
 | 130 | +									<Image  | 
 | 131 | +										src={hero}  | 
 | 132 | +										alt="Example of a PR Fixer applying changes from review comments"  | 
 | 133 | +										className="max-w-full h-auto"  | 
 | 134 | +										width={800}  | 
 | 135 | +										height={711}  | 
 | 136 | +									/>  | 
 | 137 | +								</div>  | 
 | 138 | +							</div>  | 
 | 139 | +						</div>  | 
 | 140 | +					</div>  | 
 | 141 | +				</div>  | 
 | 142 | +			</section>  | 
 | 143 | + | 
 | 144 | +			{/* How It Works Section */}  | 
 | 145 | +			<section className="relative overflow-hidden border-t border-border py-32">  | 
 | 146 | +				<div className="container relative z-10 mx-auto px-4 sm:px-6 lg:px-8">  | 
 | 147 | +					<div className="mx-auto mb-12 md:mb-24 max-w-5xl text-center">  | 
 | 148 | +						<div>  | 
 | 149 | +							<h2 className="text-4xl font-bold tracking-tight sm:text-5xl">How It Works</h2>  | 
 | 150 | +						</div>  | 
 | 151 | +					</div>  | 
 | 152 | + | 
 | 153 | +					<div className="relative mx-auto md:max-w-[1200px]">  | 
 | 154 | +						<ul className="grid grid-cols-1 place-items-center gap-6 md:grid-cols-3 lg:gap-8">  | 
 | 155 | +							{workflowSteps.map((step, index) => {  | 
 | 156 | +								const Icon = step.icon  | 
 | 157 | +								return (  | 
 | 158 | +									<li  | 
 | 159 | +										key={index}  | 
 | 160 | +										className="relative h-full border border-border rounded-2xl bg-background p-8 transition-all duration-300 hover:shadow-lg">  | 
 | 161 | +										<Icon className="size-6 text-foreground/80" />  | 
 | 162 | +										<h3 className="mb-3 mt-3 text-xl font-semibold text-foreground">  | 
 | 163 | +											{step.title}  | 
 | 164 | +										</h3>  | 
 | 165 | +										<div className="leading-relaxed font-light text-muted-foreground">  | 
 | 166 | +											{step.description}  | 
 | 167 | +										</div>  | 
 | 168 | +									</li>  | 
 | 169 | +								)  | 
 | 170 | +							})}  | 
 | 171 | +						</ul>  | 
 | 172 | +					</div>  | 
 | 173 | +				</div>  | 
 | 174 | +			</section>  | 
 | 175 | + | 
 | 176 | +			<section className="relative overflow-hidden border-t border-border py-32">  | 
 | 177 | +				<div className="container relative z-10 mx-auto px-4 sm:px-6 lg:px-8">  | 
 | 178 | +					<div className="mx-auto mb-12 md:mb-24 max-w-5xl text-center">  | 
 | 179 | +						<div>  | 
 | 180 | +							<h2 className="text-4xl font-bold tracking-tight sm:text-5xl">  | 
 | 181 | +								Why Roo Code{"'"}s PR Fixer is different  | 
 | 182 | +							</h2>  | 
 | 183 | +						</div>  | 
 | 184 | +					</div>  | 
 | 185 | + | 
 | 186 | +					<div className="relative mx-auto md:max-w-[1200px]">  | 
 | 187 | +						<ul className="grid grid-cols-1 place-items-center gap-6 md:grid-cols-2 lg:grid-cols-3 lg:gap-8">  | 
 | 188 | +							{howItWorks.map((feature, index) => {  | 
 | 189 | +								const Icon = feature.icon  | 
 | 190 | +								return (  | 
 | 191 | +									<li  | 
 | 192 | +										key={index}  | 
 | 193 | +										className="relative h-full border border-border rounded-2xl bg-background p-8 transition-all duration-300">  | 
 | 194 | +										<Icon className="size-6 text-foreground/80" />  | 
 | 195 | +										<h3 className="mb-3 mt-3 text-xl font-semibold text-foreground">  | 
 | 196 | +											{feature.title}  | 
 | 197 | +										</h3>  | 
 | 198 | +										<div className="leading-relaxed font-light text-muted-foreground space-y-2">  | 
 | 199 | +											{feature.description}  | 
 | 200 | +										</div>  | 
 | 201 | +									</li>  | 
 | 202 | +								)  | 
 | 203 | +							})}  | 
 | 204 | +						</ul>  | 
 | 205 | +					</div>  | 
 | 206 | +				</div>  | 
 | 207 | +			</section>  | 
 | 208 | + | 
 | 209 | +			{/* CTA Section */}  | 
 | 210 | +			<section className="py-20">  | 
 | 211 | +				<div className="container mx-auto px-4 sm:px-6 lg:px-8">  | 
 | 212 | +					<div className="mx-auto max-w-4xl rounded-3xl border border-border/50 bg-gradient-to-br from-blue-500/5 via-cyan-500/5 to-purple-500/5 p-8 text-center shadow-2xl backdrop-blur-xl dark:border-white/20 dark:bg-gradient-to-br dark:from-gray-800 dark:via-gray-900 dark:to-black sm:p-12">  | 
 | 213 | +						<h2 className="mb-4 text-3xl font-bold tracking-tight sm:text-4xl">  | 
 | 214 | +							Ship fixes, not follow-ups.  | 
 | 215 | +						</h2>  | 
 | 216 | +						<p className="mx-auto mb-8 max-w-2xl text-lg text-muted-foreground">  | 
 | 217 | +							Let Roo Code{"'"}s PR Fixer turn your review feedback into clean, ready-to-merge commits.  | 
 | 218 | +						</p>  | 
 | 219 | +						<div className="flex flex-col justify-center space-y-4 sm:flex-row sm:space-x-4 sm:space-y-0">  | 
 | 220 | +							<Button  | 
 | 221 | +								size="lg"  | 
 | 222 | +								className="bg-black text-white hover:bg-gray-800 hover:shadow-lg hover:shadow-black/20 dark:bg-white dark:text-black dark:hover:bg-gray-200 dark:hover:shadow-white/20 transition-all duration-300"  | 
 | 223 | +								asChild>  | 
 | 224 | +								<a  | 
 | 225 | +									href={EXTERNAL_LINKS.CLOUD_APP_SIGNUP_PRO}  | 
 | 226 | +									target="_blank"  | 
 | 227 | +									rel="noopener noreferrer"  | 
 | 228 | +									onClick={trackGoogleAdsConversion}  | 
 | 229 | +									className="flex items-center justify-center">  | 
 | 230 | +									Start 14-day Free Trial  | 
 | 231 | +									<ArrowRight className="ml-2 h-4 w-4" />  | 
 | 232 | +								</a>  | 
 | 233 | +							</Button>  | 
 | 234 | +						</div>  | 
 | 235 | +					</div>  | 
 | 236 | +				</div>  | 
 | 237 | +			</section>  | 
 | 238 | +		</>  | 
 | 239 | +	)  | 
 | 240 | +}  | 
0 commit comments