PR Review Copilot - Generative UI Global Hackathon: Agentic Interfaces
AI Tinkerers - Seattle
Hackathon Showcase

PR Review Copilot

Team led by an AWS SageMaker SDE with a USC MS in CS, specializing in deep learning, stable diffusion, and virtual try-on (VITON).

1 member

PR Review Copilot
PR Review Copilot is a generative UI tool for code review. You paste a GitHub pull request URL and the application produces a completely different review interface depending on what is actually in the diff — a security checklist for sensitive auth changes, an architecture impact card for refactors, a before/after surface for API changes, or a focused root-cause card for small bug fixes. The interface adapts to the pull request rather than forcing every PR through the same generic chat or comment box.

Beyond text-based chat
There is no chat sidebar. The agent’s output drives which React component renders, what fields populate, and which interactive controls appear. Reviewers see an OWASP-aligned checkbox list with severity ratings on a security PR, a files-moved/dependency-impact panel on a refactor, and a method/status diff table on an API change — all from the same backend pipeline. The UI is the answer, not a transcript of the answer.

How agent output drives the interface
A single Claude Sonnet 4.5 call returns a Zod-validated PRAnalysis object whose prType field is constrained to one of security | refactor | api-change | bug-fix. CopilotKit’s useCopilotAction hook registers each card type against the matching prType, so the classification result is what selects the live component tree. Each card receives strongly-typed signal data (risk flags, breaking-change indicators, blast radius, test coverage delta) and renders interactive primitives — checkboxes hold local review state, severity badges color-code risk, expandable sections surface the underlying diff evidence.

Stack
Next.js 16 (App Router, React 19, Turbopack) hosts a CopilotRuntime endpoint at /api/copilotkit, wired through CopilotKit’s BuiltInAgent to Anthropic’s Claude Sonnet 4.5 via the official @anthropic-ai/sdk. @octokit/rest fetches PR metadata and the paginated diff (with a size gate to prevent silent truncation). Zod validates the LLM’s structured output before it ever reaches a component. Tailwind v4 and shadcn/ui primitives compose the cards. API keys stay server-only — no NEXT_PUBLIC_ exposure — enforced by a server-only import guard.

Originality
Most LLM code-review tools generate prose comments. This one generates the review interface itself, picked from a typed catalog at runtime. The classification is the routing primitive; the cards are the product.

This was all created during the hackathon.

Anthropic CopilotKit Google DeepMind

github repo

Summarizing URL...