TypeScript
fix(web): keep approval menu actions compact (#22566)
Yash Singhd356059c84cf
diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsxindex b62812f2577..f600b831c53 100644--- a/apps/web/src/components/chat/ChatComposer.tsx+++ b/apps/web/src/components/chat/ChatComposer.tsx@@ -7170,7 +7170,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)showMobilePendingAnswerActions && "max-sm:pb-12",isComposerResting &&"my-0 max-h-8 min-h-8 overflow-hidden py-0 whitespace-pre! leading-8",- isComposerApprovalState && "min-h-10",+ isComposerApprovalState && "min-h-0",)}placeholderClassName={cn(isComposerResting &&diff --git a/apps/web/src/components/chat/ComposerPendingApprovalActions.tsx b/apps/web/src/components/chat/ComposerPendingApprovalActions.tsxindex 7957e274c50..d1b253fba60 100644--- a/apps/web/src/components/chat/ComposerPendingApprovalActions.tsx+++ b/apps/web/src/components/chat/ComposerPendingApprovalActions.tsx@@ -81,7 +81,7 @@ export const ComposerPendingApprovalActions = memo(function ComposerPendingAppro><EllipsisIcon /></MenuTrigger>- <MenuPopup {...composerFloatingLayerProps} side="top" align="end">+ <MenuPopup {...composerFloatingLayerProps} side="top" align="end" width="content">{moreOptions.map((option) => {const item = (<MenuItem@@ -92,8 +92,6 @@ export const ComposerPendingApprovalActions = memo(function ComposerPendingApproif (!disabled && !isResponding)void onRespondToApproval(requestId, option.decision);}}- variant="ghost"- className="mb-1 last:mb-0">{option.warning ? <TriangleAlertIcon className="size-3 text-warning" /> : null}<span className="min-w-0 whitespace-normal wrap-break-word">{option.label}</span>diff --git a/apps/web/src/components/chat/MessagesTimeline.browser.test.tsx b/apps/web/src/components/chat/MessagesTimeline.browser.test.tsxindex 3452282be49..665eb5e16f6 100644--- a/apps/web/src/components/chat/MessagesTimeline.browser.test.tsx+++ b/apps/web/src/components/chat/MessagesTimeline.browser.test.tsx@@ -43,15 +43,6 @@ vi.mock(import("~/state/query"), async (original) => ({})) as never,}));-// The first Mermaid render loads the library and its flowchart chunks, which took over-// 10 seconds on a busy release runner. Pay that while the file loads, not inside a test.-{- const { default: mermaid } = await import("mermaid");- mermaid.initialize({ startOnLoad: false });- await mermaid.render("mermaid-warmup", "flowchart LR\n A --> B");- document.getElementById("dmermaid-warmup")?.remove();-}-const ENVIRONMENT_ID = EnvironmentId.make("environment-local");const CREATED_AT = "2026-03-17T19:12:28.000Z";diff --git a/apps/web/src/components/ui/menu.tsx b/apps/web/src/components/ui/menu.tsxindex ae06dced979..884b8a0ae35 100644--- a/apps/web/src/components/ui/menu.tsx+++ b/apps/web/src/components/ui/menu.tsx@@ -26,6 +26,7 @@ function MenuPopup({side = "bottom",anchor,keepMounted = false,+ width = "default",...props}: MenuPrimitive.Popup.Props & {align?: MenuPrimitive.Positioner.Props["align"];@@ -34,6 +35,7 @@ function MenuPopup({side?: MenuPrimitive.Positioner.Props["side"];anchor?: MenuPrimitive.Positioner.Props["anchor"];keepMounted?: boolean;+ width?: "default" | "content";}) {return (<MenuPrimitive.Portal keepMounted={keepMounted}>@@ -53,7 +55,8 @@ function MenuPopup({// the Review panel header). Drag hit-testing ignores z-index, so// the topmost row would stay unhoverable without this opt-out."[-webkit-app-region:no-drag]",- "min-w-[min(10rem,calc(100vw-2rem))] max-w-[calc(100vw-2rem)]",+ "max-w-[calc(100vw-2rem)]",+ width === "content" ? "w-max min-w-0" : "min-w-[min(10rem,calc(100vw-2rem))]",className,)}data-slot="menu-popup"