Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(desktop): stack provider setup panes on constrained viewport heights

Totopo279e6130a18650
diff --git a/apps/desktop/src/styles/model-config.css b/apps/desktop/src/styles/model-config.css
index 8a1ea5e99..c938149a2 100644
--- a/apps/desktop/src/styles/model-config.css
+++ b/apps/desktop/src/styles/model-config.css
@@ -1849,8 +1849,10 @@
/* ------------------------------------------------------------ responsive */
-@media (max-width: 940px) {
- /* Two panes stop being readable before the dialog itself gets narrow. */
+@media (max-width: 940px), (max-height: 800px) {
+ /* Two panes stop being readable before the dialog itself gets narrow,
+ and when vertical space is constrained (such as Windows high-DPI scaling)
+ the stacked layout prevents the panes from being crushed. */
.provider-setup-field-row,
.provider-setup-custom-identity-row,
.provider-setup-custom-auth-row {
diff --git a/apps/desktop/test/provider-form-layout.test.mjs b/apps/desktop/test/provider-form-layout.test.mjs
index b7f7bdece..0cfe43a27 100644
--- a/apps/desktop/test/provider-form-layout.test.mjs
+++ b/apps/desktop/test/provider-form-layout.test.mjs
@@ -270,6 +270,7 @@ test("the panes stack again before the dialog gets too narrow to read", () => {
const at = styles.indexOf("@media (max-width: 940px)");
assert.notEqual(at, -1, "missing the two-pane fallback breakpoint");
const query = styles.slice(at, styles.indexOf("@media", at + 10));
+ assert.match(query, /\(max-height:\s*800px\)/, "must also stack when vertical height is constrained (#1223)");
assert.match(query, /\.provider-setup-field-row[\s\S]*?\{\s*grid-template-columns: minmax\(0, 1fr\)/);
// The explicit custom rows must also collapse or Name | URL and Key | Format
// stay side-by-side on a stacked dialog.