diff --git a/pygitweb/src/pygitweb/git_helpers.py b/pygitweb/src/pygitweb/git_helpers.py
index e66cd01..c6d0427 100644
--- a/pygitweb/src/pygitweb/git_helpers.py
+++ b/pygitweb/src/pygitweb/git_helpers.py
@@ -525,3 +525,88 @@ def get_commit_unified_diff(project: str, h: str) -> tuple[str, str]:
     body = diff.patch or ""
     oid_short = commit.short_id[:7] if len(commit.short_id) >= 7 else commit.short_id
     return body, oid_short
+
+
+_DELTA_STATUS_NAMES: dict[int, str] = {
+    int(pygit2.enums.DeltaStatus.ADDED): "added",
+    int(pygit2.enums.DeltaStatus.DELETED): "deleted",
+    int(pygit2.enums.DeltaStatus.MODIFIED): "modified",
+    int(pygit2.enums.DeltaStatus.RENAMED): "renamed",
+    int(pygit2.enums.DeltaStatus.COPIED): "copied",
+    int(pygit2.enums.DeltaStatus.TYPECHANGE): "typechange",
+}
+
+
+def range_diff(repo: pygit2.Repository, old: pygit2.Commit, new: pygit2.Commit) -> pygit2.Diff:
+    """Tree-to-tree diff with rename detection."""
+    diff = repo.diff(old, new)
+    diff.find_similar()
+    return diff
+
+
+def delta_status_name(status: int) -> str:
+    return _DELTA_STATUS_NAMES.get(int(status), "unknown")
+
+
+def range_diff_file_entry(patch: pygit2.Patch) -> dict[str, Any]:
+    """Summary dict for one patch (no unified diff body)."""
+    delta = patch.delta
+    _context, additions, deletions = patch.line_stats
+    old_path = delta.old_file.path or ""
+    new_path = delta.new_file.path or ""
+    path = new_path or old_path
+    return {
+        "path": path,
+        "old_path": old_path or None,
+        "new_path": new_path or None,
+        "status": delta_status_name(int(delta.status)),
+        "status_char": delta.status_char(),
+        "binary": bool(delta.is_binary),
+        "additions": int(additions),
+        "deletions": int(deletions),
+    }
+
+
+def range_diff_summary(repo: pygit2.Repository, old: pygit2.Commit, new: pygit2.Commit) -> dict[str, Any]:
+    """File-level summary for ``old``…``new`` without patch bodies."""
+    diff = range_diff(repo, old, new)
+    files = [range_diff_file_entry(patch) for patch in diff if patch is not None]
+    return {
+        "empty": len(files) == 0,
+        "files_total": len(files),
+        "files": files,
+        "ours_oid": str(old.id),
+        "head_oid": str(new.id),
+    }
+
+
+def range_diff_file_patch(
+    repo: pygit2.Repository,
+    old: pygit2.Commit,
+    new: pygit2.Commit,
+    path: str,
+    old_path: str | None = None,
+) -> dict[str, Any] | None:
+    """
+    Unified patch for a single path in ``old``…``new``.
+    Matches ``path`` against new or old delta paths; ``old_path`` narrows renames.
+    Returns None when no matching delta exists.
+    """
+    want_old = (old_path or "").strip() or None
+    diff = range_diff(repo, old, new)
+    for patch in diff:
+        if patch is None:
+            continue
+        delta = patch.delta
+        new_p = delta.new_file.path or ""
+        old_p = delta.old_file.path or ""
+        if path not in (new_p, old_p):
+            continue
+        if want_old is not None and want_old not in (old_p, new_p):
+            continue
+        entry = range_diff_file_entry(patch)
+        text = patch.text or ""
+        entry["diff"] = text
+        entry["empty"] = not bool(text.strip()) or bool(delta.is_binary)
+        return entry
+    return None
diff --git a/pygitweb/src/pygitweb/merge_requests.py b/pygitweb/src/pygitweb/merge_requests.py
index cf8d6f1..9c8b781 100644
--- a/pygitweb/src/pygitweb/merge_requests.py
+++ b/pygitweb/src/pygitweb/merge_requests.py
@@ -7,13 +7,16 @@ from urllib.parse import quote, urlencode
 
 import pygit2
 from fastapi import APIRouter, Depends, Form, HTTPException, Query
-from fastapi.responses import HTMLResponse, RedirectResponse
+from fastapi.responses import HTMLResponse, JSONResponse, RedirectResponse
 from pygittools.merge import (
     MergeRequest,
+    get_merge_request,
+    get_merge_request_by_oid,
     merge_request_status_fields,
+    peel_mr_head_to_commit_oid,
     resolve_merge_request_tag_to_tip,
 )
