Skip to content

Commit d700ada

Browse files
fix(web): commit menu rows fit on one line
Subject, relative date and SHA share a row instead of stacking the date under the SHA, so the menu reads as a list and shows twice the commits. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent c8f6cad commit d700ada

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

‎apps/web/src/components/DiffPanel.tsx‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ export default function DiffPanel({
877877
<div
878878
key={commit.sha}
879879
className={cn(
880-
"flex items-stretch rounded-sm hover:bg-accent has-data-highlighted:bg-accent has-focus-visible:bg-accent [&_[data-checked]]:bg-transparent [&_[data-highlighted]]:bg-transparent",
880+
"flex items-center rounded-sm hover:bg-accent has-data-highlighted:bg-accent has-focus-visible:bg-accent [&_[data-checked]]:bg-transparent [&_[data-highlighted]]:bg-transparent",
881881
selectedCommitSha === commit.sha && "bg-foreground/[0.08]",
882882
)}
883883
>
@@ -891,39 +891,39 @@ export default function DiffPanel({
891891
/>
892892
}
893893
>
894-
<span className="block truncate">{commit.subject}</span>
894+
<span className="flex items-center gap-3">
895+
<span className="min-w-0 flex-1 truncate">{commit.subject}</span>
896+
<span className="shrink-0 text-xs tabular-nums text-muted-foreground">
897+
{formatRelativeTimeLabel(commit.committedAt)}
898+
</span>
899+
</span>
895900
</TooltipTrigger>
896901
<TooltipPopup side="right" className="max-w-80">
897902
{commit.subject}
898903
</TooltipPopup>
899904
</Tooltip>
900-
<div className="flex shrink-0 flex-col items-end">
901-
{commitUrl ? (
902-
<DropdownMenuItem
903-
className="shrink-0"
904-
render={
905-
<a
906-
href={commitUrl}
907-
target="_blank"
908-
rel="noopener noreferrer"
909-
aria-label={`Open commit ${commit.sha.slice(0, 7)}`}
910-
/>
911-
}
912-
onClick={(event) => openCommitUrl(event, commitUrl)}
913-
>
914-
<span className="font-mono text-xs text-muted-foreground underline underline-offset-4">
915-
{commit.sha.slice(0, 7)}
916-
</span>
917-
</DropdownMenuItem>
918-
) : (
919-
<span className="shrink-0 px-2 py-1 font-mono text-xs text-muted-foreground">
905+
{commitUrl ? (
906+
<DropdownMenuItem
907+
className="shrink-0"
908+
render={
909+
<a
910+
href={commitUrl}
911+
target="_blank"
912+
rel="noopener noreferrer"
913+
aria-label={`Open commit ${commit.sha.slice(0, 7)}`}
914+
/>
915+
}
916+
onClick={(event) => openCommitUrl(event, commitUrl)}
917+
>
918+
<span className="font-mono text-xs text-muted-foreground underline underline-offset-4">
920919
{commit.sha.slice(0, 7)}
921920
</span>
922-
)}
923-
<span className="px-2 pb-1 text-xs tabular-nums text-muted-foreground">
924-
{formatRelativeTimeLabel(commit.committedAt)}
921+
</DropdownMenuItem>
922+
) : (
923+
<span className="shrink-0 px-2 font-mono text-xs text-muted-foreground">
924+
{commit.sha.slice(0, 7)}
925925
</span>
926-
</div>
926+
)}
927927
</div>
928928
);
929929
})}

0 commit comments

Comments
 (0)