Fix 's' animation: opacity only, no width transition

The width:0→auto animation caused the 's' to render broken.
Just fade it in with opacity — it's one character, doesn't need
a width transition.
This commit is contained in:
Taylor Ho
2026-05-20 22:26:37 -07:00
parent b682fb70e2
commit f15c436cd2

View File

@@ -495,20 +495,16 @@ export function QuickAddAgentPopover({
<div className="relative flex min-h-10 items-center gap-2 border-b pl-3 pr-1.5 py-1.5">
{/* Title — always visible */}
<h3 className="shrink-0 text-sm font-semibold text-foreground">
Add agent
<AnimatePresence>
{selectMode ? (
<motion.span
initial={{ opacity: 0, width: 0 }}
animate={{ opacity: 1, width: "auto" }}
exit={{ opacity: 0, width: 0 }}
transition={{ duration: 0.2 }}
className="inline-block overflow-hidden"
>
s
</motion.span>
) : null}
</AnimatePresence>
Add agent{selectMode ? (
<motion.span
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.3 }}
>
s
</motion.span>
) : null}
</h3>
{/* Team toggles — appear to the right of title */}