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(composer): drop the redundant chip glyph and unclip the level ladder
vastsac89f6610291b
diff --git a/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx b/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsxindex 8e7f8f1c9..05a89f815 100644--- a/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx+++ b/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx@@ -2,10 +2,7 @@ import type { TFunction } from "i18next";import type { ReactNode } from "react";import { ComposerModelList } from "./ComposerModelList";import { AnchoredMenu } from "../../../components/settings/AnchoredMenu";-import {- IconBot,- IconChevronDown,-} from "../../../components/icons";+import { IconBot, IconChevronDown } from "../../../components/icons";import { TooltipButton } from "../../../components/ui";import type { useComposerModelMenu } from "./hooks/useComposerModelMenu";import { ThinkingLevelSlider } from "./ThinkingLevelSlider";@@ -95,9 +92,7 @@ export function ComposerModelPicker({</span><span className="composer-model-thinking-model">{modelLabel}</span>{thinkingLevel !== "off" ? (- <>- <span className="composer-model-thinking-level">{thinkingLabel}</span>- </>+ <span className="composer-model-thinking-level">{thinkingLabel}</span>) : null}<IconChevronDown size={12} aria-hidden="true" className="composer-model-thinking-chevron" /></TooltipButton>diff --git a/apps/desktop/src/styles/composer-menus.css b/apps/desktop/src/styles/composer-menus.cssindex 451a190f2..150670417 100644--- a/apps/desktop/src/styles/composer-menus.css+++ b/apps/desktop/src/styles/composer-menus.css@@ -104,10 +104,10 @@.composer-model-thinking-menu {z-index: 60;/*- One label per row plus two capability icons: wide enough for that and no- wider, so the panel stays a menu rather than a second window.+ Wide enough for a full model row plus six reasoning stops under the slider;+ narrower values ellipsized the "medium" label into "medi…".*/- width: min(280px, calc(100vw - 24px));+ width: min(320px, calc(100vw - 24px));}.composer-model-thinking-menu.is-open {@@ -116,14 +116,13 @@}.composer-model-thinking-chip {- max-width: min(280px, calc(100vw - 24px));+ max-width: min(320px, calc(100vw - 24px));min-width: 0;/*- Two tokens, one line: the model name carries the row and the reasoning- level reads as a quiet badge. The glyph stays neutral so the name is the- only element asking for attention.+ One quiet label, one badge, one caret. The model name is the only element+ asking for attention; the reasoning level rides along as metadata.*/- padding: 0 7px 0 8px !important;+ padding: 0 6px 0 10px !important;gap: 6px !important;border-radius: var(--radius-full) !important;color: var(--ds-text-secondary) !important;@@ -146,20 +145,18 @@transform: none;}+/*+ The glyph belongs to the collapsed form only. At the 450px floor the chip+ drops its labels and keeps this icon as the trigger; at full width the model+ name already says what the control is, so the icon only added noise.+*/.composer-model-thinking-icon {- display: inline-flex;+ display: none;flex: 0 0 auto;align-items: center;justify-content: center;color: var(--ds-text-muted);- transition: color var(--motion-duration-fast) var(--motion-ease-out);-}--.composer-model-thinking-chip:hover .composer-model-thinking-icon,-.composer-model-thinking-chip.active .composer-model-thinking-icon {- color: var(--ds-text-secondary);}-.composer-model-thinking-model,.composer-model-thinking-level {min-width: 0;@@ -181,10 +178,10 @@.composer-model-thinking-level {flex: 0 0 auto;display: inline-block;- max-width: 88px;+ max-width: 96px;padding: 1px 6px;border-radius: var(--radius-full);- background: var(--ds-tile);+ background: var(--ds-bg-chip);color: var(--ds-text-secondary);font-size: var(--text-2xs);line-height: var(--leading-compact);@@ -192,7 +189,7 @@.composer-model-thinking-chevron {flex: 0 0 auto;- color: var(--ds-text-muted);+ color: var(--ds-text-faint);transition: color var(--motion-duration-fast) var(--motion-ease-out);}diff --git a/apps/desktop/src/styles/responsive.css b/apps/desktop/src/styles/responsive.cssindex be027b189..bc2ff2c7d 100644--- a/apps/desktop/src/styles/responsive.css+++ b/apps/desktop/src/styles/responsive.css@@ -65,6 +65,11 @@padding: 0 !important;}+ /* Collapsed to a glyph: the labels are gone, so the icon carries the trigger. */+ .composer-model-thinking-icon {+ display: inline-flex;+ }+.composer-model-thinking-model,.composer-model-thinking-chevron {display: none;diff --git a/apps/desktop/test/composer-model-thinking-menu.test.mjs b/apps/desktop/test/composer-model-thinking-menu.test.mjsindex d4bb602cd..3806f9bab 100644--- a/apps/desktop/test/composer-model-thinking-menu.test.mjs+++ b/apps/desktop/test/composer-model-thinking-menu.test.mjs@@ -104,9 +104,10 @@ test("the combined chip and menu meet the compact accessible visual contract", (assert.match(composerSource, /event\.key === "Escape"/);assert.match(stylesSource, /\.composer-model-thinking-menu\s*\{[\s\S]*?position:\s*fixed;/);assert.match(stylesSource, /\.composer-model-thinking-menu\s*\{[\s\S]*?top:\s*0;/);- assert.match(stylesSource, /\.composer-model-thinking-menu\s*\{[\s\S]*?width:\s*min\(280px,\s*calc\(100vw - 24px\)\)/);- assert.match(composerSource, /className="composer-model-thinking-icon"[\s\S]*?<IconBot size=\{14\} \/>/);- assert.doesNotMatch(stylesSource, /\.composer-model-thinking-icon\.is-off/);+ assert.match(stylesSource, /\.composer-model-thinking-menu\s*\{[\s\S]*?width:\s*min\(320px,\s*calc\(100vw - 24px\)\)/);+ // The glyph is the collapsed-only form of the trigger: at full width the+ // model name already identifies the control.+ assert.match(stylesSource, /\.composer-model-thinking-icon\s*\{[\s\S]*?display:\s*none;/);assert.match(stylesSource, /@media \(prefers-reduced-motion: reduce\)/);});diff --git a/apps/desktop/test/composer-responsive.test.mjs b/apps/desktop/test/composer-responsive.test.mjsindex 117f3c61a..a679a877e 100644--- a/apps/desktop/test/composer-responsive.test.mjs+++ b/apps/desktop/test/composer-responsive.test.mjs@@ -39,6 +39,11 @@ test("narrow composer containers progressively simplify the model controls", ()styles,/\.composer-model-thinking-model,\s*\.composer-model-thinking-chevron\s*\{[\s\S]*?display:\s*none;/,);+ // The collapsed chip keeps a glyph: the labels it drops are what name it.+ assert.match(+ styles,+ /@container composer-stack \(max-width: 450px\)[\s\S]*?\.composer-model-thinking-icon\s*\{[\s\S]*?display:\s*inline-flex;/,+ );});diff --git a/apps/desktop/test/thinking-ui.test.mjs b/apps/desktop/test/thinking-ui.test.mjsindex c65170c58..eed489502 100644--- a/apps/desktop/test/thinking-ui.test.mjs+++ b/apps/desktop/test/thinking-ui.test.mjs@@ -81,7 +81,7 @@ test("composer exposes the runtime thinking level order and provider filtering",assert.doesNotMatch(stylesSource, /\.composer-thinking-level\b/);assert.match(stylesSource,- /\.composer-model-thinking-menu\s*\{[\s\S]*?width:\s*min\(280px,\s*calc\(100vw - 24px\)\);/+ /\.composer-model-thinking-menu\s*\{[\s\S]*?width:\s*min\(320px,\s*calc\(100vw - 24px\)\);/);assert.match(composerSource, /availableThinkingLevels/);assert.match(composerSource, /thinkingMenuLevels/);