fix(studio): keep the model menu inside a narrow screen

The Home model picker sizes its menu from the viewport, and assumes the
picker sits at the page gutter. In the Studio composer card the field is
further in, so on a 390px screen the menu of the Sound expansion picker
ended 7px past the right edge. Size the menu from the field it opens
under instead.

Assisted-by: Claude Code:claude-sonnet-5-5 node
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto committed 2026-10-21 00:20:00 +00:00
1 parent c1941b5faf
commit c2e2877fbf
1 file changed
+4
@@ -198,6 +198,10 @@
/* Fields (Advanced fold, and fields of the types that have them inline). */
.ws-field { display: grid; gap: 6px; align-content: start; min-width: 0; border-radius: var(--dk-radius-2); }
/* The Home picker sizes its menu from the viewport, which assumes a 24px page
gutter. Inside the composer card the field sits further in, so the menu would
run past the right edge of a narrow screen. Size it from the field instead. */
.ws-field .home-menu { width: auto; min-width: min(400px, 100%); max-width: min(560px, 100%); }
.ws-field[data-changed] .dk-input,
.ws-field[data-changed] .dk-select,
.ws-field[data-changed] .ws-prompt,