Skip to content

Commit 4772a6a

Browse files
committed
Keep agent row actions inline
1 parent f2ab216 commit 4772a6a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

electron/ui/src/components/CliPanel.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@
245245
testStatus={lifecycle ? "testing" : ""}
246246
linesNowrap
247247
centerContent
248+
inlineActions
248249
muted={!installed}
249250
class="py-4"
250251
onOpen={() => (selectedCliId = cli.id)}

electron/ui/src/components/ListRow.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
indent = false,
1515
linesNowrap = false,
1616
centerContent = false,
17+
inlineActions = false,
1718
stopActionsPropagation = true,
1819
titleClass = "",
1920
class: className = "",
@@ -33,6 +34,7 @@
3334
indent?: boolean;
3435
linesNowrap?: boolean;
3536
centerContent?: boolean;
37+
inlineActions?: boolean;
3638
stopActionsPropagation?: boolean;
3739
titleClass?: string;
3840
class?: string;
@@ -93,6 +95,7 @@
9395
const rowClass = $derived(
9496
cn(
9597
"flex flex-col gap-3 border-b border-border px-4 py-3 last:border-b-0 sm:flex-row sm:justify-between",
98+
inlineActions && "flex-row items-center justify-between",
9699
(onOpen || onClick || onDoubleClick) &&
97100
"cursor-pointer transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
98101
centerContent ? "sm:items-center" : "sm:items-start",
@@ -142,7 +145,7 @@
142145
</div>
143146
{#if actions}
144147
<div
145-
class="flex shrink-0 flex-wrap items-center gap-2 sm:justify-end"
148+
class={cn("flex shrink-0 items-center gap-2 sm:justify-end", inlineActions ? "flex-nowrap" : "flex-wrap")}
146149
role="presentation"
147150
onclick={stopActionClick}
148151
ondblclick={stopActionDoubleClick}

0 commit comments

Comments
 (0)