From 8750d86cf78cd62511049c0916cfbf386843cf72 Mon Sep 17 00:00:00 2001 From: Michael Han <107991372+shimmyshimmer@users.noreply.github.com> Date: Wed, 24 Jun 2026 05:46:49 -0700 Subject: [PATCH] Studio: keep the sidebar bottom fade in sync when groups collapse (#6640) The fade is recomputed on a group's open/close state flip, but the groups animate their height, so it measured scrollHeight mid-animation and the fade could vanish at random. Re-measure on the collapsible animationend, and add the missing pinnedOpen dep to the recompute effect. --- studio/frontend/src/components/app-sidebar.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsx index 443b114ca..f563f9ae5 100644 --- a/studio/frontend/src/components/app-sidebar.tsx +++ b/studio/frontend/src/components/app-sidebar.tsx @@ -454,6 +454,7 @@ export function AppSidebar() { chatOpen, trainOpen, runsOpen, + pinnedOpen, isStudioRoute, ]); @@ -1103,6 +1104,16 @@ export function AppSidebar() { syncScrollState(e.currentTarget)} + // Collapsible groups animate their height; re-measure the fade once the + // open/close animation settles, not on the (still-animating) state flip. + onAnimationEnd={(e) => { + if ( + e.animationName === "collapsible-down" || + e.animationName === "collapsible-up" + ) { + syncScrollState(e.currentTarget); + } + }} className={cn( // pb-2 keeps the last row's rounded highlight clear of the // overflow clip edge so its bottom corners aren't shaved off.