Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(settings): unify control heights and replace thinking-mode dropdown with segment
vastsacc0f6d508167
diff --git a/apps/desktop/src/components/settings/ThinkingDisplayModeRow.tsx b/apps/desktop/src/components/settings/ThinkingDisplayModeRow.tsxindex 790908bf5..03dd053e0 100644--- a/apps/desktop/src/components/settings/ThinkingDisplayModeRow.tsx+++ b/apps/desktop/src/components/settings/ThinkingDisplayModeRow.tsx@@ -2,7 +2,7 @@ import { useTranslation } from "react-i18next";import type { AppSettings } from "@pi-desktop/shared";import { resolveThinkingDisplayMode } from "../../lib/turn-process";import { SettingsRow } from "../../features/settings/primitives";-import { SettingsMenuSelect } from "./SettingsMenuSelect";+import { cx } from "../ui";export function ThinkingDisplayModeRow({settings,@@ -12,22 +12,38 @@ export function ThinkingDisplayModeRow({saveSettings: (patch: Partial<AppSettings>) => Promise<void>;}) {const { t } = useTranslation();+ const current = resolveThinkingDisplayMode(settings.thinkingDisplayMode);return (<SettingsRowtitle={t("settings.thinkingDisplayMode")}description={t("settings.thinkingDisplayModeDesc")}>- <SettingsMenuSelect- label={t("settings.thinkingDisplayMode")}- value={resolveThinkingDisplayMode(settings.thinkingDisplayMode)}- options={[- { id: "detailed", label: t("settings.thinkingDisplayDetailed") },- { id: "compact", label: t("settings.thinkingDisplayCompact") },- ]}- onChange={(value) =>- void saveSettings({ thinkingDisplayMode: resolveThinkingDisplayMode(value) })- }- />+ <div+ className="settings-segment"+ role="radiogroup"+ aria-label={t("settings.thinkingDisplayMode")}+ >+ {([+ ["detailed", "settings.thinkingDisplayDetailed"],+ ["compact", "settings.thinkingDisplayCompact"],+ ] as const).map(([value, labelKey]) => (+ <button+ key={value}+ type="button"+ role="radio"+ aria-checked={current === value}+ className={cx(+ "settings-segment-item",+ current === value && "active",+ )}+ onClick={() =>+ void saveSettings({ thinkingDisplayMode: resolveThinkingDisplayMode(value) })+ }+ >+ {t(labelKey)}+ </button>+ ))}+ </div></SettingsRow>);}diff --git a/apps/desktop/src/styles/settings.css b/apps/desktop/src/styles/settings.cssindex 7f014e6bb..f674e1415 100644--- a/apps/desktop/src/styles/settings.css+++ b/apps/desktop/src/styles/settings.css@@ -909,6 +909,15 @@justify-content: flex-end;}+/*+ A toggle is 20 px tall, while the field metric (select triggers, text inputs)+ resolves to ~38 px. Give the control column a matching minimum so toggle rows+ are the same height as select rows; the switch stays centred via align-items.+*/+.settings-row-control:has(> .settings-toggle) {+ min-height: var(--ds-field-height);+}+/*A toggle paired with an icon action (prompt enhancement). The control columnhas no gap of its own, so the two would otherwise touch.