-from pygittools.validation import is_valid_ref_format
+from pygittools.validation import is_valid_pathname, is_valid_ref_format
 
 from pygitweb.auth import access_token_from_request, principal_from_session
 from pygitweb.dependencies import (
@@ -22,7 +25,12 @@ from pygitweb.dependencies import (
     ValidatedReadableFormProject,
     ValidatedReadableProject,
 )
-from pygitweb.git_helpers import open_repo, resolve_mr_opener
+from pygitweb.git_helpers import (
+    open_repo,
+    range_diff_file_patch,
+    range_diff_summary,
+    resolve_mr_opener,
+)
 from pygitweb.permissions import Permission
 from pygitweb.templates_env import render_page
 
@@ -34,6 +42,58 @@ def _branch_short_name(ref: str) -> str:
 merge_router = APIRouter(tags=["merge_requests"])
 
 
+def _mr_range_commits(repo: pygit2.Repository, mr: MergeRequest) -> tuple[pygit2.Commit, pygit2.Commit]:
+    """Resolve ``ours`` tip and MR head commits for range diffs."""
+    try:
+        ours_commit = repo.revparse_single(mr.ours).peel(pygit2.Commit)
+    except (KeyError, ValueError, pygit2.GitError) as exc:
+        raise HTTPException(status_code=404, detail=f"Cannot resolve ours ref {mr.ours!r}") from exc
+    try:
+        head_oid = peel_mr_head_to_commit_oid(repo, mr.target)
+    except (KeyError, TypeError, ValueError) as exc:
+        raise HTTPException(status_code=404, detail="Merge request head not found") from exc
+    head_obj = repo[head_oid]
+    if not isinstance(head_obj, pygit2.Commit):
+        raise HTTPException(status_code=400, detail="Merge request head is not a commit")
+    return ours_commit, head_obj
+
+
+def _load_merge_request_for_diff(
+    repo: pygit2.Repository,
+    *,
+    h: str | None,
+    mr: str | None,
+) -> MergeRequest:
+    if bool(h) == bool(mr):
+        raise HTTPException(status_code=400, detail="Provide exactly one of h or mr")
+    if h:
+        if not is_valid_ref_format(h):
+            raise HTTPException(status_code=400, detail="Invalid tag hash (h)")
+        try:
+            oid = pygit2.Oid(hex=h)
+            return get_merge_request_by_oid(repo, oid)
+        except (KeyError, ValueError, TypeError) as exc:
+            raise HTTPException(status_code=404, detail="Merge request tag not found") from exc
+    assert mr is not None
+    if not is_valid_ref_format(mr):
+        raise HTTPException(status_code=400, detail="Invalid merge request ref")
+    try:
+        return get_merge_request(repo, mr)
+    except (KeyError, ValueError, TypeError, pygit2.GitError) as exc:
+        raise HTTPException(status_code=404, detail="Merge request not found") from exc
+
+
+def _mr_diff_context(
+    project: ValidatedReadableProject,
+    h: str | None,
+    mr: str | None,
+) -> tuple[pygit2.Repository, MergeRequest, pygit2.Commit, pygit2.Commit]:
+    repo = open_repo(project)
+    merge_req = _load_merge_request_for_diff(repo, h=h, mr=mr)
+    ours_commit, head_commit = _mr_range_commits(repo, merge_req)
+    return repo, merge_req, ours_commit, head_commit
+
+
 def _head_view_url(project: str, repo: pygit2.Repository, head_hex: str) -> tuple[str, str]:
     try:
         oid = pygit2.Oid(hex=head_hex)
@@ -104,6 +164,50 @@ def merge_request_tag_response(
     return render_page("merge_request_tag.html", title=title, **ctx)
 
 
+@merge_router.get("/diff/summary")
+def merge_request_diff_summary(
+    project: ValidatedReadableProject,
+    h: str | None = Query(None, description="Annotated MR tag object id (hex)"),
+    mr: str | None = Query(None, description="Merge request ref (e.g. refs/tags/mr/...)"),
+) -> JSONResponse:
+    """File list + line counts for the MR range (no patch bodies)."""
+    _repo, merge_req, ours_commit, head_commit = _mr_diff_context(project, h, mr)
+    payload = range_diff_summary(_repo, ours_commit, head_commit)
+    payload["ours"] = merge_req.ours
+    payload["mr"] = merge_req.name
+    return JSONResponse(content=payload)
+
+
+@merge_router.get("/diff/patch")
+def merge_request_diff_patch(
+    project: ValidatedReadableProject,
+    path: str = Query(..., description="File path in the MR diff (usually new path)"),
+    old_path: str | None = Query(None, description="Optional old path (renames)"),
+    h: str | None = Query(None, description="Annotated MR tag object id (hex)"),
+    mr: str | None = Query(None, description="Merge request ref (e.g. refs/tags/mr/...)"),
+) -> JSONResponse:
+    """Unified patch for a single path in the MR range."""
+    if not is_valid_pathname(path):
+        raise HTTPException(status_code=400, detail="Invalid path")
+    if old_path is not None and old_path != "" and not is_valid_pathname(old_path):
+        raise HTTPException(status_code=400, detail="Invalid old_path")
+    _repo, merge_req, ours_commit, head_commit = _mr_diff_context(project, h, mr)
+    entry = range_diff_file_patch(
+        _repo,
+        ours_commit,
+        head_commit,
+        path,
+        old_path=old_path or None,
+    )
+    if entry is None:
+        raise HTTPException(status_code=404, detail="Path not found in merge request diff")
+    entry["ours"] = merge_req.ours
+    entry["mr"] = merge_req.name
+    entry["ours_oid"] = str(ours_commit.id)
+    entry["head_oid"] = str(head_commit.id)
+    return JSONResponse(content=entry)
+
+
 @merge_router.post(
     "/create",
     dependencies=[Depends(RequireFormPermission(Permission.MR_CREATE))],
diff --git a/pygitweb/src/pygitweb/merge_requests_test.py b/pygitweb/src/pygitweb/merge_requests_test.py
index fe0969a..6cc3fd4 100644
--- a/pygitweb/src/pygitweb/merge_requests_test.py
+++ b/pygitweb/src/pygitweb/merge_requests_test.py
@@ -19,7 +19,11 @@ def _commit_chain(repo: pygit2.Repository) -> tuple[pygit2.Oid, pygit2.Oid]:
     tree = tb.write()
     a = repo.create_commit(None, sig, sig, "a", tree, [])
     repo.create_reference("refs/heads/main", a)
-    b = repo.create_commit(None, sig, sig, "b", tree, [a])
+    blob = repo.create_blob(b"feature\n")
+    tb2 = repo.TreeBuilder()
+    tb2.insert("feature.txt", blob, pygit2.GIT_FILEMODE_BLOB)
+    tree2 = tb2.write()
+    b = repo.create_commit(None, sig, sig, "b", tree2, [a])
     return a, b
 
 
@@ -93,8 +97,70 @@ class TestMergeRequestTagView:
         assert 'data-mr-ref="refs/tags/mr/aaaabbbbccccdddd"' in text
         assert "mr-comments-section" in text
         assert "/static/mr-comments.js" in text
+        assert "/static/mr-diff.js" in text
+        assert 'href="#mr-tab-overview"' in text
+        assert 'href="#mr-tab-diff"' in text
+        assert 'href="#mr-tab-comments"' in text
+        assert 'id="mr-diff-root"' in text
         assert "No comment references." not in text
 
+    def test_mr_diff_summary_and_patch_apis(self, mr_env: dict[str, str]) -> None:
+        client = mr_env["client"]
+        summary = client.get(
+            "/mr/diff/summary",
+            params={"project": mr_env["project"], "mr": mr_env["mr_ref"]},
+        )
+        assert summary.status_code == 200
+        body = summary.json()
+        assert body["empty"] is False
+        assert body["files_total"] == 1
+        assert body["mr"] == mr_env["mr_ref"]
+        assert body["head_oid"] == mr_env["tip_b"]
+        assert body["files"][0]["path"] == "feature.txt"
+        assert body["files"][0]["status"] == "added"
+        assert "diff" not in body["files"][0]
+
+        by_oid = client.get(
+            "/mr/diff/summary",
+            params={"project": mr_env["project"], "h": mr_env["mr_tag_oid"]},
+        )
+        assert by_oid.status_code == 200
+        assert by_oid.json()["files"] == body["files"]
+
+        patch = client.get(
+            "/mr/diff/patch",
+            params={
+                "project": mr_env["project"],
+                "mr": mr_env["mr_ref"],
+                "path": "feature.txt",
+            },
+        )
+        assert patch.status_code == 200
+        patch_body = patch.json()
+        assert patch_body["path"] == "feature.txt"
+        assert "feature.txt" in patch_body["diff"]
+        assert "+feature" in patch_body["diff"]
+
+        missing = client.get(
+            "/mr/diff/patch",
+            params={
+                "project": mr_env["project"],
+                "mr": mr_env["mr_ref"],
+                "path": "nope.txt",
+            },
+        )
+        assert missing.status_code == 404
+
+        both = client.get(
+            "/mr/diff/summary",
+            params={
+                "project": mr_env["project"],
+                "mr": mr_env["mr_ref"],
+                "h": mr_env["mr_tag_oid"],
+            },
+        )
+        assert both.status_code == 400
+
     def test_merge_ff_updates_branch(self, mr_env: dict[str, str]) -> None:
         client = mr_env["client"]
         post = client.post(
diff --git a/pygitweb/src/pygitweb/static/d2h-render.js b/pygitweb/src/pygitweb/static/d2h-render.js
new file mode 100644
index 0000000..2ae275a
--- /dev/null
+++ b/pygitweb/src/pygitweb/static/d2h-render.js
@@ -0,0 +1,63 @@
+import { escapeHtml } from "./dom.js";
+
+/** @type {Record<string, unknown>} */
+export const D2H_DEFAULT_CONFIG = {
+	drawFileList: true,
+	matching: "lines",
+	outputFormat: "side-by-side",
+	synchronisedScroll: true,
+	highlight: true,
+	// Keep light scheme classes; dark comes from --pgw-diff-* via prefers-color-scheme.
+	colorScheme: "light",
+};
+
+/**
+ * Render a unified diff string into ``output`` with Diff2HtmlUI.
+ * @param {HTMLElement} output
+ * @param {string} diffStr
+ * @param {Record<string, unknown>} [config]
+ * @returns {boolean} true when a non-empty diff was drawn
+ */
+export function renderUnifiedDiff(output, diffStr, config) {
+	const text = diffStr || "";
+	if (!text.trim()) {
+		return false;
+	}
+	if (typeof Diff2HtmlUI === "undefined") {
+		output.innerHTML =
+			'<p class="text-danger">Diff renderer failed to load.</p>';
+		return false;
+	}
+	try {
+		const diff2htmlUi = new Diff2HtmlUI(output, text, {
+			...D2H_DEFAULT_CONFIG,
+			...(config || {}),
+		});
+		diff2htmlUi.draw();
+		diff2htmlUi.highlightCode();
+		return true;
+	} catch (e) {
+		const message = e && e.message ? e.message : String(e);
+		output.innerHTML =
+			'<p class="text-danger">Failed to render diff: ' +
+			escapeHtml(message) +
+			"</p>";
+		return false;
+	}
+}
+
+/**
+ * Decode a base64-encoded UTF-8 diff payload.
+ * @param {string} diffB64
+ * @returns {string}
+ */
+export function decodeDiffB64(diffB64) {
+	const raw = atob(diffB64);
+	if (!raw) return "";
+	if (typeof TextDecoder !== "undefined") {
+		return new TextDecoder("utf-8").decode(
+			Uint8Array.from(raw, (c) => c.charCodeAt(0)),
+		);
+	}
+	return raw;
+}
diff --git a/pygitweb/src/pygitweb/static/diff-view.js b/pygitweb/src/pygitweb/static/diff-view.js
index 473e367..b05b885 100644
--- a/pygitweb/src/pygitweb/static/diff-view.js
+++ b/pygitweb/src/pygitweb/static/diff-view.js
@@ -1,4 +1,5 @@
 import { escapeHtml } from "./dom.js";
+import { decodeDiffB64, renderUnifiedDiff } from "./d2h-render.js";
 
 const container = document.getElementById("d2h-container");
 const output = document.getElementById("d2h-output");
@@ -16,29 +17,21 @@ function render() {
 		return;
 	}
 	try {
-		const raw = atob(diffB64);
-		if (!raw) {
+		const diffStr = decodeDiffB64(diffB64);
+		if (!diffStr) {
 			emptyEl.textContent = emptyText;
 			emptyEl.style.display = "block";
 			return;
 		}
-		const diffStr = (typeof TextDecoder !== "undefined")
-			? new TextDecoder("utf-8").decode(Uint8Array.from(raw, (c) => c.charCodeAt(0)))
-			: raw;
-		const config = {
-			drawFileList: true,
-			matching: "lines",
-			outputFormat: "side-by-side",
-			synchronisedScroll: true,
-			highlight: true,
-			// Keep light scheme classes; dark comes from --pgw-diff-* via prefers-color-scheme.
-			colorScheme: "light",
-		};
-		const diff2htmlUi = new Diff2HtmlUI(output, diffStr, config);
-		diff2htmlUi.draw();
-		diff2htmlUi.highlightCode();
+		if (!renderUnifiedDiff(output, diffStr)) {
+			emptyEl.textContent = emptyText;
+			emptyEl.style.display = "block";
+		}
 	} catch (e) {
-		output.innerHTML = '<p class="text-danger">Failed to render diff: ' + escapeHtml(e.message || e) + "</p>";
+		output.innerHTML =
+			'<p class="text-danger">Failed to render diff: ' +
+			escapeHtml(e.message || e) +
+			"</p>";
 	}
 }
 
diff --git a/pygitweb/src/pygitweb/static/main.css b/pygitweb/src/pygitweb/static/main.css
index 5ec974e..e80dad2 100644
--- a/pygitweb/src/pygitweb/static/main.css
+++ b/pygitweb/src/pygitweb/static/main.css
@@ -18,9 +18,13 @@
 	--pgw-bg: #fafafa;
 	--pgw-bg-raised: #ffffff;
 	--pgw-bg-muted: #f4f4f5;
+	/* Between page bg and raised cards; used for Tabler tertiary chrome */
+	--pgw-bg-tertiary: #eeeef2;
 	--pgw-border: #e4e4e7;
 	--pgw-border-muted: #d4d4d8;
 
+	--tblr-bg-surface-tertiary: var(--pgw-bg-tertiary);
+
 	--pgw-text: #18181b;
 	--pgw-text-muted: #52525b;
 	--pgw-text-dim: #71717a;
@@ -118,9 +122,13 @@
 		--pgw-bg: #1a1a1e;
 		--pgw-bg-raised: #25252c;
 		--pgw-bg-muted: #2d2d36;
+		/* Between page bg (#1a1a1e) and raised (#25252c); avoid Tabler's #1a2234 clash */
+		--pgw-bg-tertiary: #1f1f26;
 		--pgw-border: #3d3d48;
 		--pgw-border-muted: #35353d;
 
+		--tblr-bg-surface-tertiary: var(--pgw-bg-tertiary);
+
 		--pgw-text: #e4e4e7;
 		--pgw-text-muted: #a1a1aa;
 		--pgw-text-dim: #71717a;
@@ -216,6 +224,29 @@ body {
 		background-color: var(--pgw-accent-bg);
 		border-bottom-color: var(--pgw-border);
 		color: var(--pgw-accent-text);
+
+		.nav-tabs.card-header-tabs {
+			border-bottom-color: transparent;
+
+			.nav-link {
+				background-color: transparent;
+				border-color: transparent;
+				color: var(--pgw-text-muted);
+
+				&:hover,
+				&:focus {
+					background-color: transparent;
+					border-color: var(--pgw-border) var(--pgw-border) transparent;
+					color: var(--pgw-text);
+				}
+
+				&.active {
+					background-color: var(--pgw-bg-raised);
+					border-color: var(--pgw-border) var(--pgw-border) var(--pgw-bg-raised);
+					color: var(--pgw-text);
+				}
+			}
+		}
 	}
 
 	.card-title {
@@ -695,6 +726,9 @@ tbody tr {
 }
 
 [data-bs-theme="dark"] {
+	/* Beat Tabler's [data-bs-theme=dark] tertiary (= card/body #1a2234) */
+	--tblr-bg-surface-tertiary: var(--pgw-bg-tertiary);
+
 	.navbar-vertical .navbar-toggler-icon {
 		background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
 	}
@@ -1741,3 +1775,110 @@ pre {
 	margin-top: 0.25rem;
 }
 
+/* MR Diff tab: collapsed file list, patch loaded on expand */
+.mr-diff-file-list {
+	display: flex;
+	flex-direction: column;
+	gap: 0.5rem;
+}
+
+.mr-diff-file {
+	background-color: var(--pgw-bg-raised);
+	border: 1px solid var(--pgw-border);
+	border-radius: var(--tblr-border-radius, 0.25rem);
+	overflow: hidden;
+
+	&[open] {
+		.mr-diff-file-summary {
+			border-bottom: 1px solid var(--pgw-border);
+		}
+	}
+}
+
+.mr-diff-file-summary {
+	align-items: center;
+	background-color: var(--pgw-bg-muted);
+	cursor: pointer;
+	display: flex;
+	gap: 0.5rem;
+	list-style: none;
+	padding: 0.5rem 0.75rem;
+
+	&::-webkit-details-marker {
+		display: none;
+	}
+
+	&::before {
+		color: var(--pgw-text-muted);
+		content: "▸";
+		flex-shrink: 0;
+		font-size: 0.75rem;
+		transition: transform 0.15s ease;
+	}
+}
+
+.mr-diff-file[open] > .mr-diff-file-summary::before {
+	transform: rotate(90deg);
+}
+
+.mr-diff-file-status {
+	border: 1px solid var(--pgw-border);
+	border-radius: 0.2rem;
+	flex-shrink: 0;
+	font-family: ui-monospace, "Fira Code", "Fira Mono", monospace;
+	font-size: 0.7rem;
+	font-weight: 600;
+	line-height: 1;
+	min-width: 1.25rem;
+	padding: 0.2rem 0.3rem;
+	text-align: center;
+
+	&[data-status="added"] {
+		border-color: var(--pgw-diff-ins-border);
+		color: var(--pgw-diff-ins-label);
+	}
+
+	&[data-status="deleted"] {
+		border-color: var(--pgw-diff-del-border);
+		color: var(--pgw-diff-del-label);
+	}
+
+	&[data-status="modified"],
+	&[data-status="typechange"] {
+		border-color: var(--pgw-diff-change-label);
+		color: var(--pgw-diff-change-label);
+	}
+
+	&[data-status="renamed"],
+	&[data-status="copied"] {
+		border-color: var(--pgw-diff-moved-label);
+		color: var(--pgw-diff-moved-label);
+	}
+}
+
+.mr-diff-file-path {
+	color: var(--pgw-text);
+	flex: 1;
+	font-family: ui-monospace, "Fira Code", "Fira Mono", monospace;
+	font-size: 0.8125rem;
+	min-width: 0;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+}
+
+.mr-diff-file-stats {
+	flex-shrink: 0;
+	font-family: ui-monospace, "Fira Code", "Fira Mono", monospace;
+	font-size: 0.75rem;
+}
+
+.mr-diff-file-body {
+	padding: 0.75rem;
+}
+
+.mr-diff-file-d2h {
+	max-width: 100%;
+	overflow-x: auto;
+}
+
diff --git a/pygitweb/src/pygitweb/static/mr-diff.js b/pygitweb/src/pygitweb/static/mr-diff.js
new file mode 100644
index 0000000..c9a6543
--- /dev/null
+++ b/pygitweb/src/pygitweb/static/mr-diff.js
@@ -0,0 +1,255 @@
+import { escapeHtml } from "./dom.js";
+import { renderUnifiedDiff } from "./d2h-render.js";
+
+const root = document.getElementById("mr-diff-root");
+const listEl = document.getElementById("mr-diff-output");
+const emptyEl = document.getElementById("mr-diff-empty");
+const statusEl = document.getElementById("mr-diff-status");
+const diffTab = document.getElementById("mr-tab-diff-link");
+
+/** @type {"idle" | "loading" | "ready" | "error"} */
+let summaryState = "idle";
+
+function setStatus(text, isError) {
+	if (!statusEl) return;
+	if (!text) {
+		statusEl.classList.add("d-none");
+		statusEl.textContent = "";
+		statusEl.classList.remove("text-danger");
+		return;
+	}
+	statusEl.classList.remove("d-none");
+	statusEl.textContent = text;
+	statusEl.classList.toggle("text-danger", !!isError);
+}
+
+function mrQueryParams() {
+	if (!root) return null;
+	const project = root.dataset.project || "";
+	const mr = root.dataset.mrRef || "";
+	const h = root.dataset.tagOid || "";
+	if (!project || (!mr && !h)) return null;
+	const params = new URLSearchParams({ project });
+	if (mr) params.set("mr", mr);
+	else params.set("h", h);
+	return params;
+}
+
+function summaryUrl() {
+	const params = mrQueryParams();
+	return params ? "/mr/diff/summary?" + params.toString() : "";
+}
+
+function patchUrl(path, oldPath) {
+	const params = mrQueryParams();
+	if (!params) return "";
+	params.set("path", path);
+	if (oldPath) params.set("old_path", oldPath);
+	return "/mr/diff/patch?" + params.toString();
+}
+
+function pathLabel(file) {
+	const oldPath = file.old_path || "";
+	const newPath = file.new_path || file.path || "";
+	if (file.status === "renamed" && oldPath && newPath && oldPath !== newPath) {
+		return oldPath + " → " + newPath;
+	}
+	return newPath || oldPath || file.path || "";
+}
+
+function statsLabel(file) {
+	if (file.binary) return "binary";
+	const add = Number(file.additions) || 0;
+	const del = Number(file.deletions) || 0;
+	return "+" + add + " −" + del;
+}
+
+function renderFileRow(file) {
+	const details = document.createElement("details");
+	details.className = "mr-diff-file";
+	details.dataset.path = file.path || "";
+	if (file.old_path) details.dataset.oldPath = file.old_path;
+	details.dataset.status = file.status || "";
+	details.dataset.binary = file.binary ? "true" : "false";
+
+	const summary = document.createElement("summary");
+	summary.className = "mr-diff-file-summary";
+
+	const badge = document.createElement("span");
+	badge.className = "mr-diff-file-status";
+	badge.dataset.status = file.status || "";
+	badge.textContent = file.status_char || "?";
+
+	const pathEl = document.createElement("span");
+	pathEl.className = "mr-diff-file-path";
+	pathEl.textContent = pathLabel(file);
+
+	const stats = document.createElement("span");
+	stats.className = "mr-diff-file-stats text-muted";
+	stats.textContent = statsLabel(file);
+
+	summary.appendChild(badge);
+	summary.appendChild(pathEl);
+	summary.appendChild(stats);
+
+	const body = document.createElement("div");
+	body.className = "mr-diff-file-body";
+	const placeholder = document.createElement("p");
+	placeholder.className = "text-muted small mb-0 mr-diff-file-placeholder";
+	placeholder.textContent = file.binary
+		? "Binary file — no textual diff."
+		: "Expand to load this file’s diff.";
+	body.appendChild(placeholder);
+
+	details.appendChild(summary);
+	details.appendChild(body);
+	return details;
+}
+
+function renderSummary(body) {
+	if (!listEl || !emptyEl) return;
+	const files = body && Array.isArray(body.files) ? body.files : [];
+	listEl.innerHTML = "";
+	if (!files.length || body.empty) {
+		listEl.classList.add("d-none");
+		emptyEl.textContent = "No changes between ours and the merge request head.";
+		emptyEl.classList.remove("d-none");
+		return;
+	}
+	emptyEl.classList.add("d-none");
+	listEl.classList.remove("d-none");
+	const frag = document.createDocumentFragment();
+	files.forEach(function (file) {
+		frag.appendChild(renderFileRow(file));
+	});
+	listEl.appendChild(frag);
+}
+
+function showPatchError(bodyEl, message) {
+	bodyEl.innerHTML =
+		'<p class="text-danger small mb-0">Failed to load patch: ' +
+		escapeHtml(message.slice(0, 240)) +
+		"</p>";
+}
+
+function loadFilePatch(details) {
+	const bodyEl = details.querySelector(".mr-diff-file-body");
+	if (!bodyEl) return;
+	if (details.dataset.loaded === "1" || details.dataset.loading === "1") return;
+	if (details.dataset.binary === "true") {
+		bodyEl.innerHTML =
+			'<p class="text-muted small mb-0">Binary file — no textual diff.</p>';
+		details.dataset.loaded = "1";
+		return;
+	}
+	const path = details.dataset.path || "";
+	const oldPath = details.dataset.oldPath || "";
+	const url = patchUrl(path, oldPath || undefined);
+	if (!url || !path) {
+		showPatchError(bodyEl, "Missing path.");
+		return;
+	}
+	details.dataset.loading = "1";
+	bodyEl.innerHTML = '<p class="text-muted small mb-0">Loading diff…</p>';
+	fetch(url, { credentials: "same-origin" })
+		.then(function (res) {
+			if (!res.ok) {
+				return res.text().then(function (text) {
+					throw new Error(text || "HTTP " + res.status);
+				});
+			}
+			return res.json();
+		})
+		.then(function (payload) {
+			details.dataset.loading = "0";
+			if (payload && payload.binary) {
+				bodyEl.innerHTML =
+					'<p class="text-muted small mb-0">Binary file — no textual diff.</p>';
+				details.dataset.loaded = "1";
+				return;
+			}
+			const diff = payload && typeof payload.diff === "string" ? payload.diff : "";
+			if (!diff.trim()) {
+				bodyEl.innerHTML =
+					'<p class="text-muted small mb-0">No textual changes for this file.</p>';
+				details.dataset.loaded = "1";
+				return;
+			}
+			bodyEl.innerHTML = "";
+			const mount = document.createElement("div");
+			mount.className = "mr-diff-file-d2h";
+			bodyEl.appendChild(mount);
+			const ok = renderUnifiedDiff(mount, diff, { drawFileList: false });
+			if (!ok && !mount.querySelector(".text-danger")) {
+				bodyEl.innerHTML =
+					'<p class="text-muted small mb-0">No textual changes for this file.</p>';
+			}
+			details.dataset.loaded = "1";
+		})
+		.catch(function (err) {
+			details.dataset.loading = "0";
+			const message =
+				err && err.message ? String(err.message) : "Could not load patch.";
+			showPatchError(bodyEl, message);
+		});
+}
+
+function onFileToggle(event) {
+	const details = event.target;
+	if (!(details instanceof HTMLDetailsElement)) return;
+	if (!details.classList.contains("mr-diff-file")) return;
+	if (!details.open) return;
+	loadFilePatch(details);
+}
+
+function loadSummary() {
+	if (!root || !listEl || !emptyEl) return;
+	if (summaryState === "loading" || summaryState === "ready") return;
+	const url = summaryUrl();
+	if (!url) {
+		setStatus("Missing project or merge request for diff.", true);
+		summaryState = "error";
+		return;
+	}
+	summaryState = "loading";
+	setStatus("Loading file list…", false);
+	listEl.innerHTML = "";
+	listEl.classList.add("d-none");
+	emptyEl.classList.add("d-none");
+	fetch(url, { credentials: "same-origin" })
+		.then(function (res) {
+			if (!res.ok) {
+				return res.text().then(function (text) {
+					throw new Error(text || "HTTP " + res.status);
+				});
+			}
+			return res.json();
+		})
+		.then(function (body) {
+			setStatus("", false);
+			renderSummary(body);
+			summaryState = "ready";
+		})
+		.catch(function (err) {
+			summaryState = "error";
+			const message =
+				err && err.message ? String(err.message) : "Could not load diff.";
+			setStatus("", false);
+			listEl.classList.remove("d-none");
+			listEl.innerHTML =
+				'<p class="text-danger mb-0">Failed to load diff: ' +
+				escapeHtml(message.slice(0, 240)) +
+				"</p>";
+		});
+}
+
+export function initMrDiff() {
+	if (!root || !diffTab) return;
+	if (listEl) listEl.addEventListener("toggle", onFileToggle, true);
+	diffTab.addEventListener("shown.bs.tab", loadSummary);
+	if (diffTab.classList.contains("active")) {
+		loadSummary();
+	}
+}
+
+initMrDiff();
diff --git a/pygitweb/src/pygitweb/static_tests/test_mr-diff.py b/pygitweb/src/pygitweb/static_tests/test_mr-diff.py
new file mode 100644
index 0000000..50aa81c
--- /dev/null
+++ b/pygitweb/src/pygitweb/static_tests/test_mr-diff.py
@@ -0,0 +1,101 @@
+from __future__ import annotations
+
+from pygitweb.static_tests.js_runtime import JsPage
+
+_SHELL = """
+<ul class="nav nav-tabs">
+  <a href="#mr-tab-diff" id="mr-tab-diff-link" class="nav-link" data-bs-toggle="tab">Diff</a>
+</ul>
+<div id="mr-diff-root" data-project="demo" data-mr-ref="refs/tags/mr/abcd" data-tag-oid="1">
+  <p id="mr-diff-status" class="text-muted mb-3">Open this tab to load the changed files.</p>
+  <div id="mr-diff-output" class="mr-diff-file-list d-none"></div>
+  <p id="mr-diff-empty" class="text-muted d-none mb-0"></p>
+</div>
+"""
+
+_SUMMARY = {
+    "empty": False,
+    "files_total": 1,
+    "files": [
+        {
+            "path": "feature.txt",
+            "old_path": None,
+            "new_path": "feature.txt",
+            "status": "added",
+            "status_char": "A",
+            "binary": False,
+            "additions": 1,
+            "deletions": 0,
+        }
+    ],
+    "mr": "refs/tags/mr/abcd",
+}
+
+
+def _stub_diff2html(js: JsPage) -> None:
+    js.run(
+        "globalThis.Diff2HtmlUI = function(el, diff, config) {"
+        " el.setAttribute('data-diff', diff);"
+        " el.setAttribute('data-format', config.outputFormat);"
+        " el.setAttribute('data-file-list', String(config.drawFileList));"
+        " this.draw = function() { el.setAttribute('data-drawn', '1'); };"
+        " this.highlightCode = function() { el.setAttribute('data-hl', '1'); };"
+        "};"
+    )
+
+
+def test_mr_diff_loads_collapsed_summary_on_tab_shown(js: JsPage) -> None:
+    _stub_diff2html(js)
+    js.route("/mr/diff/summary", body=_SUMMARY)
+    js.set_html(_SHELL)
+    js.load("mr-diff.js")
+    assert "changed files" in js.text("#mr-diff-status")
+    js.dispatch("#mr-tab-diff-link", "shown.bs.tab")
+    js.tick()
+    assert js.count(".mr-diff-file") == 1
+    assert js.attr(".mr-diff-file", "open") is None
+    assert "feature.txt" in js.text(".mr-diff-file-path")
+    assert js.count(".mr-diff-file-d2h") == 0
+
+
+def test_mr_diff_fetches_patch_when_file_opened(js: JsPage) -> None:
+    _stub_diff2html(js)
+    js.route("/mr/diff/summary", body=_SUMMARY)
+    js.route(
+        "/mr/diff/patch",
+        body={
+            "path": "feature.txt",
+            "diff": "diff --git a/feature.txt b/feature.txt\n+feature\n",
+            "binary": False,
+            "empty": False,
+        },
+    )
+    js.set_html(_SHELL)
+    js.load("mr-diff.js")
+    js.dispatch("#mr-tab-diff-link", "shown.bs.tab")
+    js.tick()
+    js.run("document.querySelector('.mr-diff-file').open = true;")
+    js.dispatch(".mr-diff-file", "toggle")
+    js.tick()
+    assert js.attr(".mr-diff-file-d2h", "data-drawn") == "1"
+    assert "feature.txt" in (js.attr(".mr-diff-file-d2h", "data-diff") or "")
+    assert js.attr(".mr-diff-file-d2h", "data-file-list") == "false"
+
+
+def test_mr_diff_shows_empty_summary(js: JsPage) -> None:
+    js.route("/mr/diff/summary", body={"empty": True, "files_total": 0, "files": []})
+    js.set_html(_SHELL)
+    js.load("mr-diff.js")
+    js.dispatch("#mr-tab-diff-link", "shown.bs.tab")
+    js.tick()
+    assert "No changes" in js.text("#mr-diff-empty")
+    assert "d-none" in js.classes("#mr-diff-output")
+
+
+def test_mr_diff_shows_summary_fetch_errors(js: JsPage) -> None:
+    js.route("/mr/diff/summary", status=500, text="boom")
+    js.set_html(_SHELL)
+    js.load("mr-diff.js")
+    js.dispatch("#mr-tab-diff-link", "shown.bs.tab")
+    js.tick()
+    assert "Failed to load diff" in js.text("#mr-diff-output")
diff --git a/pygitweb/src/pygitweb/templates/merge_request_tag.html b/pygitweb/src/pygitweb/templates/merge_request_tag.html
index f7bbba8..915f26c 100644
--- a/pygitweb/src/pygitweb/templates/merge_request_tag.html
+++ b/pygitweb/src/pygitweb/templates/merge_request_tag.html
@@ -1,4 +1,7 @@
 {% extends "base.html" %}
+{% block head %}
+<link rel="stylesheet" href="/static/pgw-diff.css">
+{% endblock %}
 {% block content %}
 {# Merge request view for annotated MR tags. Expects: project, project_url, tag_name, tag_oid, tag_view_url, mr_ref, mr_title, mr_description, ours_ref, ours_url, theirs_ref, theirs_url, head_short, head_url, head_full, tagger, tagger_date, opener, created_at, updated_at, merge_action_url, status_code, status_label, status_detail, show_merge_button #}
 
@@ -13,17 +16,28 @@
   · Tag: <a href="{{ tag_view_url }}" class="text-reset">{{ tag_name }}</a>
 </p>
 
-<div class="row row-cards mb-4">
-  <div class="col-12">
-    <div class="card">
-      <div class="card-header">
-        <h2 class="card-title mb-0">{{ mr_title }}</h2>
-      </div>
-      <div class="card-body">
+<div class="card">
+  <div class="card-header">
+    <ul class="nav nav-tabs card-header-tabs" data-bs-toggle="tabs" role="tablist">
+      <li class="nav-item" role="presentation">
+        <a href="#mr-tab-overview" class="nav-link active" data-bs-toggle="tab" role="tab" aria-controls="mr-tab-overview" aria-selected="true">Overview</a>
+      </li>
+      <li class="nav-item" role="presentation">
+        <a href="#mr-tab-diff" id="mr-tab-diff-link" class="nav-link" data-bs-toggle="tab" role="tab" aria-controls="mr-tab-diff" aria-selected="false">Diff</a>
+      </li>
+      <li class="nav-item" role="presentation">
+        <a href="#mr-tab-comments" class="nav-link" data-bs-toggle="tab" role="tab" aria-controls="mr-tab-comments" aria-selected="false">Comments</a>
+      </li>
+    </ul>
+  </div>
+  <div class="card-body">
+    <div class="tab-content">
+      <div class="tab-pane active show" id="mr-tab-overview" role="tabpanel">
+        <h2 class="mb-3">{{ mr_title }}</h2>
         {% if mr_description %}
         <div class="markdown-body mb-3" style="white-space: pre-wrap;">{{ mr_description }}</div>
         {% endif %}
-        <dl class="row mb-0">
+        <dl class="row mb-4">
           <dt class="col-sm-3">Ours</dt>
           <dd class="col-sm-9"><a href="{{ ours_url }}">{{ ours_ref }}</a></dd>
           <dt class="col-sm-3">Theirs</dt>
@@ -48,18 +62,8 @@
           <dt class="col-sm-3">Updated</dt>
           <dd class="col-sm-9"><code class="small">{{ updated_at }}</code></dd>
         </dl>
-      </div>
-    </div>
-  </div>
-</div>
 
-<div class="row row-cards mb-4">
-  <div class="col-12 col-lg-6">
-    <div class="card">
-      <div class="card-header">
-        <h3 class="card-title">Merge status</h3>
-      </div>
-      <div class="card-body">
+        <h3 class="mb-2">Merge status</h3>
         <p class="mb-1"><span class="badge bg-secondary">{{ status_code }}</span> {{ status_label }}</p>
         {% if status_detail %}
         <p class="text-danger small mb-0">{{ status_detail }}</p>
@@ -73,14 +77,21 @@
           {% endif %}
         </form>
       </div>
-    </div>
-  </div>
-  <div class="col-12 col-lg-6">
-    <div class="card">
-      <div class="card-header">
-        <h3 class="card-title">Comments</h3>
+
+      <div class="tab-pane" id="mr-tab-diff" role="tabpanel">
+        <div
+          id="mr-diff-root"
+          data-project="{{ project }}"
+          data-mr-ref="{{ mr_ref }}"
+          data-tag-oid="{{ tag_oid }}"
+        >
+          <p id="mr-diff-status" class="text-muted mb-3">Open this tab to load the changed files.</p>
+          <div id="mr-diff-output" class="mr-diff-file-list d-none"></div>
+          <p id="mr-diff-empty" class="text-muted d-none mb-0"></p>
+        </div>
       </div>
-      <div class="card-body">
+
+      <div class="tab-pane" id="mr-tab-comments" role="tabpanel">
         <div
           class="mr-comments-section"
           data-project="{{ project }}"
@@ -107,5 +118,7 @@
 
 {% block scripts %}
 <script defer src="/static/vendor/showdown-2.1.0.min.js"></script>
+<script defer src="/static/vendor/diff2html-3.4.56-ui.min.js"></script>
 <script type="module" src="/static/mr-comments.js"></script>
+<script type="module" src="/static/mr-diff.js"></script>
 {% endblock %}
