fix: replace transition-all with specific transition properties for better performance

- Replace transition-all with transition-[width] in Sidebar.tsx for width animations
- Replace transition-all with specific properties in animated-tabs.tsx for hover/active indicators
- Replace transition-all with transition-[background-color,border-color,box-shadow] in navbar.tsx
- Replace transition-all with transition-[width] in audio.tsx volume bar
- Replace transition-all with transition-[background-color,border-color,color] in thread.tsx
- Replace transition-all with transition-[box-shadow] in all tool-ui status cards (28+ files)

This reduces unnecessary browser layout/paint work by only animating the specific
properties that change, avoiding expensive recalculations for properties like
width, height, margin, and padding that don't need animation.

Fixes #1147
This commit is contained in:
SohamBhattacharjee2003 2026-04-08 05:36:19 +05:30
parent 63855e0757
commit 4a5af63715
32 changed files with 41 additions and 41 deletions

View file

@ -1191,7 +1191,7 @@ const ComposerAction: FC<ComposerActionProps> = ({ isBlockedByOtherUser = false
aria-pressed={isWebSearchEnabled}
onClick={() => toggleTool("web_search")}
className={cn(
"rounded-full transition-all flex items-center gap-1 px-2 py-1 border h-8 select-none",
"rounded-full transition-[background-color,border-color,color] flex items-center gap-1 px-2 py-1 border h-8 select-none",
isWebSearchEnabled
? "bg-sky-500/15 border-sky-500/60 text-sky-500"
: "bg-transparent border-transparent text-muted-foreground hover:text-foreground"