Skip to content

Add PR review page with diff viewer and inline comments#27

Merged
stylessh merged 2 commits intomainfrom
stylessh/pr-review-page
Apr 8, 2026
Merged

Add PR review page with diff viewer and inline comments#27
stylessh merged 2 commits intomainfrom
stylessh/pr-review-page

Conversation

@stylessh
Copy link
Copy Markdown
Owner

@stylessh stylessh commented Apr 8, 2026

Summary

  • Adds a dedicated code review page at /$owner/$repo/review/$pullId with syntax-highlighted diffs powered by @pierre/diffs, a resizable file tree sidebar, and multi-line inline comment support via gutter drag selection
  • Implements review submission flow (Comment, Approve, Request Changes) with pending comments sent to GitHub's review API including start_line/start_side for multi-line comments
  • Extracts shared Shiki themes to packages/ui/src/lib/shiki-themes.ts, adds server functions for PR files and review comments, and extends the tab system with a review tab type showing +/- diff stats
  • Adds "Review changes" CTA button on the PR detail page linking to the review page

Test plan

  • Navigate to a PR detail page and click "Review changes" to open the review page
  • Verify file tree shows correct directory structure with folder/file icons, clicking scrolls to diff
  • Toggle between unified/split diff styles
  • Click the gutter "+" button on a single line to add an inline comment
  • Drag across multiple gutter lines to create a multi-line comment with range indicator
  • Submit a review with Comment/Approve/Request Changes and verify pending comments are sent
  • Toggle dark/light mode and verify diffs render correctly in both themes
  • Verify the review tab appears in the topbar with the reviews icon and +/- stats

Introduces a dedicated code review page at /$owner/$repo/review/$pullId
powered by @pierre/diffs for syntax-highlighted diffs with multi-line
comment support via gutter drag selection. Includes resizable file tree
sidebar, review submission (Comment/Approve/Request Changes), and proper
dark/light theme integration.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
quickhub 4082e29 Commit Preview URL

Branch Preview URL
Apr 08 2026, 08:33 PM

Shiki's bundled language grammars (~1.5 MB) were being included in the
server bundle via @pierre/diffs and markdown.tsx, pushing the worker
over the 3 MiB free plan limit.

- Add Vite plugin to stub shiki in SSR environment
- Lazy-load PatchDiff component to avoid SSR import chain to shiki
- Guard shiki highlighter initialization to client-only in markdown.tsx
@stylessh stylessh merged commit 41a26d1 into main Apr 8, 2026
2 checks passed
stylessh added a commit that referenced this pull request Apr 18, 2026
* Add PR review page with diff viewer, inline comments, and file tree

Introduces a dedicated code review page at /$owner/$repo/review/$pullId
powered by @pierre/diffs for syntax-highlighted diffs with multi-line
comment support via gutter drag selection. Includes resizable file tree
sidebar, review submission (Comment/Approve/Request Changes), and proper
dark/light theme integration.

* Fix CF Workers deployment: exclude shiki from server bundle

Shiki's bundled language grammars (~1.5 MB) were being included in the
server bundle via @pierre/diffs and markdown.tsx, pushing the worker
over the 3 MiB free plan limit.

- Add Vite plugin to stub shiki in SSR environment
- Lazy-load PatchDiff component to avoid SSR import chain to shiki
- Guard shiki highlighter initialization to client-only in markdown.tsx
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