Chrome/Edge extension that lets you leave and view inline PR review comments directly from GitHub's rendered markdown (rich diff) view.
GitHub's "Files changed" rich diff renders markdown beautifully but provides no way to click on a paragraph and leave a comment. Existing review threads are also hidden — you have to switch back to source-diff mode to see or post anything.
- Overlays a
+button on every paragraph, heading, list item, table row, and code block in rich diff. - Click
+→ write a comment → posts as a real PR review comment on the correct source line. - Renders existing review threads inline at the rendered block that corresponds to each commented line.
- Reply to threads, resolve / unresolve them, and see resolved / outdated state — all from the rendered view.
- Threads sidebar docked to the right edge lists every review thread (author, snippet, file:line, resolved / outdated tags) — click to jump, with prev/next chevrons and a comment counter.
- Outline tab in the sidebar shows the heading tree of every changed
.mdfile with comment-count pills, per-section folding, and bulkFold H1 / H2 / H3/Expand allcontrols. - One-click "Render all Markdown files as rich-diff" flips every
.mdfile in the PR from source-diff to rich-diff in a single sweep, so comments on those files load automatically. - Keyboard shortcuts:
j/knext / previous thread,h/lfirst / last,ttoggle the sidebar,Shift+Treset its position. - No PAT required — uses your existing GitHub session cookies (works for public and private repos).
(For submitting a full review / approve / request changes, use GitHub's native "Review changes" button at the top of the Files-changed tab.)
See docs/FEATURES.md for the full feature list and roadmap.
Chrome Web Store and Edge Add-ons listings are pending review. Until they're live, use the developer-mode install below.
See INSTALL.md for the user-facing walkthrough.
git clone https://github.com/chienyuanchang/rich-diff-comments- Open Chrome →
chrome://extensions/(or Edge →edge://extensions/) - Enable Developer mode
- Click Load unpacked and select the cloned folder
- Open any GitHub PR → Files changed → toggle rich diff on a
.mdfile
After editing content.js, click the reload icon on the extension card and hard-refresh the PR (Ctrl+Shift+R).
- Open a PR → Files changed tab
- Toggle rich diff (document icon) on any markdown file
- Hover a block → click the
+button → type → Comment - Existing comments appear inline as a
💬 N commentsbadge — click to expand
manifest.json Extension manifest (Manifest V3)
src/lib/ Pure helpers shared between extension + tests
textMatch.js block text → source-line matching
responses.js GitHub API response parsing, path validation, escapeHtml, formatTimeAgo
tableRows.js table row → source-line arithmetic
markdownPreview.js offline markdown → HTML for the Preview tab
codeBlocks.js fence detection + thread-head sorting
content.js Main content script (DOM + fetch glue)
styles.css Comment button and box styles
icons/ Extension icons
tests/ Node test runner specs (`npm test`)
test_md_files/ Synthetic Markdown fixture for manual rich-diff testing
docs/APPROACH.md Strategy and design choices (start here)
docs/DEV_NOTES.md Implementation notes & GitHub internal data shapes
docs/PUBLISHING.md Store submission and release workflow
Pure helpers (line matching, response parsing, table arithmetic, code-block fence detection, anchor-key encoding) have unit tests using Node's built-in test runner — no npm install required.
node --test tests/*.test.jsDOM glue and the network layer aren't unit-tested — they're covered by the manual test checklist.
Build a publish-ready zip for the Chrome Web Store / Edge Add-ons:
# From this folder
.\scripts\package.ps1
# → rdc-<version>.zip (version is read from manifest.json)See docs/PUBLISHING.md for the full publishing workflow (store submission, listing copy, permissions justification, versioning).
For a guided pre-submission audit + per-version release-doc generation, the rdc-publish-check skill automates the workflow.
- Mermaid diagrams and other non-text blocks can't be matched against source — comments near them may anchor to the previous matched block.
- Lines outside any diff hunk are rejected by GitHub with
Line could not be resolved. - Requires the rich-diff (prose-diff) view to be active for a file.
- docs/FEATURES.md — full feature list, roadmap, gap analysis.
- docs/APPROACH.md — strategy and design choices (start here if you're new).
- docs/DEV_NOTES.md — internal GitHub data shapes, gotchas, and debugging recipes.
This is an independent, third-party browser extension. It is not affiliated with, endorsed by, sponsored by, or otherwise connected to GitHub, Inc. "GitHub" is a registered trademark of GitHub, Inc., and is used here only to identify the service this extension works with.
Released under the MIT License.