From 8dd9bd28a9f28f9f4a73608550b51faf3fcf7a92 Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Fri, 10 Jul 2026 17:36:51 +1000 Subject: [PATCH] fix(desktop): place diff type badge beside card title, not with right-side actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The title span's flex-1 stretched it across the row, pushing the type badge over to the commit SHA on the right. Match the per-file header layout instead: the badge sits immediately after the (truncating) file path, and the SHA/repo link/expand button — or the view toggle in the expanded dialog — are grouped and pushed right with ml-auto. Co-Authored-By: Claude Fable 5 Signed-off-by: Matt Toohey --- .../src/features/messages/ui/DiffMessage.tsx | 82 ++++++++++--------- .../messages/ui/DiffMessageExpanded.tsx | 4 +- 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/desktop/src/features/messages/ui/DiffMessage.tsx b/desktop/src/features/messages/ui/DiffMessage.tsx index 444f2d1faa..71a3460ce8 100644 --- a/desktop/src/features/messages/ui/DiffMessage.tsx +++ b/desktop/src/features/messages/ui/DiffMessage.tsx @@ -57,7 +57,7 @@ export default function DiffMessage({ >
- + {filePath ?? "diff"} {titleBadge && ( @@ -65,51 +65,53 @@ export default function DiffMessage({ {titleBadge} )} - {shortSha && ( - - {commitUrl ? ( +
+ {shortSha && ( + + {commitUrl ? ( + + {shortSha} + + ) : ( + shortSha + )} + + )} + {safeRepoUrl && !commitUrl && ( + - {shortSha} + {getHostname(safeRepoUrl)} - ) : ( - shortSha - )} - - )} - {safeRepoUrl && !commitUrl && ( - - - {getHostname(safeRepoUrl)} - - - )} - {onExpand && ( - - - - - Expand diff - - )} + + )} + {onExpand && ( + + + + + Expand diff + + )} +
{description && ( diff --git a/desktop/src/features/messages/ui/DiffMessageExpanded.tsx b/desktop/src/features/messages/ui/DiffMessageExpanded.tsx index eb30447f72..5c533bb4e5 100644 --- a/desktop/src/features/messages/ui/DiffMessageExpanded.tsx +++ b/desktop/src/features/messages/ui/DiffMessageExpanded.tsx @@ -39,7 +39,7 @@ export default function DiffMessageExpanded({
- + {filePath ?? "Diff Viewer"} {titleBadge && ( @@ -47,7 +47,7 @@ export default function DiffMessageExpanded({ {titleBadge} )} -
+