Render raw .diff/.patch pages as a colored diff with tree-sitter syntax highlighting
Users
8
+2 in 30 days
Rating
0.0 / 5
unchanged in 30 days
Ratings
0
0 in 30 days
Store rank
#216K
#181K among extensions
Version
1.4.0
updated 7 Oct 2026
Users
monthly, 2 months
Latest, 16 Oct 2026:8 usersMove the mouse over the chart for any month
Ratings count
monthly, 2 months
Latest, 16 Oct 2026:0 ratingsMove the mouse over the chart for any month
The Chrome Web Store rounds user counts down to the leading digit, so the user line moves in steps. The ratings count is exact and is the better signal of real adoption.
About patchtree
patchtree turns a plain .diff or .patch page into the code review interface you
would get on a merge or pull request — but on the raw diff itself, on any host.
Open a diff URL such as
https://gitlab.example.com/group/project/-/merge_requests/104.diff
or click the toolbar icon on any MR/PR page and review right there. Local
.diff / .patch files opened via file:// work too.
REAL SYNTAX HIGHLIGHTING, NOT REGEX COLOURING
Most diff viewers paint patches with regular expressions, so a template string,
a nested generic or a bash heredoc quietly falls apart. patchtree runs the real
grammars instead — the same tree-sitter parsers Neovim, Helix and Zed use —
compiled to WebAssembly and executed in the extension's background worker.
· A real parse tree per file, so nesting is never guessed: markup embedded in
code, generics, macros, shell heredocs and template actions inside config
files all keep their structure.
· 30 bundled grammars, each pinned to the revision its highlight queries were
written for, covering the mainstream compiled and scripting languages plus the
config, markup and infrastructure formats a review touches. The current list
is in the project README.
· Language injection, the way editors do it: a fenced code block inside a
document is parsed with that language's own grammar, the prose around it with
the document grammar, and template actions layer over the config file beneath
them.
· Parsing runs off the main thread and grammars load lazily, one per language a
diff actually contains, so a 10 000-line diff never blocks scrolling.
· Word-level diff sits under the syntax colours: you see what changed and what
it means at once.
· A language with no bundled grammar still gets highlighted, through
highlight.js. Files with no extension are identified by their shebang, then by
auto-detection.
DIFF RENDERING
· Any plain-text .diff / .patch page, whatever served it — git-format or a
plain diff -u, GitLab, GitHub, or a local file.
· The change explains itself first: a request shows its title and description
(rendered markdown, long ones collapsed, switchable in settings), and a git
format-patch file shows its commit message with mail headers, diffstat and
links highlighted.
· Inline and side-by-side views; fully added or deleted files use the full
width in split mode.
· Expand hidden lines between hunks, or switch a file to its full contents.
· Large diffs stay smooth — only visible file sections are rendered.
NAVIGATION
· Resizable, filterable file tree: the filter matches paths and diff content,
with status icons, per-file +N -M and comment-count badges.
· Viewed checkboxes with a progress counter, one-click reset, fold/unfold, and
auto-collapsed generated files (lock files, *.pb.go, vendor/, minified). The
tree carries them per file and per folder — a folder covers everything under
it and folds itself once fully read, reload included.
· Keyboard, bound to physical keys so any layout works: j/k files, n/p threads,
v viewed, x fold, s inline/side-by-side, e file tree, / filter, ? all
shortcuts.
· Per-commit diff picker: rows show subject, author and date, copy the full sha
or open the commit on the host, with a filter field on long branches.
· Copy-path, open-at-head, and line permalinks.
· Request summary in the toolbar: a state chip (Open / Draft / Merged / Closed)
then who is merging which branch into which, and when.
· The way back: the state chip links to the request, and the toolbar icon works
both ways — request to diff, diff to request, re-using the tab you came from.
REVIEW (WITH AN ACCESS TOKEN)
· Threads anchored to lines, on the old or new side, with replies, editing and
deletion of your own comments.
· Markdown editor with a toolbar and Write/Preview tabs, rendered through the
platform's own markdown API.
· Suggestions: one click prefills a suggestion block; existing ones render as a
red/green widget with Apply (GitLab).
· Multi-line comments — shift-click or drag over line numbers.
· Resolve/unresolve threads and an unresolved badge that lists every open one —
location, comment, author, age, reply count — to jump to it or resolve it
right there, with a filter on long lists.
· Draft reviews and a Submit-review panel: Comment / Approve / Request changes,
with the approval state shown as a badge.
· Pipeline status that opens up: the toolbar badge lists the jobs behind it
(name, stage, state, a click to the log), and the Approve option warns while
the pipeline is red — so a broken build is hard to approve by accident.
· Merge-conflict indicator in the toolbar.
APPEARANCE
· Theme gallery with the base24 schemes from tinted-theming, live code previews
(including how added and removed lines look), light/dark filter, and
paste-your-own scheme YAML.
· Bundled fonts (JetBrains Mono, Inter, Nerd Font builds) or any local font by
name; separate UI and code font sizes, tab width, italic-comment and ligature
toggles.
SETUP
· Rendering needs no account. To turn on review actions, open the gear menu →
Access tokens and add a GitLab host (personal access token, api scope) and/or
a GitHub token (classic repo, or fine-grained with Pull requests read/write).
· Chrome: keep Site access at "On all sites" (or grant your hosts explicitly),
otherwise the content script is not injected. To render local files, allow
access to file URLs in the extension's details page.
PRIVACY
patchtree talks only to the host serving the diff and that host's API
(GitLab/GitHub) to render diffs and post your review actions. Access tokens are
entered by you, stored locally, and never synced or sent anywhere else. No
analytics, no tracking, no third-party servers.
Open source, Apache-2.0: https://github.com/danilrwx/patchtree