From 874d0bca05bac58424d29129d7106ed0f104f874 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Tue, 3 Mar 2026 09:49:42 -0800 Subject: [PATCH] Attachments: by default use the Menu on desktop, not the inlines --- src/apps/chat/components/composer/Composer.tsx | 8 +++++--- src/apps/settings-modal/UxLabsSettings.tsx | 7 +++++++ src/common/stores/store-ux-labs.ts | 6 ++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/apps/chat/components/composer/Composer.tsx b/src/apps/chat/components/composer/Composer.tsx index 7a8c2f177..1e3f93f1a 100644 --- a/src/apps/chat/components/composer/Composer.tsx +++ b/src/apps/chat/components/composer/Composer.tsx @@ -136,7 +136,8 @@ export function Composer(props: { // external state const { showPromisedOverlay } = useOverlayComponents(); const { newChat: appChatNewChatIntent } = useRouterQuery>(); - const { labsShowCost, labsShowShortcutBar } = useUXLabsStore(useShallow(state => ({ + const { labsComposerAttachmentsInline, labsShowCost, labsShowShortcutBar } = useUXLabsStore(useShallow(state => ({ + labsComposerAttachmentsInline: state.labsComposerAttachmentsInline, labsShowCost: state.labsShowCost, labsShowShortcutBar: state.labsShowShortcutBar, }))); @@ -816,8 +817,9 @@ export function Composer(props: { {/* [desktop] Attachment Sources: dropdown menu or inline buttons */} @@ -60,6 +62,11 @@ export function UxLabsSettings() { checked={labsShowShortcutBar} onChange={setLabsShowShortcutBar} />} + Attachment Buttons} description={labsComposerAttachmentsInline ? 'Enabled' : 'Disabled'} + checked={labsComposerAttachmentsInline} onChange={setLabsComposerAttachmentsInline} + /> + Auto-hide input} description={labsAutoHideComposer ? 'Hover to show' : 'Always visible'} checked={labsAutoHideComposer} onChange={setLabsAutoHideComposer} diff --git a/src/common/stores/store-ux-labs.ts b/src/common/stores/store-ux-labs.ts index 2c8582107..8c2b1851d 100644 --- a/src/common/stores/store-ux-labs.ts +++ b/src/common/stores/store-ux-labs.ts @@ -28,6 +28,9 @@ interface UXLabsStore { labsShowShortcutBar: boolean; setLabsShowShortcutBar: (labsShowShortcutBar: boolean) => void; + labsComposerAttachmentsInline: boolean; + setLabsComposerAttachmentsInline: (labsComposerAttachmentsInline: boolean) => void; + } export const useUXLabsStore = create()( @@ -52,6 +55,9 @@ export const useUXLabsStore = create()( labsShowShortcutBar: true, setLabsShowShortcutBar: (labsShowShortcutBar: boolean) => set({ labsShowShortcutBar }), + labsComposerAttachmentsInline: false, + setLabsComposerAttachmentsInline: (labsComposerAttachmentsInline: boolean) => set({ labsComposerAttachmentsInline }), + }), { name: 'app-ux-labs',