@@ -127,6 +127,7 @@ import { type DraftId, useComposerDraftStore } from "~/composerDraftStore";
127127import {
128128 THREAD_DETAILS_PANEL_CHEVRON_CLASS ,
129129 THREAD_DETAILS_PANEL_ICON_CLASS ,
130+ THREAD_DETAILS_PANEL_LABEL_CLASS ,
130131 THREAD_DETAILS_PANEL_SPLIT_GROUP_CLASS ,
131132 THREAD_DETAILS_PANEL_SPLIT_SEPARATOR_CLASS ,
132133} from "./chat/threadDetailsPanelStyles" ;
@@ -441,23 +442,25 @@ function GitActionProgressButtonContent({
441442 aria-live = "polite"
442443 className = { cn (
443444 "grid min-w-0 flex-1 items-center" ,
444- // Pin the title row to the button's minimum content height (min-height
445- // minus vertical padding and border) so revealing the output row
446- // extends the button downward without re-centering — the title must
447- // not shift. No row gap: the collapsed output row must contribute zero
448- // height so the single-line running button matches the static button
449- // exactly. The panel column gap matches the static row's icon-to-label
450- // distance (gap-2.5 plus the label's ml-0.5). In the panel the elapsed
451- // counter renders outside the button (in the menu-chevron slot), so
452- // there is no trailing column.
445+ // Pin the title row to the button's minimum content height so output
446+ // expands below it. Panel controls leave 24px after padding and border.
447+ // No row gap: collapsed output must not add height. The panel's elapsed
448+ // counter uses the menu-chevron slot, so it has no trailing column.
453449 isPanel
454- ? "grid-cols-[auto_minmax(0,1fr)] grid-rows-[1.75rem ] gap-x-3"
450+ ? "grid-cols-[auto_minmax(0,1fr)] grid-rows-[1.5rem ] gap-x-3"
455451 : "grid-cols-[auto_minmax(0,1fr)_auto] grid-rows-[1.25rem] gap-x-2.5 sm:grid-rows-[1rem]" ,
456452 ) }
457453 role = "status"
458454 >
459455 < Spinner aria-hidden = "true" className = "row-start-1 -mx-0.5 shrink-0" />
460- < p className = "row-start-1 min-w-0 truncate text-left" > { progress . status } </ p >
456+ < p
457+ className = { cn (
458+ "row-start-1 min-w-0 truncate text-left" ,
459+ isPanel && THREAD_DETAILS_PANEL_LABEL_CLASS ,
460+ ) }
461+ >
462+ { progress . status }
463+ </ p >
461464 { ! isPanel ? (
462465 < GitActionElapsedTime
463466 startedAtMs = { progress . startedAtMs }
@@ -496,11 +499,13 @@ function GitActionSuccessButtonContent({ success }: { success: InlineGitActionSu
496499 return (
497500 < div
498501 aria-live = "polite"
499- className = "grid min-w-0 flex-1 grid-cols-[auto_minmax(0,1fr)] grid-rows-[1.75rem ] items-center gap-x-3"
502+ className = "grid min-w-0 flex-1 grid-cols-[auto_minmax(0,1fr)] grid-rows-[1.5rem ] items-center gap-x-3"
500503 role = "status"
501504 >
502505 < CheckIcon aria-hidden = "true" className = "size-3.5 shrink-0 text-success" />
503- < p className = "min-w-0 truncate text-left" > { success . title } </ p >
506+ < p className = { cn ( "min-w-0 truncate text-left" , THREAD_DETAILS_PANEL_LABEL_CLASS ) } >
507+ { success . title }
508+ </ p >
504509 < div
505510 className = { cn (
506511 "col-start-2 grid min-w-0 transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none" ,
@@ -1704,7 +1709,7 @@ export default function GitActionsControl({
17041709 < PopoverTrigger
17051710 openOnHover
17061711 nativeButton = { false }
1707- render = { < span className = "block w-max cursor-not-allowed" /> }
1712+ render = { < span className = "block w-full cursor-not-allowed" /> }
17081713 >
17091714 < MenuItem
17101715 density = { presentation === "menu" ? "touch" : "default" }
@@ -1824,7 +1829,7 @@ export default function GitActionsControl({
18241829 onClick = { initializeGit }
18251830 >
18261831 < GitBranchPlusIcon className = "size-3.5" aria-hidden />
1827- < span className = "ml-0.5" >
1832+ < span className = { cn ( "ml-0.5" , isPanel && THREAD_DETAILS_PANEL_LABEL_CLASS ) } >
18281833 { initAction . isPending ? "Initializing..." : "Initialize Git" }
18291834 </ span >
18301835 </ ThreadDetailsControl >
@@ -1882,7 +1887,7 @@ export default function GitActionsControl({
18821887 < span
18831888 className = { cn (
18841889 "sr-only @3xl/header-actions:not-sr-only @3xl/header-actions:ml-0.5" ,
1885- isPanel && "not-sr-only ml-0 truncate" ,
1890+ isPanel && cn ( "not-sr-only ml-0 truncate" , THREAD_DETAILS_PANEL_LABEL_CLASS ) ,
18861891 ) }
18871892 >
18881893 { quickAction . label }
@@ -1909,7 +1914,7 @@ export default function GitActionsControl({
19091914 < span
19101915 className = { cn (
19111916 "sr-only @3xl/header-actions:not-sr-only @3xl/header-actions:ml-0.5" ,
1912- isPanel && "not-sr-only ml-0 truncate" ,
1917+ isPanel && cn ( "not-sr-only ml-0 truncate" , THREAD_DETAILS_PANEL_LABEL_CLASS ) ,
19131918 ) }
19141919 >
19151920 { quickAction . label }
@@ -1979,7 +1984,7 @@ export default function GitActionsControl({
19791984 onClick = { onOpenChanges }
19801985 >
19811986 < FileDiffIcon className = { THREAD_DETAILS_PANEL_ICON_CLASS } aria-hidden />
1982- < span className = "flex-1 text-left" > Changes</ span >
1987+ < span className = { cn ( "flex-1 text-left" , THREAD_DETAILS_PANEL_LABEL_CLASS ) } > Changes</ span >
19831988 < span className = "flex items-center gap-1 font-mono text-2xs tabular-nums" >
19841989 < span className = "text-success" > +{ changesTotals ?. insertions ?? 0 } </ span >
19851990 < span className = "text-destructive" > -{ changesTotals ?. deletions ?? 0 } </ span >
0 commit comments