From 2bfe4279fd0a0f7467e9779e25e0bc462611890b Mon Sep 17 00:00:00 2001 From: Stephen Jennings Date: Thu, 23 Jul 2026 23:20:53 -0700 Subject: [PATCH 1/2] feat(commits): add expandable commit message body If a commit message has a body (lines after the subject), show a MoreHorizontal icon button at the end of the subject line. Clicking it expands the body below the subject in normal weight text; clicking again collapses it. --- src/browser/components/pr-overview.tsx | 145 ++++++++++++++++--------- 1 file changed, 92 insertions(+), 53 deletions(-) diff --git a/src/browser/components/pr-overview.tsx b/src/browser/components/pr-overview.tsx index 32fc08a..f057590 100644 --- a/src/browser/components/pr-overview.tsx +++ b/src/browser/components/pr-overview.tsx @@ -42,6 +42,7 @@ import { UserMinus, RefreshCw, Reply, + MoreHorizontal, } from "lucide-react"; import { Skeleton } from "../ui/skeleton"; import { Checkbox } from "../ui/checkbox"; @@ -4643,62 +4644,100 @@ function CommitsTab({ repo: string; }) { const store = usePRReviewStore(); + const [expandedShas, setExpandedShas] = useState>(new Set()); + return (
- {commits.map((commit) => ( -
{ - await store.setSelectedCommitSha(commit.sha); - const { files } = store.getSnapshot(); - if (files.length > 0) { - store.selectFile(files[0].filename); - } - }} - > - {commit.commit.author?.name} -
- - {commit.commit.message.split("\n")[0]} - -

- {commit.commit.author?.name} committed{" "} - {commit.commit.author?.date && - getTimeAgo(new Date(commit.commit.author.date))} -

-
-
- {commit.parents && commit.parents.length > 1 ? ( - - ) : ( - - )} - - {commit.sha.slice(0, 7)} - - + {commits.map((commit) => { + const subject = commit.commit.message.split("\n")[0]; + const body = commit.commit.message + .split("\n") + .slice(1) + .join("\n") + .trim(); + const hasBody = body.length > 0; + const isExpanded = expandedShas.has(commit.sha); + + return ( +
{ + await store.setSelectedCommitSha(commit.sha); + const { files } = store.getSnapshot(); + if (files.length > 0) { + store.selectFile(files[0].filename); + } + }} + > + {commit.commit.author?.name} +
+
+ {subject} + {hasBody && ( + + )} +
+ {isExpanded && ( +

+ {body} +

+ )} +

+ {commit.commit.author?.name} committed{" "} + {commit.commit.author?.date && + getTimeAgo(new Date(commit.commit.author.date))} +

+
+
+ {commit.parents && commit.parents.length > 1 ? ( + + ) : ( + + )} + + {commit.sha.slice(0, 7)} + + +
-
- ))} + ); + })}
); } From a91d119538f963d526f145fe07a8d44e2119448a Mon Sep 17 00:00:00 2001 From: Stephen Jennings Date: Thu, 23 Jul 2026 23:27:26 -0700 Subject: [PATCH 2/2] feat(commits): convert commit rows to BlockLink Clicking anywhere on a commit row (except other interactive controls) now activates the commit navigation via BlockLink. The subject line is the registered BlockLink.Link target. The GitHub SHA link gets stopPropagation so it opens externally without also triggering navigation. --- src/browser/components/pr-overview.tsx | 28 +++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/browser/components/pr-overview.tsx b/src/browser/components/pr-overview.tsx index f057590..d7c9c6e 100644 --- a/src/browser/components/pr-overview.tsx +++ b/src/browser/components/pr-overview.tsx @@ -44,6 +44,7 @@ import { Reply, MoreHorizontal, } from "lucide-react"; +import { BlockLink } from "../ui/block-link"; import { Skeleton } from "../ui/skeleton"; import { Checkbox } from "../ui/checkbox"; import { cn } from "../cn"; @@ -4659,16 +4660,9 @@ function CommitsTab({ const isExpanded = expandedShas.has(commit.sha); return ( -
{ - await store.setSelectedCommitSha(commit.sha); - const { files } = store.getSnapshot(); - if (files.length > 0) { - store.selectFile(files[0].filename); - } - }} >
- {subject} + + + {hasBody && (
-
+ ); })}