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): show empty-state icons and extension rail glyphs
vastsa73ee3beb379a
diff --git a/apps/desktop/src/components/settings/AgentCapabilityLayout.tsx b/apps/desktop/src/components/settings/AgentCapabilityLayout.tsxindex c090cc110..c63a8892b 100644--- a/apps/desktop/src/components/settings/AgentCapabilityLayout.tsx+++ b/apps/desktop/src/components/settings/AgentCapabilityLayout.tsx@@ -534,7 +534,9 @@ export function CapabilityEmpty({}) {return (<div className="agent-capability-empty" role="status">- {icon ?? <IconFolderOpen size={18} aria-hidden="true" />}+ <span className="agent-capability-empty-icon" aria-hidden="true">+ {icon ?? <IconFolderOpen size={18} />}+ </span><span className="agent-capability-empty-message">{message}</span>{hint ? <span className="agent-capability-empty-hint">{hint}</span> : null}{action ? <div className="agent-capability-empty-action">{action}</div> : null}diff --git a/apps/desktop/src/features/settings/SettingsPage.tsx b/apps/desktop/src/features/settings/SettingsPage.tsxindex 32b6d1df8..3ef2280d3 100644--- a/apps/desktop/src/features/settings/SettingsPage.tsx+++ b/apps/desktop/src/features/settings/SettingsPage.tsx@@ -13,6 +13,7 @@ import {SETTINGS_NAV_GROUP_LABELS,type SettingsNavGroupId,} from "../../lib/settings-search";+import { pluginViewIcon } from "../../lib/plugin-view-icons";import {IconArchive,IconBookOpen,@@ -23,6 +24,7 @@ import {IconGlobe,IconInfo,IconKeyboard,+ IconPalette,IconSearch,IconServer,IconSliders,@@ -280,12 +282,19 @@ export function SettingsPage() {{extensions.filter((entry) => {const q = query.trim().toLowerCase();return !q || [entry.label, ...entry.keywords].some((value) => value.toLowerCase().includes(q));- }).map((entry) => (- <button key={entry.ref} className={cx("settings-nav-item", activeExtension?.ref === entry.ref && "active")} onClick={() => setActiveExtension(entry)}>- <span className="settings-nav-icon"><IconBookOpen size={14} /></span>- <span className="settings-nav-label">{entry.label}</span>- </button>- ))}+ }).map((entry) => {+ const ExtensionIcon = pluginViewIcon(entry.icon) ?? IconPalette;+ return (+ <button+ key={entry.ref}+ className={cx("settings-nav-item", activeExtension?.ref === entry.ref && "active")}+ onClick={() => setActiveExtension(entry)}+ >+ <span className="settings-nav-icon"><ExtensionIcon size={14} /></span>+ <span className="settings-nav-label">{entry.label}</span>+ </button>+ );+ })}</div>)}</div>diff --git a/apps/desktop/src/styles/settings.css b/apps/desktop/src/styles/settings.cssindex 086c4dccb..10596d15b 100644--- a/apps/desktop/src/styles/settings.css+++ b/apps/desktop/src/styles/settings.css@@ -2092,14 +2092,17 @@}/*- Direct child only. As a descendant selector this also dressed the icon inside- the empty state's own CTA button as a 34px faint chip, which ate the glyph and- stretched the button.+ Chip the empty-state glyph on a wrapper, never on the SVG. Lucide icons set+ inline width/height; padding those attributes crushes the stroke to a blank+ chip. The CTA inside `.agent-capability-empty-action` keeps its own icon.*/-.agent-capability-empty > svg {+.agent-capability-empty-icon {+ display: inline-flex;width: 34px;height: 34px;- padding: 8px;+ flex: 0 0 auto;+ align-items: center;+ justify-content: center;border-radius: var(--radius-md);background: var(--ds-bg-chip);color: var(--ds-text-faint);diff --git a/apps/desktop/test/agent-capability-settings.test.mjs b/apps/desktop/test/agent-capability-settings.test.mjsindex 04bfccc60..7db21f9fd 100644--- a/apps/desktop/test/agent-capability-settings.test.mjs+++ b/apps/desktop/test/agent-capability-settings.test.mjs@@ -133,12 +133,13 @@ test("the workbench reuses the shared segmented control instead of a third copy"});test("the empty state dresses its own glyph, not the icon in its CTA button", () => {- // The empty state can carry a create button, and that button carries an icon.- // As a descendant selector this rule also turned that 14px glyph into a 34px- // faint chip with its own background, which hid the icon and stretched the- // button. Direct child only.- assert.match(styles, /\.agent-capability-empty > svg\s*\{/);+ // Lucide icons set inline width/height. Padding the SVG itself crushed the+ // stroke into a blank chip, and a descendant `svg` rule also ate the CTA+ // button's icon. Chip the host Icon on a wrapper instead.+ assert.match(layout, /agent-capability-empty-icon/);+ assert.match(styles, /\.agent-capability-empty-icon\s*\{/);assert.doesNotMatch(styles, /\.agent-capability-empty svg\s*\{/);+ assert.doesNotMatch(styles, /\.agent-capability-empty > svg\s*\{/);// The pages that pass a CTA into the empty state are the ones that regressed.for (const page of [mcp, subagents]) {assert.match(page, /action=\{addButton\}|action=\{[a-zA-Z]*[Bb]utton\}/);diff --git a/apps/desktop/test/plugin-settings-renderer-surface.test.mjs b/apps/desktop/test/plugin-settings-renderer-surface.test.mjsindex 2df4b28f7..8d94ea623 100644--- a/apps/desktop/test/plugin-settings-renderer-surface.test.mjs+++ b/apps/desktop/test/plugin-settings-renderer-surface.test.mjs@@ -11,6 +11,8 @@ test("scenic extensions are host-rendered, accessible, and have no iframe canvasconst css = read("src/styles/settings.css");assert.match(page, /PluginScenicThemesDestination/);assert.doesNotMatch(page, /PluginSettingsDestination/);+ assert.match(page, /pluginViewIcon\(entry\.icon\)/);+ assert.doesNotMatch(page, /settings-nav-icon"><IconBookOpen/);assert.match(component, /aria-pressed/);assert.match(component, /type="range"/);assert.match(component, /"Apply"/);diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.mdindex 97645abcb..07ed480fe 100644--- a/docs/spec/04-ux/06-settings-ia.md+++ b/docs/spec/04-ux/06-settings-ia.md@@ -62,8 +62,10 @@ Settings is a **full-window page** that replaces the app sidebar + main chrome (When search filters the directory, empty clusters and their headings disappear.- Loaded plugin Settings entries may appear only in a final **Extensions** groupafter all core groups. The host owns their ordering, search result, titlebar- and fallback to General. Their content is a sandboxed plugin page measured- into the content pane; it never covers the rail or titlebar.+ and fallback to General. The rail icon is the destination's host token+ (scenic themes: Lucide `Palette` via `pluginViewIcon`), never plugin markup+ and never a generic Skills book glyph. Their content is a sandboxed plugin+ page measured into the content pane; it never covers the rail or titlebar.- Main content pane on primary surface with large section title + elevatedrounded cards of rows. Its content uses the full width available after thefixed rail and pane gutters, and resizes continuously with the window.@@ -452,9 +454,11 @@ system while preserving their different data ownership:Enablement flips locally first and reverts only if the host refuses, andbusy state is scoped to the row that is working — one pending request neverdisables the rest of the page. Empty states are quiet centered- glyph-and-copy blocks inside the panel; an empty level offers the same- primary action rather than being a dead end, and a search with no matches- says so and suggests widening the level filter.+ glyph-and-copy blocks inside the panel. The glyph is a host Lucide icon+ (`IconBookOpen` / `IconServer` / `IconBot`) inside a chip wrapper; do not+ pad or resize the SVG itself, because Lucide already sets inline size.+ An empty level offers the same primary action rather than being a dead end,+ and a search with no matches says so and suggests widening the level filter.- When the viewport is narrow the toolbar stacks: the segmented control spansthe width with evenly divided segments, search sits below it, and theactions wrap left-aligned. Group headers drop the resolved path so row copydiff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex 12fcadd46..f4cc24ac2 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -16,7 +16,9 @@keyboard navigation, open the entry, change the variable, select/reselect thetheme, restart, then disable, reload and uninstall the plugin while its entryis active.-- **Expected:** Only the declared variable rule changes after Apply; static+- **Expected:** The Extensions rail draws the destination's host icon token+ (`palette` / Lucide Palette), not a Skills book glyph and not plugin SVG.+ Only the declared variable rule changes after Apply; static`plugin-asset://` URLs remain valid; the value restores after restart; host-rendered cards retain the scenic backdrop behind their translucent content,have no opaque native rectangle, and leave Windows/Linux minimize/maximize@@ -6736,7 +6738,8 @@ identify the platform validation still needed.only, later refreshes dim the rows already on screen and announce therefresh, busy state is confined to the row with the in-flight request, andcounts are exposed to assistive technology. Empty states stay centered- inside the panel without a decorative frame and offer the page's primary+ inside the panel without a decorative frame, show a host Lucide icon in a+ chip wrapper (not a padded raw SVG), and offer the page's primaryaction, and no capability-specific color system is introduced.- Create, edit, and delete are available for all three capabilities withoutleaving Settings. New capabilities land at the level the filter points at,