Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
feat(plugin-launcher): one 48px rounded tile per item and a wider panel
v_wyxgwang70b891bf4201
diff --git a/apps/desktop/electron/main/plugin-launcher-state.ts b/apps/desktop/electron/main/plugin-launcher-state.tsindex 336b1b6fb..85e09ca51 100644--- a/apps/desktop/electron/main/plugin-launcher-state.ts+++ b/apps/desktop/electron/main/plugin-launcher-state.ts@@ -15,11 +15,12 @@ import { join } from "node:path";export const PLUGIN_LAUNCHER_STATE_FILE = "plugin-launcher-state.json";/**- * The launcher must fit eight columns without squeezing: below this width the- * grid drops to six columns, which is the one thing the user cannot undo by- * dragging.+ * The launcher opens wide enough for a 48px icon and a readable name in every+ * one of its eight columns. Below this floor a tile is about 90px wide and the+ * longest names start losing characters, so the window refuses to go narrower+ * rather than let the grid squeeze.*/-export const PLUGIN_LAUNCHER_MIN_WIDTH = 560;+export const PLUGIN_LAUNCHER_MIN_WIDTH = 800;/*** Height is not a user preference any more: the renderer measures what it* renders and asks for exactly that height through@@ -30,7 +31,7 @@ export const PLUGIN_LAUNCHER_MIN_CONTENT_HEIGHT = 120;/** Wider than this the eight tiles stop being scannable. */export const PLUGIN_LAUNCHER_MAX_WIDTH = 1280;export const PLUGIN_LAUNCHER_MAX_HEIGHT = 940;-export const PLUGIN_LAUNCHER_DEFAULT_WIDTH = 760;+export const PLUGIN_LAUNCHER_DEFAULT_WIDTH = 900;/** Initial height before the panel has measured itself. */export const PLUGIN_LAUNCHER_DEFAULT_HEIGHT = 440;diff --git a/apps/desktop/src/components/launcher/LauncherTileButton.tsx b/apps/desktop/src/components/launcher/LauncherTileButton.tsxindex 2afaa2d23..f7f33d0cf 100644--- a/apps/desktop/src/components/launcher/LauncherTileButton.tsx+++ b/apps/desktop/src/components/launcher/LauncherTileButton.tsx@@ -4,13 +4,13 @@ import type { LauncherTile } from "../../lib/launcher-search";import { IconPin } from "../icons";/**- * One grid cell: icon, type badge, and name — plus its own pin toggle.+ * One grid cell: a rounded-square icon and the name, plus its own pin toggle.*- * Every cell has the same three parts so the eight-column grid stays aligned:- * the icon shape (square plugin, round application) and the small type badge- * carry the source, and the name replaces the old second text line, which used- * to explain why the item matched. A long name is ellipsized instead of- * wrapping, which would break the row rhythm.+ * Every source renders the same shape at the same size, so the grid reads as+ * one set of tools and the whole line below the icon belongs to the name. The+ * source still appears in the hover title for anyone who needs it, but it no+ * longer costs a corner of the icon or a word of the name. A long name is+ * ellipsized instead of wrapping, which would break the row rhythm.** The pin sits in the corner and is only visible while the cell is hovered,* active or focused; an already pinned cell keeps it visible and filled.@@ -71,10 +71,7 @@ export function LauncherTileButton({title={title}onClick={onOpen}>- <span- className={`plugin-launcher-icon plugin-launcher-icon-${tile.kind}`}- aria-hidden- >+ <span className="plugin-launcher-icon" aria-hidden>{showIcon ? (<imgsrc={tile.iconDataUrl}@@ -86,10 +83,7 @@ export function LauncherTileButton({<span className="plugin-launcher-monogram">{tile.monogram}</span>)}</span>- <span className="plugin-launcher-tile-line">- <span className="plugin-launcher-tile-name">{tile.name}</span>- <span className="plugin-launcher-tile-type">{typeLabel}</span>- </span>+ <span className="plugin-launcher-tile-name">{tile.name}</span></button><buttontype="button"diff --git a/apps/desktop/src/styles/plugin-launcher.css b/apps/desktop/src/styles/plugin-launcher.cssindex d25c2d872..d994b8d00 100644--- a/apps/desktop/src/styles/plugin-launcher.css+++ b/apps/desktop/src/styles/plugin-launcher.css@@ -188,73 +188,50 @@ html[data-surface="plugin-launcher"] #root {}/*- * Shape is the fastest source signal: plugins are square, applications are- * round. The type badge beside the name repeats it in words.+ * Every tile carries the same rounded square. Plugin panels and installed+ * applications used to differ by shape and by a word beside the name; the grid+ * now reads as one set of tools, and the whole line below the icon belongs to+ * the name. The icon grew to 48px so it can carry the identity on its own.*/.plugin-launcher-icon {- width: 34px;- height: 34px;- flex: 0 0 34px;+ width: 48px;+ height: 48px;+ flex: 0 0 48px;display: grid;place-items: center;overflow: hidden;+ border-radius: var(--radius-lg);background: var(--ds-tile-deep);color: var(--ds-text-primary);}-.plugin-launcher-icon-plugin {- border-radius: var(--radius-sm);-}--.plugin-launcher-icon-app {- border-radius: var(--radius-full);-}-.plugin-launcher-icon img {- width: 26px;- height: 26px;+ width: 34px;+ height: 34px;object-fit: contain;- /** Native icons are already round or square; never stretch them. */+ /** A platform icon is already an icon; never stretch it. */pointer-events: none;}.plugin-launcher-monogram {- font-size: var(--text-sm-plus);+ font-size: var(--text-xl);font-weight: var(--font-weight-semibold);line-height: var(--leading-tighter);}-/* Name and type badge share one line; the name is the part that truncates. */-.plugin-launcher-tile-line {- width: 100%;- min-width: 0;- display: flex;- align-items: baseline;- justify-content: center;- gap: 4px;- overflow: hidden;-}-.plugin-launcher-tile-name {+ width: 100%;min-width: 0;overflow: hidden;color: inherit;font-size: var(--text-xs);font-weight: var(--font-weight-medium-plus);line-height: var(--leading-compact);+ text-align: center;text-overflow: ellipsis;white-space: nowrap;}-.plugin-launcher-tile-type {- flex: 0 0 auto;- color: var(--ds-text-faint);- font-size: var(--text-2xs, 10px);- font-weight: var(--font-weight-normal);- line-height: var(--leading-compact);- white-space: nowrap;-}-/* The pin is quiet until the cell is under the pointer or focus. */.plugin-launcher-pin {position: absolute;diff --git a/apps/desktop/test/plugin-launcher-window.test.mjs b/apps/desktop/test/plugin-launcher-window.test.mjsindex 604e3077a..f19b1b0e6 100644--- a/apps/desktop/test/plugin-launcher-window.test.mjs+++ b/apps/desktop/test/plugin-launcher-window.test.mjs@@ -78,13 +78,16 @@ test("launcher renderer supports keyboard selection and has no window controls",assert.match(styles, /html\[data-surface="plugin-launcher"\][\s\S]*background: transparent/);});-test("the launcher grid is eight fixed columns with square plugins and round apps", () => {+test("the launcher grid is eight fixed columns with one tile shape", () => {assert.match(styles,/\.plugin-launcher-grid \{[\s\S]*grid-template-columns: repeat\(8, minmax\(0, 1fr\)\)/,);- assert.match(styles, /\.plugin-launcher-icon-plugin \{[\s\S]*border-radius: var\(--radius-sm\)/);- assert.match(styles, /\.plugin-launcher-icon-app \{[\s\S]*border-radius: var\(--radius-full\)/);+ // One shape for every source: no per-kind icon rule and no type badge.+ assert.match(styles, /\.plugin-launcher-icon \{[\s\S]*width: 48px/);+ assert.match(styles, /\.plugin-launcher-icon \{[\s\S]*border-radius: var\(--radius-lg\)/);+ assert.doesNotMatch(styles, /plugin-launcher-icon-(plugin|app)/);+ assert.doesNotMatch(styles, /plugin-launcher-tile-type/);});test("the launcher window is resizable and remembers its size", () => {