Skip to content

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

fix(composer): land narrow-toolbar follow-ups on current main

vastsa737435248ebd
diff --git a/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx b/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx
index 368b94da7..e803d1a06 100644
--- a/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx
+++ b/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx
@@ -106,7 +106,7 @@ export function ComposerModelPicker({
<span className="composer-model-thinking-level">{thinkingLabel}</span>
</>
) : null}
- <IconChevronDown size={12} aria-hidden="true" />
+ <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.css
index f037f3e35..920b57860 100644
--- a/apps/desktop/src/styles/composer-menus.css
+++ b/apps/desktop/src/styles/composer-menus.css
@@ -37,6 +37,8 @@
.composer-model-thinking {
position: relative;
+ min-width: 0;
+ flex: 0 1 auto;
}
/* Permission-mode chip menu (D115): anchored left above the mode chips. */
diff --git a/apps/desktop/src/styles/composer.css b/apps/desktop/src/styles/composer.css
index 2f61806b4..a6c1b2c05 100644
--- a/apps/desktop/src/styles/composer.css
+++ b/apps/desktop/src/styles/composer.css
@@ -366,7 +366,12 @@
display: flex;
align-items: center;
gap: 4px;
- flex: 0 0 auto;
+ min-width: 0;
+ flex: 0 1 auto;
+}
+
+.composer-right {
+ justify-content: flex-end;
}
.composer-right .context-inspector-trigger {
diff --git a/apps/desktop/src/styles/responsive.css b/apps/desktop/src/styles/responsive.css
index 08e7c65a6..83bccee2f 100644
--- a/apps/desktop/src/styles/responsive.css
+++ b/apps/desktop/src/styles/responsive.css
@@ -66,11 +66,12 @@
max-width: 32px;
flex: 0 0 32px;
justify-content: center;
- gap: 3px !important;
+ gap: 0 !important;
padding: 0 !important;
}
- .composer-model-thinking-model {
+ .composer-model-thinking-model,
+ .composer-model-thinking-chevron {
display: none;
}
diff --git a/apps/desktop/test/composer-responsive.test.mjs b/apps/desktop/test/composer-responsive.test.mjs
index a6455c038..cba86a0c6 100644
--- a/apps/desktop/test/composer-responsive.test.mjs
+++ b/apps/desktop/test/composer-responsive.test.mjs
@@ -35,12 +35,17 @@ test("narrow composer containers progressively simplify the model controls", ()
styles,
/@container composer-stack \(max-width: 450px\)[\s\S]*?\.composer-right \.composer-model-thinking-chip[\s\S]*?width:\s*32px;/,
);
- assert.match(styles, /\.composer-model-thinking-model\s*\{[\s\S]*?display:\s*none;/);
+ assert.match(
+ styles,
+ /\.composer-model-thinking-model,\s*\.composer-model-thinking-chevron\s*\{[\s\S]*?display:\s*none;/,
+ );
});
+
test("responsive rules preserve the semantic model trigger and action controls", () => {
assert.match(composerSource, /className=\{`icon-btn composer-model-thinking-chip/);
assert.match(composerSource, /ariaLabel=\{`\$\{t\("chat\.model"\)\}: \$\{modelLabel\}\./);
+ assert.match(composerSource, /className=\"composer-model-thinking-chevron\"/);
assert.match(composerSource, /ContextUsageInspector/);
assert.match(composerSource, /className=\{`icon-btn icon-btn-square composer-enhance-btn/);
assert.match(composerSource, /className="send-btn"/);
diff --git a/apps/desktop/test/sidebar-resize.test.mjs b/apps/desktop/test/sidebar-resize.test.mjs
index 3f5621e0b..624a8c5a9 100644
--- a/apps/desktop/test/sidebar-resize.test.mjs
+++ b/apps/desktop/test/sidebar-resize.test.mjs
@@ -48,7 +48,7 @@ test("sidebar hover does not paint a full-height resize rail", () => {
);
});
-test("the chat reserves one row for unsqueezed composer controls", () => {
+test("the chat reserves one row for shrinking composer controls", () => {
assert.match(
globalStyles,
/\.main-pane\s*\{[\s\S]*?min-width:\s*var\(--ds-main-pane-min-width, 450px\);/,
@@ -59,7 +59,11 @@ test("the chat reserves one row for unsqueezed composer controls", () => {
);
assert.match(
globalStyles,
- /\.composer-left,\s*\.composer-right\s*\{[\s\S]*?flex:\s*0 0 auto;/,
+ /\.composer-left,\s*\.composer-right\s*\{[\s\S]*?min-width:\s*0;[\s\S]*?flex:\s*0 1 auto;/,
+ );
+ assert.doesNotMatch(
+ globalStyles,
+ /\.composer-left,\s*\.composer-right\s*\{[^}]*flex:\s*0 0 auto;/,
);
assert.match(
globalStyles,
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 0c7724b4c..0a363489b 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -12266,10 +12266,10 @@ plugin-form fixtures in an isolated temporary directory at runtime.
- **Milestone**: Post-M6 desktop shell maintenance
- **Status**: Automated (`scripts/e2e-three-column-layout.mjs` via
`pnpm test:e2e:layout` — fixed-window width invariance, the 450px floor across
- a pointer drag, the unfolded composer row at that floor, sidebar
+ a pointer drag, one non-wrapping composer toolbar at that floor with the
+ model chip collapsed to its 32px icon, sidebar
yield/restore, the 460px reopen target, the panel action group's shared
control gap, preview mode, and ordinary Plugins/Pull requests/Scheduled titlebar
- geometry, light/dark rest/hover styles, and sidebar/New Task DOM actions).
Source contracts in `chrome-control-geometry.test.mjs` also cover the shared
disabled state and panel controls' transparent seat; the panel surface still
needs the eyes-on pass above. DOM/CDP checks establish renderer behavior, not