diff --git a/src/renderer/src/components/sidebar/worktree-card-slot-agent-line-row.tsx b/src/renderer/src/components/sidebar/worktree-card-slot-agent-line-row.tsx
index a18f5f0c1a8..aac3a88cca0 100644
--- a/src/renderer/src/components/sidebar/worktree-card-slot-agent-line-row.tsx
+++ b/src/renderer/src/components/sidebar/worktree-card-slot-agent-line-row.tsx
@@ -158,17 +158,11 @@ export const SlotAgentLineRow = React.memo(function SlotAgentLineRow({
) : (
)
- // A Needs you / Failed pill must stay readable on hover, so dismiss slides in beside it instead.
const pillSlot = !offline && (displaySignal.kind === 'needs' || displaySignal.kind === 'failed')
const dismissButton = onDismiss ? (
) : null
- ) : dismissButton && pillSlot ? (
-
- {lineSlot}
- {dismissButton}
-
- ) : dismissButton ? (
- // Time and dismiss share the slot; hover or keyboard focus swaps in the dismiss control.
- // Button comes first so the time can follow it as a `peer` without :has(); z-10 keeps it on top.
-
- {dismissButton}
-
- {lineSlot}
-
-
) : (
- lineSlot
+
+ {pillSlot ? lineSlot : null}
+ {dismissButton}
+ {pillSlot ? (
+
+ ) : (
+ lineSlot
+ )}
+
)
return (