Skip to content

Commit db88e6b

Browse files
ScottN-PVclaude
andauthored
fix(web): keep the diff panel head ref visible when the panel is narrow (pingdotgg#19089)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 7138e6e commit db88e6b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,14 @@ export default function DiffPanel({
710710
className="flex min-w-0 max-w-full items-center gap-2 overflow-hidden text-xs text-muted-foreground"
711711
aria-label={`Comparing ${selectedGitSource.headRef ?? "HEAD"} against ${selectedGitSource.baseRef}`}
712712
>
713+
{/* The head ref keeps 3rem while the row has room; below that the
714+
base-ref button keeps 2.25rem so its menu stays reachable. */}
713715
<Tooltip>
714-
<TooltipTrigger render={<span className="flex min-w-0 items-center gap-2" />}>
716+
<TooltipTrigger
717+
render={
718+
<span className="flex min-w-[min(3rem,calc(100%-2.75rem))] items-center gap-2 overflow-hidden" />
719+
}
720+
>
715721
<span className="min-w-0 max-w-48 truncate">
716722
{selectedGitSource.headRef ?? "HEAD"}
717723
</span>
@@ -735,7 +741,7 @@ export default function DiffPanel({
735741
>
736742
<ComboboxTrigger
737743
render={<Button variant="ghost-muted" size="xs" />}
738-
className="min-w-0 max-w-48"
744+
className="min-w-9 max-w-48 shrink"
739745
aria-label={`Change comparison target. Currently ${selectedGitSource.baseRef}`}
740746
>
741747
<span className="min-w-0 truncate">{selectedGitSource.baseRef}</span>

0 commit comments

Comments
 (0)