Skip to content

Commit 0184f4a

Browse files
authored
Show the provider strip in the model menu on narrow screens (#4762)
1 parent 8010a3a commit 0184f4a

2 files changed

Lines changed: 23 additions & 39 deletions

File tree

web/src/styles/mobile.css

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -178,45 +178,9 @@
178178
max-width: 100% !important;
179179
}
180180

181-
/* Model Menu fullscreen on mobile — match Settings dialog pattern. */
182-
.mobile .model-menu__dialog .MuiDialog-paper {
183-
margin: 0 !important;
184-
width: 100vw !important;
185-
max-width: 100vw !important;
186-
height: 100dvh !important;
187-
max-height: 100dvh !important;
188-
border-radius: 0 !important;
189-
}
190-
191-
/* Collapse complex 3-column grid → single column */
192-
.mobile .model-menu__grid {
193-
display: grid !important;
194-
grid-template-columns: 1fr !important;
195-
grid-template-rows: auto 1fr !important;
196-
gap: var(--spacing-xs) !important;
197-
}
198-
199-
/* Hide provider list and sidebar (favorites/recent) */
200-
.mobile .model-menu__providers-list,
201-
.mobile .model-menu__sidebar {
202-
display: none !important;
203-
}
204-
205-
/* Hide advanced filters bar (keep just search) */
206-
.mobile .model-menu__filters-bar {
207-
display: none !important;
208-
}
209-
210-
/* Expand model list to full width */
211-
.mobile .model-menu__model-list-container {
212-
max-width: none !important;
213-
width: 100% !important;
214-
}
215-
216-
/* Hide footer counts and other non-essential info */
217-
.mobile .model-menu__footer {
218-
display: none !important;
219-
}
181+
/* The model menu handles its own narrow-screen layout in
182+
ModelMenuDialogBase (full-screen paper, horizontal provider strip), so it
183+
needs no overrides here. */
220184

221185
/* Chat Composer Mobile Styles
222186
Keep compose-message in its default column layout on mobile so the

web/tests/visual/chat.spec.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,26 @@ test.describe("Chat Interface", () => {
126126
);
127127
});
128128

129+
test("composer model selector keeps its provider strip @responsive", async ({
130+
page
131+
}) => {
132+
// On narrow screens the provider rail becomes a horizontal strip. A stale
133+
// `.mobile` stylesheet once hid it outright, leaving the menu with no way
134+
// to filter by provider.
135+
await gotoPage(page, "/chat/thread-story");
136+
await waitForComposer(page);
137+
expect(await openComposerChip(page, "model")).toBe(true);
138+
139+
const strip = page.locator(".model-menu__providers-list").first();
140+
await expect(strip).toBeVisible();
141+
const box = await strip.boundingBox();
142+
expect(box?.width ?? 0).toBeGreaterThan(0);
143+
expect(box?.height ?? 0).toBeGreaterThan(0);
144+
await expect(
145+
page.locator(".model-menu__provider-item").first()
146+
).toBeVisible();
147+
});
148+
129149
test("dashboard / portal @responsive @smoke", async ({ page }) => {
130150
// The portal (/dashboard) is the chat-led home surface: header + composer
131151
// + recent threads. Grouped with chat since it shares the composer shell.

0 commit comments

Comments
 (0)