Skip to content

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

fix(settings): preserve row select height

vastsa1700c08ab779
diff --git a/apps/desktop/src/styles/settings.css b/apps/desktop/src/styles/settings.css
index e751744e6..4b260efeb 100644
--- a/apps/desktop/src/styles/settings.css
+++ b/apps/desktop/src/styles/settings.css
@@ -1616,9 +1616,6 @@
width: max-content;
max-width: 100%;
min-width: 0;
- /* Compact row pickers have less vertical and horizontal chrome; stretched
- form selects below keep the input-aligned field metric. */
- height: var(--ds-settings-picker-height);
padding: 0 10px;
border-radius: var(--radius-full);
background: var(--ds-raised);
@@ -1627,6 +1624,18 @@
font-size: var(--text-sm-plus);
}
+.settings-language-trigger,
+.settings-theme-trigger,
+.settings-font-trigger {
+ /* Appearance values are brief; the compact trigger frees vertical space
+ while SettingsMenuSelect continues to align with adjacent field inputs. */
+ height: var(--ds-settings-picker-height);
+}
+
+.settings-menu-select-trigger {
+ height: var(--ds-field-height);
+}
+
.settings-menu-select-anchor.is-full .settings-menu-select-trigger {
display: flex;
width: 100%;
diff --git a/apps/desktop/src/styles/tokens.css b/apps/desktop/src/styles/tokens.css
index 744214261..e9766d512 100644
--- a/apps/desktop/src/styles/tokens.css
+++ b/apps/desktop/src/styles/tokens.css
@@ -166,11 +166,12 @@
field box (9px + 9px padding around one `--leading-body` line at
`--text-base`) so it follows the Appearance font scale instead of pinning
a px value that drifts once type is resized. Dense nested surfaces — the
- subagent sheet's row body, a compact menu search — and the import toolbar,
- whose row holds small buttons and no field, declare their own metric. */
+ subagent sheet's row body, compact Appearance pickers, and a compact menu
+ search — and the import toolbar, whose row holds small buttons and no
+ field, declare their own metric. */
--ds-field-height: calc(18px + var(--text-base) * var(--leading-body));
- /* Compact closed picker triggers in Appearance and Settings rows. Full-width
- form selects keep the larger field metric above. */
+ /* Compact closed Appearance picker triggers. SettingsMenuSelect keeps the
+ field metric unless a dense surface overrides it. */
--ds-settings-picker-height: calc(14px + var(--text-sm-plus) * var(--leading-body));
/* Work-panel controls share these geometry tokens so the header's safe lane
cannot drift away from the viewport-fixed toggle. */
diff --git a/apps/desktop/test/field-control-height.test.mjs b/apps/desktop/test/field-control-height.test.mjs
index 28b113813..709687a70 100644
--- a/apps/desktop/test/field-control-height.test.mjs
+++ b/apps/desktop/test/field-control-height.test.mjs
@@ -5,8 +5,8 @@
* field must resolve to one height, or the dropdown reads as a different-sized
* control than the input beside it. `--ds-field-height` is that metric.
*
- * Compact surfaces — a menu search row, the dense subagent sheet, the
- * Settings-row pill, the model row body — own a smaller metric instead. They
+ * Compact surfaces — Appearance picker triggers, a menu search row, the dense
+ * subagent sheet, and the model row body — own a smaller metric instead. They
* have to declare it as a *minimum*: the field vocabulary pins `min-height`, so
* a bare `height` on one of their inputs would lose and the control would be
* stretched to the field metric.
@@ -116,23 +116,23 @@ test("compact menu searches keep their own height as a minimum", () => {
}
});
-test("a Settings-row dropdown matches the row's input", () => {
+test("Appearance pickers compact while Settings-row selects match their input", () => {
const rowInput = declarations(settingsCss, ".settings-row-control .field-input");
const pill = declarations(
settingsCss,
".settings-pill-select,\n.settings-row-control .field-select",
);
- const picker = declarations(
+ const appearancePicker = declarations(
settingsCss,
- ".settings-language-trigger,\n.settings-theme-trigger,\n.settings-menu-select-trigger,\n.settings-font-trigger",
+ ".settings-language-trigger,\n.settings-theme-trigger,\n.settings-font-trigger",
);
- // A Settings row can hold a text input, a select or a picker pill; all three
- // resolve to the shared field metric, so the column has one control height.
+ const menuSelect = declarations(settingsCss, ".settings-menu-select-trigger");
+ // Appearance pickers are short, label-sized controls. General Settings-row
+ // selects stay at the shared field metric beside text inputs.
assert.equal(heightValue(pill, "height"), "var(--ds-field-height)");
assert.equal(heightValue(pill, "min-height"), "var(--ds-field-height)");
- for (const rule of [picker]) {
- assert.equal(heightValue(rule, "height"), "var(--ds-field-height)");
- }
+ assert.equal(heightValue(appearancePicker, "height"), "var(--ds-settings-picker-height)");
+ assert.equal(heightValue(menuSelect, "height"), "var(--ds-field-height)");
// The row's own text input takes the same metric through the field
// vocabulary; a compact row input would have to declare its own minimum.
assert.doesNotMatch(rowInput, /height:/);
diff --git a/docs/spec/04-ux/07-ui-design-system.md b/docs/spec/04-ux/07-ui-design-system.md
index 71a3f6b1a..1df0256dd 100644
--- a/docs/spec/04-ux/07-ui-design-system.md
+++ b/docs/spec/04-ux/07-ui-design-system.md
@@ -1319,9 +1319,9 @@ Every dropdown / option-list in Settings **must** use `SettingsMenuSelect`
instead of the native `Select` (`<select>`) component. Native `Select`
is reserved for non-Settings contexts where OS-level rendering is acceptable.
-Appearance pickers and compact Settings-row triggers use the scaled
-`--ds-settings-picker-height` metric. Full-width `SettingsMenuSelect` controls
-keep `--ds-field-height` so they align with adjacent form inputs.
+Appearance pickers use the scaled `--ds-settings-picker-height` metric.
+`SettingsMenuSelect` triggers keep `--ds-field-height` so they align with
+adjacent form inputs; dense surfaces may override that metric locally.
## 12. State patterns