Skip to content

Commit e07dbac

Browse files
committed
🤖 Add min-w-0 to flex items to allow proper shrinking
Added min-w-0 to all flex container and items to override the default min-width:auto behavior that prevents flex items from shrinking below their content size. Without min-w-0: - Flex items have min-width: auto (content-based minimum) - Items can't shrink below their content width - flex-wrap doesn't trigger because items won't compress With min-w-0: - Flex items can shrink below content size - Wrapping triggers when container width is constrained - Items properly respond to viewport constraints
1 parent 96ca07e commit e07dbac

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/components/ChatInput.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,12 @@ export const ChatInput: React.FC<ChatInputProps> = ({
747747
Editing message ({formatKeybind(KEYBINDS.CANCEL_EDIT)} to cancel)
748748
</div>
749749
)}
750-
<div className="flex flex-wrap items-center gap-x-3 gap-y-1">
750+
<div className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1">
751751
{/* Model Selector */}
752-
<div className="flex shrink items-center gap-1.5" data-component="ModelSelectorGroup">
752+
<div
753+
className="flex min-w-0 shrink items-center gap-1.5"
754+
data-component="ModelSelectorGroup"
755+
>
753756
<ModelSelector
754757
ref={modelSelectorRef}
755758
value={preferredModel}
@@ -778,12 +781,12 @@ export const ChatInput: React.FC<ChatInputProps> = ({
778781
</div>
779782

780783
{/* Thinking Slider */}
781-
<div className="flex shrink-0 items-center" data-component="ThinkingSliderGroup">
784+
<div className="flex min-w-0 shrink-0 items-center" data-component="ThinkingSliderGroup">
782785
<ThinkingSliderComponent modelString={preferredModel} />
783786
</div>
784787

785788
{/* Context 1M Checkbox */}
786-
<div className="flex shrink-0 items-center" data-component="Context1MGroup">
789+
<div className="flex min-w-0 shrink-0 items-center" data-component="Context1MGroup">
787790
<Context1MCheckbox modelString={preferredModel} />
788791
</div>
789792
<div className="max-@[700px]:hidden ml-auto flex items-center gap-1.5">

0 commit comments

Comments
 (0)