Skip to content

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

feat(settings): reach a row's explanation from a help icon

vastsab8daa88a1555
diff --git a/apps/desktop/src/components/extensions/McpEditorSheet.tsx b/apps/desktop/src/components/extensions/McpEditorSheet.tsx
index c663fe420..61ea2e338 100644
--- a/apps/desktop/src/components/extensions/McpEditorSheet.tsx
+++ b/apps/desktop/src/components/extensions/McpEditorSheet.tsx
@@ -12,7 +12,7 @@ import {
type McpTransport,
type ProjectRecord,
} from "@pi-desktop/shared";
-import { Button, Field, Input, TooltipButton, cx, portalOverlay } from "../ui";
+import { Button, Field, HelpIcon, Input, TooltipButton, cx, portalOverlay } from "../ui";
import { IconPlay, IconServer, IconTerminal, IconX } from "../icons";
import { ScopeControl } from "./ScopeControl";
import { KeyValueRows, pairsToRecord, recordToPairs, type KeyValuePair } from "./KeyValueRows";
@@ -173,11 +173,17 @@ function ManagementScope({
return (
<div className="agent-mcp-scope">
<div className="agent-mcp-scope-copy">
- <span className="agent-mcp-scope-label">{label}</span>
- <span className="agent-mcp-scope-hint">
- {level === "global"
- ? t("settings.globalScopeHint")
- : t("settings.projectScopeHint")}
+ <span className="agent-mcp-scope-label">
+ {label}
+ {/* What the level reaches is part of naming the level, so the answer
+ rides on the label instead of a line under it. */}
+ <HelpIcon
+ label={
+ level === "global"
+ ? t("settings.globalScopeHint")
+ : t("settings.projectScopeHint")
+ }
+ />
</span>
</div>
<button
@@ -394,8 +400,10 @@ export function McpEditorSheet({
/>
</Field>
<div className="ext-field-group">
- <div className="ext-field-label">{t("extensions.mcp.env")}</div>
- <p className="ext-field-hint">{t("extensions.mcp.envHint")}</p>
+ <div className="ext-field-label">
+ {t("extensions.mcp.env")}
+ <HelpIcon label={t("extensions.mcp.envHint")} />
+ </div>
<KeyValueRows
pairs={draft.env}
onChange={(next) => set("env", next)}
@@ -421,8 +429,10 @@ export function McpEditorSheet({
</p>
) : null}
<div className="ext-field-group">
- <div className="ext-field-label">{t("extensions.mcp.headers")}</div>
- <p className="ext-field-hint">{t("extensions.mcp.headersHint")}</p>
+ <div className="ext-field-label">
+ {t("extensions.mcp.headers")}
+ <HelpIcon label={t("extensions.mcp.headersHint")} />
+ </div>
<KeyValueRows
pairs={draft.headers}
onChange={(next) => set("headers", next)}
@@ -446,10 +456,10 @@ export function McpEditorSheet({
<div className="ext-field-group">
<div className="ext-field-label">
{managementLevel ? t("settings.scope") : t("extensions.scope.title")}
+ <HelpIcon
+ label={managementLevel ? t("settings.scopeHint") : t("extensions.scope.sheetHint")}
+ />
</div>
- <p className="ext-field-hint">
- {managementLevel ? t("settings.scopeHint") : t("extensions.scope.sheetHint")}
- </p>
{managementLevel ? (
<ManagementScope
draft={draft}
diff --git a/apps/desktop/src/components/plugins/MarketplaceSourceSettings.tsx b/apps/desktop/src/components/plugins/MarketplaceSourceSettings.tsx
index db890ec6b..28354d3dc 100644
--- a/apps/desktop/src/components/plugins/MarketplaceSourceSettings.tsx
+++ b/apps/desktop/src/components/plugins/MarketplaceSourceSettings.tsx
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
import type { AppSettings, PluginMarketSource } from "@pi-desktop/shared";
import { api } from "../../lib/api";
import { useAppStore } from "../../stores/app-store";
-import { Input } from "../ui";
+import { HelpIcon, Input } from "../ui";
import { SettingsMenuSelect } from "../settings/SettingsMenuSelect";
type MarketplaceSourceSettingsProps = {
@@ -87,9 +87,9 @@ export function MarketplaceSourceSettings({
{source === "custom" ? (
<div className="plugins-market-settings-row">
<div className="plugins-market-settings-copy">
- <div className="settings-row-title">{t("settings.marketCustomUrl")}</div>
- <div className="settings-row-desc">
- {t("settings.marketCustomUrlDesc")}
+ <div className="settings-row-title">
+ {t("settings.marketCustomUrl")}
+ <HelpIcon label={t("settings.marketCustomUrlDesc")} />
</div>
</div>
<div className="plugins-market-settings-control">
diff --git a/apps/desktop/src/components/plugins/PluginSettingsSheet.tsx b/apps/desktop/src/components/plugins/PluginSettingsSheet.tsx
index 2c91fc34b..a3444c0b4 100644
--- a/apps/desktop/src/components/plugins/PluginSettingsSheet.tsx
+++ b/apps/desktop/src/components/plugins/PluginSettingsSheet.tsx
@@ -15,7 +15,7 @@ import {
} from "@pi-desktop/shared";
import { api } from "../../lib/api";
import { useAppStore } from "../../stores/app-store";
-import { Button, TooltipButton, cx, Input, Textarea } from "../ui";
+import { Button, HelpIcon, TooltipButton, cx, Input, Textarea } from "../ui";
import { IconKeyboard, IconSettings, IconX } from "../icons";
import { SettingsMenuSelect } from "../settings/SettingsMenuSelect";
@@ -182,11 +182,13 @@ export function PluginSettingsSheet({ plugin, platform, onClose, onSaved }: Prop
<div className="plugins-setting-copy">
<div className="plugins-setting-title">
{isShortcut ? <IconKeyboard size={14} aria-hidden="true" /> : null}
- <span>{setting.title}</span>
+ <span>
+ {setting.title}
+ {/* The plugin's own blurb about the field; a setting that
+ declares none leaves no mark. */}
+ {setting.description ? <HelpIcon label={setting.description} /> : null}
+ </span>
</div>
- {setting.description ? (
- <p className="plugins-setting-description">{setting.description}</p>
- ) : null}
{isShortcut ? (
<span className="plugins-setting-scope">{t("plugins.settingsPluginScope")}</span>
) : null}
diff --git a/apps/desktop/src/components/settings/EnhancementModelCard.tsx b/apps/desktop/src/components/settings/EnhancementModelCard.tsx
index e0d486c38..416486033 100644
--- a/apps/desktop/src/components/settings/EnhancementModelCard.tsx
+++ b/apps/desktop/src/components/settings/EnhancementModelCard.tsx
@@ -159,7 +159,7 @@ export function EnhancementModelCard() {
<>
<SettingsRow
title={t("settings.promptEnhancementModel")}
- description={
+ detail={
settings.promptEnhancementProviderId && settings.promptEnhancementModelId ? (
<span className="model-default-value">
<span className="model-default-provider">
diff --git a/apps/desktop/src/components/settings/FontSizeRow.tsx b/apps/desktop/src/components/settings/FontSizeRow.tsx
index 4f7b28b07..0853ad0db 100644
--- a/apps/desktop/src/components/settings/FontSizeRow.tsx
+++ b/apps/desktop/src/components/settings/FontSizeRow.tsx
@@ -8,6 +8,7 @@ import {
resolveFontScale,
} from "@pi-desktop/shared";
import { cx } from "../ui";
+import { SettingsRow } from "../../features/settings/primitives";
const PRESETS = [
{ scale: FONT_SCALE_PRESETS.small, key: "settings.fontSizeSmall" },
@@ -38,55 +39,52 @@ export function FontSizeRow({
};
return (
- <div className="settings-row">
- <div className="settings-row-copy">
- <div className="settings-row-title">{t("settings.fontSize")}</div>
- <div className="settings-row-desc">{t("settings.fontSizeDesc")}</div>
- </div>
- <div className="settings-row-control">
- <div className="settings-font-size">
- <div
- className="settings-segment"
- role="radiogroup"
- aria-label={t("settings.fontSize")}
- >
- {PRESETS.map((preset) => (
- <button
- key={preset.scale}
- type="button"
- role="radio"
- aria-checked={current === preset.scale}
- className={cx(
- "settings-segment-item",
- current === preset.scale && "active",
- )}
- onClick={() => commit(preset.scale)}
- >
- {t(preset.key)}
- </button>
- ))}
- </div>
- <div className="settings-font-size-slider">
- <input
- type="range"
- min={MIN_FONT_SCALE}
- max={MAX_FONT_SCALE}
- step={FONT_SCALE_STEP}
- value={current}
- aria-label={t("settings.fontSizeScale")}
- aria-valuetext={t("settings.fontSizePercent", {
- value: Math.round(current * 100),
- })}
- onChange={(event) => commit(Number(event.target.value))}
- />
- <span className="settings-font-size-percent">
- {t("settings.fontSizePercent", {
- value: Math.round(current * 100),
- })}
- </span>
- </div>
+ <SettingsRow
+ title={t("settings.fontSize")}
+ description={t("settings.fontSizeDesc")}
+ >
+ <div className="settings-font-size">
+ <div
+ className="settings-segment"
+ role="radiogroup"
+ aria-label={t("settings.fontSize")}
+ >
+ {PRESETS.map((preset) => (
+ <button
+ key={preset.scale}
+ type="button"
+ role="radio"
+ aria-checked={current === preset.scale}
+ className={cx(
+ "settings-segment-item",
+ current === preset.scale && "active",
+ )}
+ onClick={() => commit(preset.scale)}
+ >
+ {t(preset.key)}
+ </button>
+ ))}
+ </div>
+ <div className="settings-font-size-slider">
+ <input
+ type="range"
+ min={MIN_FONT_SCALE}
+ max={MAX_FONT_SCALE}
+ step={FONT_SCALE_STEP}
+ value={current}
+ aria-label={t("settings.fontSizeScale")}
+ aria-valuetext={t("settings.fontSizePercent", {
+ value: Math.round(current * 100),
+ })}
+ onChange={(event) => commit(Number(event.target.value))}
+ />
+ <span className="settings-font-size-percent">
+ {t("settings.fontSizePercent", {
+ value: Math.round(current * 100),
+ })}
+ </span>
</div>
</div>
- </div>
+ </SettingsRow>
);
}
diff --git a/apps/desktop/src/components/settings/ModelConfigPage.tsx b/apps/desktop/src/components/settings/ModelConfigPage.tsx
index 4ea7d092a..6807d6c01 100644
--- a/apps/desktop/src/components/settings/ModelConfigPage.tsx
+++ b/apps/desktop/src/components/settings/ModelConfigPage.tsx
@@ -317,7 +317,7 @@ export function ModelConfigPage() {
{t("settings.defaultModel")}
</div>
{defaultProviderReady ? (
- <div className="settings-row-desc model-default-value">
+ <div className="settings-row-detail model-default-value">
<span className="model-default-provider">{defaultProvider.name}</span>
<span className="model-default-sep" aria-hidden>
·
@@ -328,7 +328,7 @@ export function ModelConfigPage() {
</span>
</div>
) : (
- <div className="settings-row-desc model-default-value">
+ <div className="settings-row-detail model-default-value">
<span className="model-default-empty">
{readyProviders.length === 0
? t("settings.defaultModelNone")
diff --git a/apps/desktop/src/components/settings/ModelSelectionPanes.tsx b/apps/desktop/src/components/settings/ModelSelectionPanes.tsx
index 72040c97c..b4a8872d8 100644
--- a/apps/desktop/src/components/settings/ModelSelectionPanes.tsx
+++ b/apps/desktop/src/components/settings/ModelSelectionPanes.tsx
@@ -31,7 +31,7 @@ import {
MAX_OUTPUT_PRESETS,
matchPresetIndex,
} from "../../lib/model-limit-presets";
-import { Button, Field, Input, Tooltip, TooltipButton, cx } from "../ui";
+import { Button, Field, HelpIcon, Input, Tooltip, TooltipButton, cx } from "../ui";
import { IconClose, IconGripVertical, IconHelp, IconPlus, IconRefresh, IconSearch } from "../icons";
import { SettingsMenuSelect } from "./SettingsMenuSelect";
import { filterChosenModels, hidesAddedBinding } from "./model-chosen-filter";
@@ -434,7 +434,17 @@ export function ModelSelectionPanes({
onChange={(event) => toggleVisibleModels(event.target.checked)}
/>
) : null}
- <h4 className="provider-models-title">{listTitle}</h4>
+ <h4 className="provider-models-title">
+ {listTitle}
+ {/* Where this batch came from is the heading's answer now, so the
+ list keeps its height whether the source is the catalog or
+ the fallback. */}
+ {discovery.source === "catalog" ? (
+ <HelpIcon label={t("settings.modelsFromCatalogNote")} />
+ ) : discovery.source === "fallback" ? (
+ <HelpIcon label={t("settings.modelsFallbackNote")} />
+ ) : null}
+ </h4>
{onReload ? (
<button
type="button"
@@ -468,12 +478,6 @@ export function ModelSelectionPanes({
</div>
</div>
- {discovery.source === "catalog" ? (
- <div className="provider-models-note">{t("settings.modelsFromCatalogNote")}</div>
- ) : null}
- {discovery.source === "fallback" ? (
- <div className="provider-models-note">{t("settings.modelsFallbackNote")}</div>
- ) : null}
{fetchFailed && !emptyFetchError ? (
<ModelsFetchErrorMessage error={discovery.error} variant="banner" />
) : null}
@@ -588,7 +592,7 @@ export function ModelSelectionPanes({
<IconClose size={12} />
</TooltipButton>
</div>
- {/* Dense sheet: 2xs labels, alias hint as a title tooltip. */}
+ {/* Dense sheet: 2xs labels, explanations behind the help marks. */}
<div
className="provider-chosen-row-body"
id={advancedId}
@@ -597,11 +601,11 @@ export function ModelSelectionPanes({
<label className="provider-chosen-field">
<span className="provider-chosen-field-label">
{t("settings.modelAlias")}
+ <HelpIcon label={t("settings.modelAliasHint")} />
</span>
<Input
value={binding.alias ?? ""}
placeholder={t("settings.modelAliasPlaceholder")}
- title={t("settings.modelAliasHint")}
spellCheck={false}
autoCorrect="off"
autoCapitalize="off"
@@ -616,8 +620,14 @@ export function ModelSelectionPanes({
</label>
<div className="provider-chosen-limits">
<label className="provider-chosen-field">
+ {/* A catalog window keeps following models.dev until the
+ user pins a number; the mark beside the label is the
+ only place that still says so. */}
<span className="provider-chosen-field-label">
{t("settings.contextWindow")}
+ {followsCatalog ? (
+ <HelpIcon label={t("settings.contextWindowCatalogHint")} />
+ ) : null}
</span>
{/* Preset ladder (#202): click writes the token count;
the input stays hand-editable off the ladder. */}
@@ -667,13 +677,6 @@ export function ModelSelectionPanes({
})
}
/>
- {/* A catalog window keeps following models.dev; the hint
- says so until the user pins a number. */}
- {followsCatalog ? (
- <span className="provider-chosen-limit-hint">
- {t("settings.contextWindowCatalogHint")}
- </span>
- ) : null}
</label>
<label className="provider-chosen-field">
<span className="provider-chosen-field-label">
@@ -729,12 +732,12 @@ export function ModelSelectionPanes({
<div className="provider-chosen-thinking-head">
<span className="provider-chosen-thinking-label">
{t("settings.supportedThinkingLevels")}
+ {/* Nothing published means every level here is a
+ manual override; that is what the mark explains. */}
+ {publishedLevels.length === 0 ? (
+ <HelpIcon label={t("settings.thinkingManualOverrideHint")} />
+ ) : null}
</span>
- {publishedLevels.length === 0 ? (
- <span className="provider-chosen-thinking-hint">
- {t("settings.thinkingManualOverrideHint")}
- </span>
- ) : null}
{bindingDefaultThinkingMenuLevels(enabledLevels).length > 1 ? (
<div className="provider-chosen-thinking-default">
<span className="provider-chosen-thinking-label">
diff --git a/apps/desktop/src/components/settings/NetworkProxySection.tsx b/apps/desktop/src/components/settings/NetworkProxySection.tsx
index f2c9b7893..a4374800f 100644
--- a/apps/desktop/src/components/settings/NetworkProxySection.tsx
+++ b/apps/desktop/src/components/settings/NetworkProxySection.tsx
@@ -8,26 +8,7 @@ import {
} from "@pi-desktop/shared";
import { api } from "../../lib/api";
import { Button, Input, cx } from "../ui";
-
-function SettingsRow({
- title,
- description,
- children,
-}: {
- title: string;
- description?: string;
- children: React.ReactNode;
-}) {
- return (
- <div className="settings-row">
- <div className="settings-row-copy">
- <div className="settings-row-title">{title}</div>
- {description ? <div className="settings-row-desc">{description}</div> : null}
- </div>
- <div className="settings-row-control">{children}</div>
- </div>
- );
-}
+import { SettingsRow } from "../../features/settings/primitives";
const MODES: NetworkProxyMode[] = ["system", "direct", "custom"];
diff --git a/apps/desktop/src/components/settings/PluginScenicThemesDestination.tsx b/apps/desktop/src/components/settings/PluginScenicThemesDestination.tsx
index 848755a0b..e8c1fdbe4 100644
--- a/apps/desktop/src/components/settings/PluginScenicThemesDestination.tsx
+++ b/apps/desktop/src/components/settings/PluginScenicThemesDestination.tsx
@@ -2,7 +2,7 @@ import { useEffect, useMemo, useState } from "react";
import type { PluginScenicThemesDestinationMeta } from "@pi-desktop/shared";
import { api } from "../../lib/api";
import { useAppStore } from "../../stores/app-store";
-import { Button, cx } from "../ui";
+import { Button, HelpIcon, cx } from "../ui";
type Props = {
destination: PluginScenicThemesDestinationMeta;
@@ -83,8 +83,10 @@ export function PluginScenicThemesDestination({ destination, selectTheme }: Prop
</div>
<div className="plugin-scenic-blur-control">
<div className="plugin-scenic-blur-copy">
- <span className="plugin-scenic-blur-label">Backdrop blur</span>
- <span className="plugin-scenic-blur-help">Applies to {selectedCard.label}</span>
+ <span className="plugin-scenic-blur-label">
+ Backdrop blur
+ <HelpIcon label={`Applies to ${selectedCard.label}`} />
+ </span>
</div>
<div className="plugin-scenic-blur-actions">
<label className="sr-only" htmlFor="plugin-scenic-backdrop-blur">Backdrop blur</label>
diff --git a/apps/desktop/src/components/settings/ProviderSetupDialog.tsx b/apps/desktop/src/components/settings/ProviderSetupDialog.tsx
index e4fc045ff..e4ab383bf 100644
--- a/apps/desktop/src/components/settings/ProviderSetupDialog.tsx
+++ b/apps/desktop/src/components/settings/ProviderSetupDialog.tsx
@@ -16,7 +16,7 @@ import {
} from "@pi-desktop/shared";
import { api } from "../../lib/api";
import { pairsToRecord, recordToPairs } from "../extensions/KeyValueRows";
-import { Button, Field, Input, portalOverlay } from "../ui";
+import { Button, Field, HelpIcon, Input, portalOverlay } from "../ui";
import { ProviderHeadersEditor } from "./ProviderHeadersEditor";
import { SettingsMenuSelect } from "./SettingsMenuSelect";
import { useProviderModels } from "./useProviderModels";
@@ -336,6 +336,8 @@ export function ProviderSetupDialog({
<div className="provider-setup-head">
<h3 id="provider-setup-title" className="provider-setup-title">
{initialDraft ? t("settings.copyProviderTitle") : editing ? t("settings.editProviderTitle") : t("settings.addProviderTitle")}
+ {/* What a copy does and does not take is the title's own promise. */}
+ {initialDraft ? <HelpIcon label={t("settings.copyProviderHint")} /> : null}
</h3>
<div className="provider-setup-head-actions">
{named || custom ? (
@@ -373,7 +375,6 @@ export function ProviderSetupDialog({
</div>
<div className="provider-setup-body">
- {initialDraft ? <p className="settings-hint">{t("settings.copyProviderHint")}</p> : null}
{error ? <div className="provider-setup-error">{error}</div> : null}
<div className="provider-setup-credentials">
diff --git a/apps/desktop/src/components/settings/SkillEditorSheet.tsx b/apps/desktop/src/components/settings/SkillEditorSheet.tsx
index 28963fce2..b2d2f6ccd 100644
--- a/apps/desktop/src/components/settings/SkillEditorSheet.tsx
+++ b/apps/desktop/src/components/settings/SkillEditorSheet.tsx
@@ -7,7 +7,7 @@ import {
type AgentCapabilityLevel,
type UserSkillRecord,
} from "@pi-desktop/shared";
-import { Button, Field, Input, Textarea, TooltipButton, cx, portalOverlay } from "../ui";
+import { Button, Field, HelpIcon, Input, Textarea, TooltipButton, cx, portalOverlay } from "../ui";
import { IconFolderOpen, IconX } from "../icons";
/** Hard cap host-core enforces on a skill document. */
@@ -117,11 +117,17 @@ function ManagementScope({
return (
<div className="agent-mcp-scope">
<div className="agent-mcp-scope-copy">
- <span className="agent-mcp-scope-label">{label}</span>
- <span className="agent-mcp-scope-hint">
- {level === "global"
- ? t("settings.globalScopeDescription")
- : t("settings.projectScopeDescription")}
+ <span className="agent-mcp-scope-label">
+ {label}
+ {/* Which level the document lands in is the label's own question, so
+ the answer rides on it instead of taking a second line. */}
+ <HelpIcon
+ label={
+ level === "global"
+ ? t("settings.globalScopeDescription")
+ : t("settings.projectScopeDescription")
+ }
+ />
</span>
</div>
<button
@@ -255,7 +261,10 @@ export function SkillEditorSheet({
<div className="ext-field-group">
<div className="ext-field-label ext-field-label-row">
- <span>{t("extensions.skills.body")}</span>
+ <span>
+ {t("extensions.skills.body")}
+ <HelpIcon label={t("extensions.skills.bodyHint")} />
+ </span>
<span
className={
bytes > MAX_SKILL_BYTES
@@ -271,7 +280,6 @@ export function SkillEditorSheet({
})}
</span>
</div>
- <p className="ext-field-hint">{t("extensions.skills.bodyHint")}</p>
<Textarea
className="ext-skill-body"
value={draft.body}
@@ -284,8 +292,10 @@ export function SkillEditorSheet({
</div>
<div className="ext-field-group">
- <div className="ext-field-label">{t("settings.scope")}</div>
- <p className="ext-field-hint">{t("settings.scopeHint")}</p>
+ <div className="ext-field-label">
+ {t("settings.scope")}
+ <HelpIcon label={t("settings.scopeHint")} />
+ </div>
<ManagementScope
draft={draft}
setDraft={setDraft}
diff --git a/apps/desktop/src/components/settings/SubagentEditorSheet.tsx b/apps/desktop/src/components/settings/SubagentEditorSheet.tsx
index c26032f18..8725bb713 100644
--- a/apps/desktop/src/components/settings/SubagentEditorSheet.tsx
+++ b/apps/desktop/src/components/settings/SubagentEditorSheet.tsx
@@ -19,7 +19,7 @@ import {
type UserSubagentRecord,
} from "@pi-desktop/shared";
import { useAppStore } from "../../stores/app-store";
-import { Button, Field, Input, Textarea, TooltipButton, cx, portalOverlay } from "../ui";
+import { Button, Field, HelpIcon, Input, Textarea, TooltipButton, cx, portalOverlay } from "../ui";
import { IconChevronRight, IconFolderOpen, IconX } from "../icons";
import {
groupSubagentModelChoices,
@@ -320,12 +320,16 @@ function PresetPicker({
: null;
return (
<div className="ext-field-group">
- <div className="ext-field-label">{t("extensions.subagents.presetLabel")}</div>
+ <div className="ext-field-label">
+ {t("extensions.subagents.presetLabel")}
+ {/* The chosen template's blurb explains what picking it does, and the
+ label is what the user is picking it for. */}
+ {descKey ? <HelpIcon label={t(descKey)} /> : null}
+ </div>
<div
className="ext-preset-pick"
role="group"
aria-label={t("extensions.subagents.presetLabel")}
- aria-describedby={descKey ? "subagent-preset-desc" : undefined}
>
{SUBAGENT_PRESETS.map((preset) => {
const nameKey = subagentPresetCopyKey(preset.id, "name");
@@ -344,11 +348,6 @@ function PresetPicker({
nameLabel={t("extensions.subagents.presetBlank")}
/>
</div>
- {descKey ? (
- <p id="subagent-preset-desc" className="ext-preset-desc">
- {t(descKey)}
- </p>
- ) : null}
</div>
);
}
@@ -368,8 +367,12 @@ function ManagementScope({
return (
<div className="agent-mcp-scope">
<div className="agent-mcp-scope-copy">
- <span className="agent-mcp-scope-label">{t("settings.globalScope")}</span>
- <span className="agent-mcp-scope-hint">{t("settings.subagentsOnlyGlobal")}</span>
+ <span className="agent-mcp-scope-label">
+ {t("settings.globalScope")}
+ {/* Why there is no scope choice here: the answer belongs to the label
+ it applies to, not to a line under it. */}
+ <HelpIcon label={t("settings.subagentsOnlyGlobal")} />
+ </span>
</div>
<button
type="button"
@@ -701,7 +704,18 @@ export function SubagentEditorSheet({
</Field>
<div className="ext-field-group">
- <div className="ext-field-label">{t("extensions.subagents.tools")}</div>
+ <div className="ext-field-label">
+ {t("extensions.subagents.tools")}
+ {/* One mark carries whichever grant note applies, so the row of
+ chips never grows a sentence under it. */}
+ {draft.inheritTools ? (
+ <HelpIcon label={t("extensions.subagents.toolsInheritHint")} />
+ ) : draft.tools.some(isSubagentMutatingTool) ? (
+ <HelpIcon label={t("extensions.subagents.mutatingHint")} />
+ ) : (
+ <HelpIcon label={t("extensions.subagents.toolsHint")} />
+ )}
+ </div>
<div
className="ext-tool-pick"
role="group"
@@ -735,13 +749,6 @@ export function SubagentEditorSheet({
</label>
))}
</div>
- {draft.inheritTools ? (
- <p className="ext-field-hint">{t("extensions.subagents.toolsInheritHint")}</p>
- ) : draft.tools.some(isSubagentMutatingTool) ? (
- <p className="ext-field-hint">{t("extensions.subagents.mutatingHint")}</p>
- ) : (
- <p className="ext-field-hint">{t("extensions.subagents.toolsHint")}</p>
- )}
</div>
<div className="ext-field-group">
diff --git a/apps/desktop/src/components/settings/ThemeRow.tsx b/apps/desktop/src/components/settings/ThemeRow.tsx
index 8a49c8e2e..845dde347 100644
--- a/apps/desktop/src/components/settings/ThemeRow.tsx
+++ b/apps/desktop/src/components/settings/ThemeRow.tsx
@@ -15,6 +15,7 @@ import {
import { cx } from "../ui";
import { IconCheck, IconChevronDown, IconSearch } from "../icons";
import { AnchoredMenu } from "./AnchoredMenu";
+import { SettingsRow } from "../../features/settings/primitives";
import { useAppStore } from "../../stores/app-store";
type ThemeOption = {
@@ -117,13 +118,11 @@ export function ThemeRow({
};
return (
- <div className="settings-row">
- <div className="settings-row-copy">
- <div className="settings-row-title">{t("settings.theme")}</div>
- <div className="settings-row-desc">{t("settings.themeDesc")}</div>
- </div>
- <div className="settings-row-control">
- <AnchoredMenu
+ <SettingsRow
+ title={t("settings.theme")}
+ description={t("settings.themeDesc")}
+ >
+ <AnchoredMenu
className="settings-theme-anchor"
open={open}
onClose={close}
@@ -236,8 +235,7 @@ export function ThemeRow({
</ul>
)}
</div>
- </AnchoredMenu>
- </div>
- </div>
+ </AnchoredMenu>
+ </SettingsRow>
);
}
diff --git a/apps/desktop/src/components/ui.tsx b/apps/desktop/src/components/ui.tsx
index da93bba2a..84ebeb06a 100644
--- a/apps/desktop/src/components/ui.tsx
+++ b/apps/desktop/src/components/ui.tsx
@@ -12,7 +12,7 @@ import {
type TextareaHTMLAttributes,
} from "react";
-import { IconEye, IconEyeOff } from "./icons";
+import { IconEye, IconEyeOff, IconHelp } from "./icons";
export function cx(...parts: Array<string | false | null | undefined>) {
return parts.filter(Boolean).join(" ");
@@ -492,6 +492,33 @@ export function TooltipButton({
);
}
+/**
+ * The one affordance for "there is an explanation here": the sentence itself
+ * lives in the tooltip, and this icon is the only trace of it left in the
+ * layout (D601). It is a real button, so a keyboard reaches the same text a
+ * pointer hovers, and its accessible name is that sentence.
+ */
+export function HelpIcon({
+ label,
+ className,
+}: {
+ /** The explanation, revealed on hover/focus and used as the name. */
+ label: string;
+ className?: string;
+}) {
+ return (
+ <TooltipButton
+ type="button"
+ className={cx("ui-help-icon", className)}
+ tooltip={label}
+ tooltipClassName="ui-tooltip-help"
+ ariaLabel={label}
+ >
+ <IconHelp size={13} />
+ </TooltipButton>
+ );
+}
+
export function Button({
variant = "secondary",
size = "md",
@@ -601,9 +628,11 @@ export function Field({
}) {
return (
<label className="block space-y-1.5">
- <div className="text-sm text-text-secondary">{label}</div>
+ <div className="text-sm text-text-secondary">
+ {label}
+ {hint ? <HelpIcon label={hint} /> : null}
+ </div>
{children}
- {hint ? <div className="text-xs text-text-muted">{hint}</div> : null}
</label>
);
}
diff --git a/apps/desktop/src/features/settings/agent-sections.tsx b/apps/desktop/src/features/settings/agent-sections.tsx
index bcbcf3abb..a17264dfd 100644
--- a/apps/desktop/src/features/settings/agent-sections.tsx
+++ b/apps/desktop/src/features/settings/agent-sections.tsx
@@ -39,10 +39,12 @@ export function AgentInstructionsSection() {
const globalDirty = global !== null && globalDraft !== global.content;
return (
<div className="settings-stack">
- <SettingsCard title={t("settings.instructionsGlobal")}>
+ <SettingsCard
+ title={t("settings.instructionsGlobal")}
+ description={t("settings.instructionsGlobalDesc")}
+ >
<div className="settings-form-grid">
<div className="settings-row-copy">
- <div className="settings-row-desc">{t("settings.instructionsGlobalDesc")}</div>
<div className="settings-instruction-path">{global?.path ?? ""}</div>
</div>
<textarea
diff --git a/apps/desktop/src/features/settings/import-page.tsx b/apps/desktop/src/features/settings/import-page.tsx
index c7f8ab542..e57b0a95a 100644
--- a/apps/desktop/src/features/settings/import-page.tsx
+++ b/apps/desktop/src/features/settings/import-page.tsx
@@ -32,7 +32,7 @@ import {
groupImportCandidates,
type ImportGroupBy,
} from "../../lib/import-groups";
-import { Badge, Button, cx } from "../../components/ui";
+import { Badge, Button, HelpIcon, cx } from "../../components/ui";
import { IconChevronLeft, IconDownload } from "../../components/icons";
import { SettingsMenuSelect } from "../../components/settings/SettingsMenuSelect";
@@ -128,6 +128,7 @@ function ImportToolbar({
onScan,
onImport,
options,
+ hint,
}: {
found: string;
selectedCount: number;
@@ -140,6 +141,8 @@ function ImportToolbar({
onImport: () => void;
/** Kind-specific control in front of the actions, e.g. grouping or mode. */
options?: ReactNode;
+ /** The current result set's caveat (a source cap), on demand. */
+ hint?: string;
}) {
const { t } = useTranslation();
const selectAllRef = useRef<HTMLInputElement>(null);
@@ -170,6 +173,7 @@ function ImportToolbar({
</label>
<div className="import-toolbar-actions">
{options}
+ {hint ? <HelpIcon label={hint} /> : null}
<Button
variant="secondary"
disabled={scanning}
@@ -198,16 +202,22 @@ function ImportOption({
label,
value,
options,
+ hint,
onChange,
}: {
label: string;
value: string;
options: { id: string; label: string }[];
+ /** Explains the choice, reached from the label's help icon. */
+ hint?: string;
onChange: (id: string) => void;
}) {
return (
<label className="import-option">
- <span className="import-option-label">{label}</span>
+ <span className="import-option-label">
+ {label}
+ {hint ? <HelpIcon label={hint} /> : null}
+ </span>
<SettingsMenuSelect
className="import-option-select"
label={label}
@@ -345,17 +355,19 @@ function ImportIdle({
scanning: boolean;
}) {
const { t } = useTranslation();
+ const help = [description, note].filter(Boolean).join(" · ");
return (
<div className="settings-panel import-panel">
<div className="import-idle">
<span className="import-idle-glyph" aria-hidden>
<IconDownload size={20} />
</span>
- {description ? <p className="import-idle-copy">{description}</p> : null}
- {note ? <p className="import-idle-note">{note}</p> : null}
- <Button variant="secondary" disabled={scanning} onClick={onScan}>
- {scanning ? t("settings.importScanning") : t("settings.importScan")}
- </Button>
+ <div className="import-idle-actions">
+ <Button variant="secondary" disabled={scanning} onClick={onScan}>
+ {scanning ? t("settings.importScanning") : t("settings.importScan")}
+ </Button>
+ {help ? <HelpIcon label={help} /> : null}
+ </div>
</div>
</div>
);
@@ -516,6 +528,11 @@ export function SessionImportPanel() {
importing={importing}
onScan={() => void scan()}
onImport={() => void runImport()}
+ hint={
+ codexCap != null
+ ? t("settings.importCodexCapped", { limit: codexCap })
+ : undefined
+ }
options={
<ImportOption
label={t("settings.importGroupBy")}
@@ -531,9 +548,6 @@ export function SessionImportPanel() {
/>
}
/>
- {codexCap != null ? (
- <p className="import-hint">{t("settings.importCodexCapped", { limit: codexCap })}</p>
- ) : null}
<ImportResults
message={
candidates.length === 0 ? t("settings.importNone") : undefined
@@ -925,6 +939,7 @@ export function SkillsScanImportPanel() {
label={t("settings.importAgentScanMode")}
value={mode}
onChange={(id) => setMode(id as "copy" | "link")}
+ hint={t("settings.importAgentScanModeHint")}
options={[
{ id: "copy", label: t("settings.importAgentScanModeCopy") },
{ id: "link", label: t("settings.importAgentScanModeLink") },
@@ -932,7 +947,6 @@ export function SkillsScanImportPanel() {
/>
}
/>
- <p className="import-hint">{t("settings.importAgentScanModeHint")}</p>
<ImportResults
message={
result.candidates.length === 0
diff --git a/apps/desktop/src/features/settings/primitives.tsx b/apps/desktop/src/features/settings/primitives.tsx
index cbcb6e589..a48537f8f 100644
--- a/apps/desktop/src/features/settings/primitives.tsx
+++ b/apps/desktop/src/features/settings/primitives.tsx
@@ -12,39 +12,71 @@ import {
} from "@pi-desktop/shared";
import { api } from "../../lib/api";
import { resolveContextUsageDisplay } from "../../lib/context-usage";
-import { Input, cx } from "../../components/ui";
+import { HelpIcon, Input, cx } from "../../components/ui";
import { SettingsMenuSelect } from "../../components/settings/SettingsMenuSelect";
+/**
+ * One settings decision: the title and its control on a single line.
+ *
+ * The explanation never occupies a permanent second line — it is reached from
+ * the question mark beside the title, which keeps a card scannable (D601).
+ * `detail` is the exception in kind, not in styling: a row that shows a live
+ * value (the pinned default model) keeps it visible, because that is data the
+ * user came to read, not prose explaining a switch.
+ */
export function SettingsRow({
title,
description,
+ detail,
children,
}: {
title: string;
- description?: ReactNode;
+ /** Explanatory copy, revealed on demand from the help icon. */
+ description?: string;
+ /** Live row metadata that stays visible (not an explanation). */
+ detail?: ReactNode;
children: ReactNode;
}) {
return (
<div className="settings-row">
<div className="settings-row-copy">
- <div className="settings-row-title">{title}</div>
- {description ? <div className="settings-row-desc">{description}</div> : null}
+ <div className="settings-row-title">
+ {title}
+ {description ? <HelpIcon label={description} /> : null}
+ </div>
+ {detail ? <div className="settings-row-detail">{detail}</div> : null}
</div>
<div className="settings-row-control">{children}</div>
</div>
);
}
+/**
+ * A titled group of rows. `description` follows the same rule as a row's: it
+ * explains the card, so it lives behind the heading's help icon.
+ */
export function SettingsCard({
title,
+ description,
children,
}: {
title?: string;
+ description?: string;
children: ReactNode;
}) {
return (
<section className="settings-card-block">
- {title ? <h3 className="settings-card-heading">{title}</h3> : null}
+ {title ? (
+ /*
+ The help mark is the heading's sibling, not its child: a nested
+ button joins the heading's accessible name, and a screen reader's
+ list of headings should not read out every explanation.
+ */
+ <div className="settings-card-heading-help">
+ <h3 className="settings-card-heading">{title}</h3>
+ {description ? <HelpIcon label={description} /> : null}
+ </div>
+ ) : null}
<div className="settings-panel">{children}</div>
</section>
);
diff --git a/apps/desktop/src/styles/sessions.css b/apps/desktop/src/styles/sessions.css
index ef248a58e..0ec8c58c1 100644
--- a/apps/desktop/src/styles/sessions.css
+++ b/apps/desktop/src/styles/sessions.css
@@ -131,15 +131,6 @@
height: 28px;
}
-/* Import mode leaves the one-line toolbar alone but stays readable. */
-.import-hint {
- margin: -4px 1px 0;
- max-width: 92ch;
- color: var(--ds-text-muted);
- font-size: var(--text-2xs);
- line-height: var(--leading-body);
-}
-
/* D297: the list dissolves into the page — each row is its own tile. */
.settings-panel.import-panel {
gap: 6px;
@@ -313,18 +304,11 @@
color: var(--ds-text-faint);
}
-.import-idle-copy {
- margin: 0;
- max-width: 62ch;
- color: var(--ds-text-secondary);
- font-size: var(--text-sm);
- line-height: var(--leading-body);
-}
-
-.import-idle-note {
- margin: 0;
- color: var(--ds-text-faint);
- font-size: var(--text-2xs);
+/* The idle action, with the help icon that says what a scan will cover. */
+.import-idle-actions {
+ display: inline-flex;
+ align-items: center;
+ gap: 4px;
}
/* A scan that found nothing keeps its action in the toolbar above. */
diff --git a/apps/desktop/src/styles/settings.css b/apps/desktop/src/styles/settings.css
index 454907e03..2e34d2ea8 100644
--- a/apps/desktop/src/styles/settings.css
+++ b/apps/desktop/src/styles/settings.css
@@ -91,7 +91,6 @@
.plugin-scenic-blur-control { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; border: 1px solid color-mix(in srgb, var(--ds-border) 84%, transparent); border-radius: var(--radius-md-plus); background: color-mix(in srgb, var(--ds-bg-elevated) 82%, transparent); box-shadow: 0 10px 24px color-mix(in srgb, #000 16%, transparent); }
.plugin-scenic-blur-copy { display: grid; gap: 3px; }
.plugin-scenic-blur-label { font-weight: 600; }
-.plugin-scenic-blur-help { color: var(--ds-text-muted); font-size: 12px; }
.plugin-scenic-blur-actions { display: flex; align-items: center; gap: 12px; min-width: min(100%, 360px); }
.plugin-scenic-blur-actions input { flex: 1; min-width: 110px; }
.plugin-scenic-blur-actions output { min-width: 34px; color: var(--ds-text-muted); font-variant-numeric: tabular-nums; }
@@ -359,6 +358,13 @@
font-weight: var(--font-weight-strong);
}
+/* The heading's help mark sits beside the heading rather than inside it: a
+ nested button would join the heading's accessible name. */
+.settings-card-heading-help {
+ display: flex;
+ align-items: center;
+}
+
.settings-card-heading-row {
display: flex;
align-items: flex-end;
@@ -617,12 +623,13 @@
line-height: var(--leading-compact);
}
-.settings-row-desc {
+/* A row's live value (not an explanation): visible, and secondary to the
+ title the same way the retired desc line was. */
+.settings-row-detail {
margin-top: 3px;
color: var(--ds-text-secondary);
font-size: var(--text-sm);
line-height: var(--leading-body);
- max-width: 62ch;
}
.settings-row-control {
diff --git a/apps/desktop/src/styles/ui-kit.css b/apps/desktop/src/styles/ui-kit.css
index 954ca4247..5b01c94b6 100644
--- a/apps/desktop/src/styles/ui-kit.css
+++ b/apps/desktop/src/styles/ui-kit.css
@@ -28,6 +28,39 @@
overflow-wrap: anywhere;
white-space: normal;
}
+
+/* A help tooltip carries a sentence, not a label, so it wraps instead of
+ running off its anchor. */
+.ui-tooltip-help {
+ width: max-content;
+ max-width: min(360px, calc(100vw - 16px));
+ overflow-wrap: anywhere;
+ white-space: normal;
+ text-align: left;
+}
+
+/*
+ The help affordance: a row, card heading, or form field keeps its
+ explanation out of the layout and behind this question mark, which is the
+ only mark that there is more to read (D601). It is a button, so a keyboard
+ reaches the same sentence a pointer hovers.
+*/
+.ui-help-icon {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ margin-left: 6px;
+ padding: 0;
+ border: 0;
+ background: none;
+ color: var(--ds-text-muted);
+ vertical-align: middle;
+ cursor: help;
+}
+.ui-help-icon:hover,
+.ui-help-icon:focus-visible {
+ color: var(--ds-text-secondary);
+}
.panel-card {
border-radius: var(--radius-lg);
background: var(--ds-tile);
diff --git a/apps/desktop/test/model-advanced-capabilities.test.mjs b/apps/desktop/test/model-advanced-capabilities.test.mjs
index c047ba584..c8349943d 100644
--- a/apps/desktop/test/model-advanced-capabilities.test.mjs
+++ b/apps/desktop/test/model-advanced-capabilities.test.mjs
@@ -109,7 +109,7 @@ test("selected thinking chips keep high contrast in both themes", () => {
test("thinking levels use a compact accessible grouped control", () => {
assert.match(
pickerSource,
- /className="provider-chosen-thinking-head">[\s\S]*?provider-chosen-thinking-hint[\s\S]*?<\/div>\s*<div[\s\S]*?className="provider-chosen-thinking-chips"/,
+ /className="provider-chosen-thinking-head">[\s\S]*?thinkingManualOverrideHint[\s\S]*?<\/div>\s*<div[\s\S]*?className="provider-chosen-thinking-chips"/,
);
assert.match(pickerSource, /role="group"/);
assert.match(styles, /\.provider-chosen-thinking-head \{/);
@@ -205,11 +205,14 @@ test("a model the catalog does not describe still reports its binding overrides"
test("the advanced body is a compact sheet without helper paragraphs", () => {
// The generic Field + hint paragraph made the disclosure a stacked form dump
- // inside a half-pane. Labels stay 2xs, the alias hint is a title tooltip, and
- // the default selector sits on the thinking label row.
+ // inside a half-pane. Labels stay 2xs, the alias hint is the help mark beside
+ // the label, and the default selector sits on the thinking label row.
assert.match(pickerSource, /className="provider-chosen-field"/);
- assert.match(pickerSource, /title=\{t\("settings.modelAliasHint"\)\}/);
- assert.doesNotMatch(pickerSource, /hint=\{t\("settings.modelAliasHint"\)\}/);
+ assert.match(
+ pickerSource,
+ /<HelpIcon label=\{t\("settings\.modelAliasHint"\)\} \/>/,
+ );
+ assert.doesNotMatch(pickerSource, /hint=\{t\("settings\.modelAliasHint"\)\}/);
assert.match(pickerSource, /aria-controls=\{advancedId\}/);
assert.match(pickerSource, /models\[0\]\?\.id \?\? null/);
assert.match(
diff --git a/apps/desktop/test/settings-help-tooltip.test.mjs b/apps/desktop/test/settings-help-tooltip.test.mjs
new file mode 100644
index 000000000..06810d39e
--- /dev/null
+++ b/apps/desktop/test/settings-help-tooltip.test.mjs
@@ -0,0 +1,122 @@
+import assert from "node:assert/strict";
+import { readFile } from "node:fs/promises";
+import test from "node:test";
+import { loadStyles } from "./helpers/styles.mjs";
+
+const source = (path) =>
+ readFile(new URL(`../src/${path}`, import.meta.url), "utf8");
+
+const ui = await source("components/ui.tsx");
+const primitives = await source("features/settings/primitives.tsx");
+const settingsPage = await source("features/settings/SettingsPage.tsx");
+const importPage = await source("features/settings/import-page.tsx");
+const networkProxy = await source("components/settings/NetworkProxySection.tsx");
+const styles = await loadStyles();
+
+/** One rule body out of the composed stylesheet, by exact selector. */
+function cssRule(selector) {
+ const start = styles.indexOf(`${selector} {`);
+ assert.ok(start >= 0, `missing CSS rule ${selector}`);
+ return styles.slice(start, styles.indexOf("}", start));
+}
+
+/*
+ A settings page is a list of decisions. Explanatory prose used to sit in a
+ permanent second line under every title, which buried the decisions it was
+ explaining; it now lives behind a question mark and shows up on hover or
+ focus (D601).
+*/
+test("a settings row explains itself from a help icon, not a second line", () => {
+ // The copy travels as a string, because that is what a tooltip can carry.
+ assert.match(
+ primitives,
+ /\/\*\* Explanatory copy, revealed on demand from the help icon\. \*\/\n {2}description\?: string;/,
+ );
+ assert.match(primitives, /\{description \? <HelpIcon label=\{description\} \/> : null\}/);
+ // A card heading follows the same rule as a row.
+ assert.match(primitives, /export function SettingsCard\(\{/);
+ assert.match(primitives, /\n {2}description\?: string;\n/);
+ // The retired always-on line must not come back through the renderers.
+ assert.doesNotMatch(primitives, /settings-row-desc">\{description\}/);
+ // The heading's mark is a sibling, not a child: a nested button joins the
+ // heading's accessible name, and a screen reader's heading list would then
+ // read out the explanation instead of the title.
+ assert.match(primitives, /<div className="settings-card-heading-help">/);
+ assert.match(
+ primitives,
+ /<h3 className="settings-card-heading">\{title\}<\/h3>/,
+ );
+});
+
+test("the help icon is a focusable button whose name is the sentence", () => {
+ const start = ui.indexOf("export function HelpIcon(");
+ assert.ok(start >= 0, "ui.tsx should export HelpIcon");
+ const helpIcon = ui.slice(start, ui.indexOf("export function Button(", start));
+ assert.match(helpIcon, /<TooltipButton/);
+ assert.match(helpIcon, /className=\{cx\("ui-help-icon", className\)\}/);
+ assert.match(helpIcon, /tooltip=\{label\}/);
+ assert.match(helpIcon, /tooltipClassName="ui-tooltip-help"/);
+ assert.match(helpIcon, /ariaLabel=\{label\}/);
+ assert.match(helpIcon, /<IconHelp size=\{13\} \/>/);
+});
+
+test("the help tooltip wraps instead of running off its anchor", () => {
+ const tooltip = cssRule(".ui-tooltip-help");
+ assert.match(tooltip, /white-space:\s*normal/);
+ assert.match(tooltip, /overflow-wrap:\s*anywhere/);
+
+ const icon = cssRule(".ui-help-icon");
+ assert.match(icon, /cursor:\s*help/);
+ assert.match(icon, /color:\s*var\(--ds-text-muted\)/);
+ // Hover and focus share one selector group, so the rule starts at the
+ // first of them rather than at a selector of its own.
+ const hover = styles.slice(styles.indexOf(".ui-help-icon:hover"));
+ assert.ok(hover.length > 0, "missing the .ui-help-icon hover state");
+ assert.match(
+ hover.slice(0, hover.indexOf("}")),
+ /color:\s*var\(--ds-text-secondary\)/,
+ );
+});
+
+test("the row explanations survive the move into the tooltip", () => {
+ for (const key of [
+ "settings.permissionModeDesc",
+ "settings.modeDesc",
+ "settings.enterToSendDesc",
+ "settings.feedbackDesc",
+ ]) {
+ assert.match(
+ settingsPage,
+ new RegExp(`description=\\{t\\("${key.replace(/\./g, "\\.")}"\\)\\}`),
+ `${key} should still be the row's explanation`,
+ );
+ }
+ assert.match(
+ primitives,
+ /description=\{t\("settings\.largePasteThresholdDesc"\)\}/,
+ );
+});
+
+test("one settings row renderer owns the layout", () => {
+ // The proxy section used to carry its own copy of the row skeleton, which
+ // would have kept the retired second line alive.
+ assert.doesNotMatch(networkProxy, /function SettingsRow\(/);
+ assert.match(
+ networkProxy,
+ /import \{ SettingsRow \} from "\.\.\/\.\.\/features\/settings\/primitives";/,
+ );
+});
+
+test("an import hint is reachable from the control it explains", () => {
+ // The standalone hint line is gone; the toolbar and its option carry it.
+ assert.doesNotMatch(importPage, /className="import-hint"/);
+ assert.match(importPage, /hint\?: string;/);
+ assert.match(importPage, /hint=\{t\("settings\.importAgentScanModeHint"\)\}/);
+ assert.match(importPage, /hint=\{\n\s+codexCap != null/);
+ assert.match(importPage, /\{hint \? <HelpIcon label=\{hint\} \/> : null\}/);
+ assert.match(importPage, /\{help \? <HelpIcon label=\{help\} \/> : null\}/);
+ // A hint rides beside the controls, so the toolbar must still render them:
+ // a half-migrated prop list silently dropped the grouping and mode pickers
+ // once already, and no source-level assertion caught it.
+ assert.match(importPage, /\{options\}\n\s+\{hint \? <HelpIcon/);
+});
diff --git a/apps/desktop/test/subagent-editor-presets.test.mjs b/apps/desktop/test/subagent-editor-presets.test.mjs
index e02ffa2bd..5841a4dd4 100644
--- a/apps/desktop/test/subagent-editor-presets.test.mjs
+++ b/apps/desktop/test/subagent-editor-presets.test.mjs
@@ -176,7 +176,9 @@ test("the English catalog ships every mapped preset copy key", async () => {
});
test("the create sheet is a compact chip row with an Advanced disclosure", () => {
- assert.match(editorSource, /id="subagent-preset-desc"/);
+ // The preset blurb travels as the help mark's label, so the row of chips
+ // stays one line high.
+ assert.match(editorSource, /\{descKey \? <HelpIcon label=\{t\(descKey\)\} \/> : null\}/);
assert.match(editorSource, /function AdvancedFields/);
assert.match(editorSource, /useState\(!!editing\)/);
assert.doesNotMatch(editorSource, /extensions\.subagents\.presetApply/);
diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.md
index aee6d0afc..bf19d2b68 100644
--- a/docs/spec/04-ux/06-settings-ia.md
+++ b/docs/spec/04-ux/06-settings-ia.md
@@ -724,8 +724,12 @@ system while preserving their different data ownership:
8. Model configuration shows compact Defaults, separate vendor accounts, the
account edit/add dialogs, and AI service cards rather than a dense always-on
form dump
-9. Row descriptions use semantic secondary text and maintain at least 4.5:1
- contrast against their card surface in both light and dark themes
+9. A row's or card heading's explanation is not a permanent second line: it
+ travels as a string into the question mark beside the title, which reveals
+ it on hover and keyboard focus and keeps at least 4.5:1 contrast against its
+ card surface in both light and dark themes. A row's live value (the pinned
+ default model) is data rather than prose and stays visible, and a form
+ field's hint follows the same rule as a row's explanation
10. Dragging the empty top band from either side of Settings moves the native
window without blocking Back, search, or navigation controls
11. Resizing the window expands or contracts the content cards with the
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index bf65050fd..0da6be692 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -6400,3 +6400,26 @@ that was sitting at the bottom — including after the turn had finished.
- `out/renderer` emits no application font face any more; only KaTeX's `woff2`
glyphs remain. See ADR 0298, `04-ux/06-settings-ia.md`,
`04-ux/07-ui-design-system.md`, and E2E-126.
+
+## 2026-09-20 — Settings explain themselves on demand (D601)
+
+- Decision D601 is renderer-only. A settings row no longer carries a permanent
+ second line of prose under its title: `SettingsRow.description` is a string
+ that renders behind the question mark beside the title, and `SettingsCard`
+ gains the same `description` for a card heading. `HelpIcon`
+ (`components/ui.tsx`) is the single affordance — a real button, so a keyboard
+ reaches the sentence a pointer hovers, and the sentence itself is its
+ accessible name. `Field`'s `hint` moved to it as well.
+- A row's live value is not an explanation and stays visible: the pinned
+ default model travels through the new `SettingsRow.detail`, and
+ `NetworkProxySection`'s local copy of the row skeleton is gone in favour of
+ the shared one, so the retired line cannot return through a second renderer.
+- The mark is a sibling of the element it explains wherever that element is a
+ heading, because a nested button joins the heading's accessible name. A
+ settings `Field` is the deliberate exception: its hint stays inside the
+ `<label>`, so the field's accessible name carries the sentence too. Moving it
+ out would cost click-to-focus on every field, which a longer name does not
+ justify.
+- No IPC channel, host protocol, storage schema, persisted setting, or i18n key
+ changed: every sentence keeps its key and only its placement moved. See
+ `04-ux/06-settings-ia.md` and `04-ux/07-ui-design-system.md`.