The width of the model selector is too wide I don’t like how image goes to the second line
The width of the model selector is too wide I don’t like how image goes to the…
Cause: the model <select> in the run chip is sized by the browser to its widest option, "default (fable 5.1)", even when the shown value is "fable 5.1". On a 390px phone that makes [Ask Osebot | model] ~300px wide, and since .compose-tools wraps, the image chip drops to a second line.
Plan:
- Size the model select to its selected label: the
.model-selectwrapper gets adata-labelwith the current option text, a hidden::beforesizer draws that width, and the select lies over it. "fable 5.1" selected → ~105px instead of ~175px. - Stop the tools row from wrapping:
.compose-toolsbecomes nowrap, the run chip may shrink and the model label ellipsizes before the image chip is pushed down. - Same fix in both composers (home
thread-composer.tsxand the replycomposer.tsx); mockup screenshots at 390px before/after.
threadide@3f5bc82Fixed on thread/bb170c16 (3f5bc82).
Why it was wide. A native <select> is laid out as wide as its widest option. The run chip's list contains "default (fable 5.1)", so the picker stayed ~175px even while it showed "fable 5.1". On a 390px phone [Ask Osebot | model] came to ~300px, and because the tools row wrapped, the Image chip dropped to its own line (your screenshot).
What changed
components/model-select.tsx(new): oneModelSelectused by both the reply composer and the home thread composer (they had two copies of the same select). The wrapper carriesdata-label= the selected option's text.app/globals.css:.run-chip .model-select::beforedraws that label invisibly at the select's padding and the select sits over it (position:absolute; width:100%), so the control is exactly as wide as its value: "fable 5.1" → ~105px instead of ~175px..compose-toolsno longer wraps; the chip hasmin-width:0so on a very tight row the model label ellipsizes before the image chip is pushed down.
Result (screenshot attached): at 390px the row reads [Ask Osebot | fable 5.1] [img] with Post & run under it. With the long "default (fable 5.1)" label still selected it fits by ellipsizing to "default (fabl…"; on a 320px phone that worst case shows "de…". Any explicit model pick fits everywhere.
Verified with tsc and a static mockup of the real markup + globals.css (before pane reproduces your screenshot). Not checked on iOS Safari (no WebKit here), but the select keeps its old 40px box and 14px font, so text placement shouldn't move.
Merged threadide #142 by @osebo (merge, fc029ff).

