Skip to content

Commit 6b563bb

Browse files
perf(web): the composer banner stack compiles with the React Compiler (pingdotgg#20582)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent f0e060a commit 6b563bb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎apps/web/src/components/chat/ComposerBannerStack.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ export function ComposerBannerStack({ className, items, attachedAbove }: Compose
6868
};
6969
}, []);
7070

71-
useEffect(() => {
72-
if (items.length < 2) setStackExpanded(false);
73-
}, [items.length]);
71+
// A stack that shrinks to one banner collapses, so the next stack starts collapsed.
72+
if (items.length < 2 && stackExpanded) {
73+
setStackExpanded(false);
74+
}
7475

7576
useLayoutEffect(() => {
7677
if (stackExpanded && pendingFocusRef.current === "notice") {

0 commit comments

Comments
 (0)