Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(settings): unify form control widths with SettingsRow size tiers (#5291)
Jiayuan Zhang4ad060ec54e1
diff --git a/packages/views/agents/components/agent-detail-inspector.tsx b/packages/views/agents/components/agent-detail-inspector.tsxindex 16f9ec21c5..6e39ffebeb 100644--- a/packages/views/agents/components/agent-detail-inspector.tsx+++ b/packages/views/agents/components/agent-detail-inspector.tsx@@ -125,7 +125,7 @@ export function AgentDetailInspector({<SettingsRowlabel={t(($) => $.inspector.avatar_label)}description={t(($) => $.inspector.avatar_hint)}- controlClassName="sm:max-w-none"+ size="none"><div className="flex justify-start sm:justify-end"><AvatarUploadControl@@ -141,7 +141,7 @@ export function AgentDetailInspector({<SettingsRowlabel={t(($) => $.inspector.name_label)}- controlClassName="sm:w-80"+ size="text"><div><Input@@ -165,7 +165,7 @@ export function AgentDetailInspector({<SettingsRowlabel={t(($) => $.inspector.description_label)}- controlClassName="sm:w-96"+ size="text"align="start"><div>@@ -191,7 +191,7 @@ export function AgentDetailInspector({<SettingsRowlabel={t(($) => $.inspector.labels_label)}description={t(($) => $.inspector.labels_hint)}- controlClassName="sm:w-96"+ size="text"align="start"><ResourceLabelPicker@@ -210,7 +210,7 @@ export function AgentDetailInspector({<SettingsCard><SettingsRowlabel={t(($) => $.inspector.prop_runtime)}- controlClassName="sm:w-80"+ size="select-wide"><RuntimePickervariant="field"@@ -225,7 +225,7 @@ export function AgentDetailInspector({</SettingsRow><SettingsRowlabel={t(($) => $.inspector.prop_model)}- controlClassName="sm:w-80"+ size="select-wide"><ModelPickervariant="field"@@ -251,7 +251,7 @@ export function AgentDetailInspector({/><SettingsRowlabel={t(($) => $.inspector.prop_concurrency)}- controlClassName="sm:w-80"+ size="select-wide"><ConcurrencyFieldvalue={agent.max_concurrent_tasks}diff --git a/packages/views/agents/components/inspector/thinking-prop-row.tsx b/packages/views/agents/components/inspector/thinking-prop-row.tsxindex 931173f63f..cfe284e871 100644--- a/packages/views/agents/components/inspector/thinking-prop-row.tsx+++ b/packages/views/agents/components/inspector/thinking-prop-row.tsx@@ -98,7 +98,7 @@ export function ThinkingSettingField({if (levels.length === 0 && !value) return null;return (- <SettingsRow label={label} controlClassName="sm:w-80">+ <SettingsRow label={label} size="select-wide"><ThinkingPickervariant="field"showLabel={false}diff --git a/packages/views/settings/components/account-tab.tsx b/packages/views/settings/components/account-tab.tsxindex 07517e25a8..cac5564f48 100644--- a/packages/views/settings/components/account-tab.tsx+++ b/packages/views/settings/components/account-tab.tsx@@ -108,7 +108,7 @@ export function AccountTab() {<SettingsRowlabel={t(($) => $.account.avatar_label)}description={t(($) => $.account.click_avatar_hint)}- controlClassName="sm:max-w-none"+ size="none"><div className="flex justify-start sm:justify-end"><AvatarUploadControl@@ -137,7 +137,7 @@ export function AccountTab() {<SettingsRowlabel={t(($) => $.account.name_label)}- controlClassName="sm:w-80"+ size="text"><Inputtype="text"@@ -153,7 +153,7 @@ export function AccountTab() {<SettingsRowlabel={t(($) => $.account.profile_description_label)}description={t(($) => $.account.profile_description_hint)}- controlClassName="sm:w-96"+ size="text"align="start"><div>diff --git a/packages/views/settings/components/preferences-tab.tsx b/packages/views/settings/components/preferences-tab.tsxindex a2d4f8f6a4..70a8506ace 100644--- a/packages/views/settings/components/preferences-tab.tsx+++ b/packages/views/settings/components/preferences-tab.tsx@@ -96,7 +96,7 @@ export function PreferencesTab() {<SettingsCard><SettingsRowlabel={t(($) => $.preferences.theme.title)}- controlClassName="sm:w-48"+ size="select"><Selectvalue={theme}@@ -129,7 +129,7 @@ export function PreferencesTab() {<SettingsRowlabel={t(($) => $.preferences.language.title)}- controlClassName="sm:w-48"+ size="select"><Selectvalue={currentLocale}@@ -212,7 +212,7 @@ function TimezoneRow() {<SettingsRowlabel={t(($) => $.preferences.timezone.title)}description={t(($) => $.preferences.timezone.hint)}- controlClassName="sm:w-72"+ size="select-wide"><Selectvalue={value}diff --git a/packages/views/settings/components/settings-layout.tsx b/packages/views/settings/components/settings-layout.tsxindex 6601ccbb09..fd5b7a1997 100644--- a/packages/views/settings/components/settings-layout.tsx+++ b/packages/views/settings/components/settings-layout.tsx@@ -78,19 +78,42 @@ export function SettingsCard({);}+/**+ * Width tiers for the control column. Within a card, every text-entry+ * control shares the `text` tier so their edges align; a row may only+ * drop to a smaller tier when the field is deliberately short (a code,+ * an enum select) — the difference must read as intentional. Pick a+ * tier instead of adding per-row ad-hoc widths.+ */+const SETTINGS_CONTROL_WIDTHS = {+ /** Text inputs and textareas — the standard control column. */+ text: "sm:w-96",+ /** Selects/pickers with long option labels (timezone, model). */+ "select-wide": "sm:w-72",+ /** Compact enum selects (theme, language). */+ select: "sm:w-48",+ /** Short fixed-format codes (issue prefix). */+ code: "sm:w-40",+ /** Unconstrained — non-input content like avatar uploads. */+ none: "sm:max-w-none",+} as const;++export type SettingsControlSize = keyof typeof SETTINGS_CONTROL_WIDTHS;+export function SettingsRow({label,description,children,className,- controlClassName,+ size,align = "center",}: {label: ReactNode;description?: ReactNode;children: ReactNode;className?: string;- controlClassName?: string;+ /** Control column width tier; omit for content-hugging controls (buttons, switches). */+ size?: SettingsControlSize;align?: "center" | "start";}) {return (@@ -112,7 +135,7 @@ export function SettingsRow({<divclassName={cn("w-full shrink-0 sm:w-auto sm:max-w-[56%]",- controlClassName,+ size ? SETTINGS_CONTROL_WIDTHS[size] : undefined,)}>{children}diff --git a/packages/views/settings/components/workspace-tab.tsx b/packages/views/settings/components/workspace-tab.tsxindex 63dee8bccf..7eb440d1b7 100644--- a/packages/views/settings/components/workspace-tab.tsx+++ b/packages/views/settings/components/workspace-tab.tsx@@ -323,7 +323,7 @@ export function WorkspaceTab() {<SettingsRowlabel={t(($) => $.workspace.logo_label)}description={t(($) => $.workspace.click_logo_hint)}- controlClassName="sm:max-w-none"+ size="none"><div className="flex justify-start sm:justify-end"><AvatarUploadControl@@ -360,7 +360,7 @@ export function WorkspaceTab() {<SettingsRowlabel={t(($) => $.workspace.name_label)}- controlClassName="sm:w-80"+ size="text"><Inputtype="text"@@ -376,7 +376,7 @@ export function WorkspaceTab() {<SettingsRowlabel={t(($) => $.workspace.description_label)}- controlClassName="sm:w-96"+ size="text"align="start"><Textarea@@ -395,7 +395,7 @@ export function WorkspaceTab() {<SettingsRowlabel={t(($) => $.workspace.context_label)}- controlClassName="sm:w-96"+ size="text"align="start"><Textarea@@ -414,7 +414,7 @@ export function WorkspaceTab() {<SettingsRowlabel={t(($) => $.workspace.slug_label)}- controlClassName="sm:w-80"+ size="text"><div className="rounded-lg border border-input bg-muted/50 px-2.5 py-1.5 font-mono text-xs text-muted-foreground">{workspace.slug}@@ -426,7 +426,7 @@ export function WorkspaceTab() {description={t(($) => $.workspace.issue_prefix_hint, {example: `${normalizedPrefix || workspace.issue_prefix}-123`,})}- controlClassName="sm:w-40"+ size="code"><Inputtype="text"