Skip to content

Live GitHub PR demo + shared diff-viewer core#19

Merged
mblode merged 2 commits into
mainfrom
feat/live-pr-demo
Jun 1, 2026
Merged

Live GitHub PR demo + shared diff-viewer core#19
mblode merged 2 commits into
mainfrom
feat/live-pr-demo

Conversation

@mblode

@mblode mblode commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Adds a live PR viewer to diffhub.blode.co (/{owner}/{repo}/pull/{number}) that renders any public GitHub PR in the exact CLI viewer, and extracts the diff engine + chrome (StatusBar, FileList, FileDiffHeader, sidebar) into a shared @diffhub/diff-core package consumed by both apps.

Also fixes a CodeView paint quirk where the diff could render blank (line backgrounds only) until you scroll, via a shared useCodeViewPaintNudge hook used by both viewers. @diffhub/diff-core is a build-time dev dependency of the CLI (inlined into the standalone output), so the published package stays self-contained.

🤖 Generated with Claude Code

mblode and others added 2 commits June 1, 2026 17:36
Extract the diff-viewer engine and chrome (StatusBar, FileList, FileTreeBody,
FileDiffHeader, sidebar + the shadcn primitives they use) into a new
@diffhub/diff-core workspace package, consumed verbatim by both apps/cli and the
new diffhub.blode.co live demo at /{owner}/{repo}/pull/{number}.

The demo fetches a PR's diff from GitHub server-side (cache-only, no token) and
streams it into the exact CLI viewer. Git-only StatusBar controls (branch/watch/
comments/diff-mode) are now optional props; the demo shows base <- head branch
badges and an Auto/Light/Dark theme toggle, scoped dark by default.

- Tailwind @source so the package's utility classes are generated in both apps
- Palette scoped at <html> so base-ui portaled popups (dropdowns) match the theme
- Invisible opacity nudge works around a Chrome compositing skip on CodeView's
  shadow-DOM grid (renders blank until a repaint is forced)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Extract the CodeView paint nudge into a shared useCodeViewPaintNudge hook used by
both the CLI DiffViewer and the web ReadOnlyDiffView. On first mount Chrome can
skip compositing CodeView's freshly-rendered shadow-DOM grid, leaving the diff
blank (line backgrounds only, no code) until the user scrolls; the hook flicks
the scroll container's opacity to 0.999 and back to force a repaint with no
visible change.

Move @diffhub/diff-core to devDependencies in apps/cli: it's a build-time
workspace package inlined into the standalone output via transpilePackages, not a
runtime dependency, so the published (private, unpublished) package must not
appear in the cli's runtime dependencies.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
diffhub-web Ready Ready Preview, Comment Jun 1, 2026 9:13am

Request Review

@mblode mblode merged commit 6216cf9 into main Jun 1, 2026
4 checks passed
@mblode mblode deleted the feat/live-pr-demo branch June 1, 2026 09:18
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