From fd6d9ddaab241f60a1ad3c2b7b1d836cf871447f Mon Sep 17 00:00:00 2001 From: Saikrishna Ambeti Date: Mon, 12 Oct 2026 07:23:59 +0530 Subject: [PATCH] fix(web): hide stash menu behind maximized panel (#18115) Co-authored-by: maria --- apps/web/src/components/chat/ChatComposer.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index 6d672acec875a2360a3e893f529209b5bbdcb73f..9162c4b67e0d0c03b397c2b447984a8222731fac 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -1017,6 +1017,11 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children: window.getComputedStyle(form ?? anchor).getPropertyValue("--chat-composer-drawer-inset"), ); const drawerInset = drawerInsetRem * rootFontSizePx; + const width = rect.width - drawerInset * 2; + if (width <= 0) { + setPosition(null); + return; + } // One extra pixel prevents fractional layout coordinates from exposing // the canvas between the drawer mask and the composer's foreground edge. // Mirrors --chat-composer-attachment-overlap: calc(1rem + 1px). @@ -1025,7 +1030,7 @@ function ComposerCommandMenuLayer(props: { anchor: HTMLElement | null; children: bottom: window.innerHeight - rect.top - composerOverlap, left: rect.left + drawerInset, maxHeight: Math.max(96, rect.top - 24 + composerOverlap), - width: Math.max(0, rect.width - drawerInset * 2), + width, }; setPosition((current) => current && composerCommandMenuPositionsEqual(current, next) ? current : next, -- 2.54.0