Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

Side panel: give the model picker its own row at 150%/175% UI scale

Claude57292299311b
diff --git a/src/chrome/styles/sidepanel.css b/src/chrome/styles/sidepanel.css
index 7e1d3efa1..c8b022fbd 100644
--- a/src/chrome/styles/sidepanel.css
+++ b/src/chrome/styles/sidepanel.css
@@ -3454,6 +3454,23 @@ html[dir="rtl"] .composer-toolbar .provider-picker-menu {
right: 0;
}
+/* Narrow panel at a large UI scale (150%/175% leave ~160-200px inside the
+ composer): the model picker takes its own row, so the fixed-width controls
+ (attach, status, permissions, mic, send) can no longer squeeze it to a few
+ pixels. The second row keeps them right-aligned through the spacer. */
+html[data-ui-scale="150"] .composer-toolbar,
+html[data-ui-scale="175"] .composer-toolbar {
+ flex-wrap: wrap;
+ row-gap: 4px;
+}
+
+html[data-ui-scale="150"] .composer-toolbar .provider-picker,
+html[data-ui-scale="175"] .composer-toolbar .provider-picker {
+ order: -1;
+ flex: 1 1 100%;
+ max-width: none;
+}
+
#input-wrapper:focus-within {
border-color: var(--accent);
}
diff --git a/src/firefox/styles/sidepanel.css b/src/firefox/styles/sidepanel.css
index 4a52709da..652543a94 100644
--- a/src/firefox/styles/sidepanel.css
+++ b/src/firefox/styles/sidepanel.css
@@ -3280,6 +3280,23 @@ html[dir="rtl"] .composer-toolbar .provider-picker-menu {
right: 0;
}
+/* Narrow panel at a large UI scale (150%/175% leave ~160-200px inside the
+ composer): the model picker takes its own row, so the fixed-width controls
+ (attach, status, permissions, mic, send) can no longer squeeze it to a few
+ pixels. The second row keeps them right-aligned through the spacer. */
+html[data-ui-scale="150"] .composer-toolbar,
+html[data-ui-scale="175"] .composer-toolbar {
+ flex-wrap: wrap;
+ row-gap: 4px;
+}
+
+html[data-ui-scale="150"] .composer-toolbar .provider-picker,
+html[data-ui-scale="175"] .composer-toolbar .provider-picker {
+ order: -1;
+ flex: 1 1 100%;
+ max-width: none;
+}
+
#input-wrapper:focus-within {
border-color: var(--accent);
}
diff --git a/test/sidepanel-permission-gate-ui.mjs b/test/sidepanel-permission-gate-ui.mjs
index a1ece1d1b..657ef03ab 100644
--- a/test/sidepanel-permission-gate-ui.mjs
+++ b/test/sidepanel-permission-gate-ui.mjs
@@ -187,5 +187,29 @@ for (const [build, engine, api] of [['chrome', chromium, 'chrome'], ['firefox',
assert.equal(s.open, false);
}, { width: 360 });
});
+
+ test('keeps the model picker usable at 175% scale in a narrow panel', async () => {
+ await fixture(async ({ page }) => {
+ await page.evaluate(() => {
+ document.documentElement.dataset.uiScale = '175';
+ document.documentElement.style.setProperty('--ui-scale-zoom', '1.75');
+ document.getElementById('provider-picker-label').textContent = 'OpenRouter · a long model name';
+ });
+ const rects = await page.evaluate(() => {
+ const rect = (selector) => { const r = document.querySelector(selector).getBoundingClientRect(); return { left: r.left, right: r.right, top: r.top, bottom: r.bottom, width: r.width }; };
+ return {
+ picker: rect('#provider-picker-btn'),
+ wrapper: rect('#input-wrapper'),
+ permission: rect('#btn-permission-gate'),
+ mic: rect('#btn-mic'),
+ };
+ });
+ // The picker keeps (nearly) the whole composer width instead of being squeezed to a few pixels.
+ assert.ok(rects.picker.width >= rects.wrapper.width * 0.6, `picker stays wide (${rects.picker.width} of ${rects.wrapper.width})`);
+ assert.ok(rects.permission.top >= rects.picker.bottom - 1, 'permission and mic controls sit below the picker, not on top of it');
+ assert.ok(rects.mic.top >= rects.picker.bottom - 1);
+ assert.ok(rects.permission.right <= rects.wrapper.right && rects.mic.right <= rects.wrapper.right, 'controls stay inside the composer');
+ }, { width: 360 });
+ });
});
}