From 74951807c4f3052ce39869cee620c4b4aa57385c Mon Sep 17 00:00:00 2001 From: Andrei Shypta Date: Fri, 30 Oct 2026 00:39:08 +0100 Subject: [PATCH] feat(web): Build/Plan toggle moves beside the attach button Build shows only its icon; Plan keeps its label so the non-default mode stays visible. The collapsed mobile row keeps the toggle in its controls, since it has no attach slot. --- apps/web/src/components/chat/ChatComposer.tsx | 13 ++++- .../components/chat/ComposerControlsBar.tsx | 11 +++- .../chat/ComposerFooterControls.tsx | 48 ++-------------- .../chat/ComposerInteractionModeToggle.tsx | 56 +++++++++++++++++++ 4 files changed, 82 insertions(+), 46 deletions(-) create mode 100644 apps/web/src/components/chat/ComposerInteractionModeToggle.tsx diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index d7878cc29a165..66b575360f5e5 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -276,6 +276,7 @@ import { usePreparingComposerImages, } from "./preparingComposerImages"; import { ComposerControlsBar } from "./ComposerControlsBar"; +import { ComposerInteractionModeToggle } from "./ComposerInteractionModeToggle"; import { composerCommandKeyHandler } from "./composerCommandKey"; function consumePasteAsTextShortcut(deadline: { current: number }): boolean { @@ -3429,7 +3430,17 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) showMobilePendingAnswerActions && "hidden sm:flex", )} > - {composerAttachButton ?
{composerAttachButton}
: null} + {composerAttachButton || planModeUiEnabled ? ( +
+ {composerAttachButton} + {planModeUiEnabled ? ( + + ) : null} +
+ ) : null}