Skip to content

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

fix(desktop): keep launcher rows at 40px when the list scrolls

yu.xia1a05c804fae6
diff --git a/apps/desktop/src/styles/work-panel.css b/apps/desktop/src/styles/work-panel.css
index 199ae5065..47ba453e6 100644
--- a/apps/desktop/src/styles/work-panel.css
+++ b/apps/desktop/src/styles/work-panel.css
@@ -529,6 +529,9 @@
display: flex;
min-width: 0;
height: 40px;
+ /* Rows are flex items of the scrollable list: keep them at their full 40px
+ so a constrained list scrolls instead of compressing the click targets. */
+ flex-shrink: 0;
align-items: center;
gap: 10px;
padding: 0 10px;
diff --git a/apps/desktop/test/work-panel.test.mjs b/apps/desktop/test/work-panel.test.mjs
index 03ac12e43..5a1cd03ca 100644
--- a/apps/desktop/test/work-panel.test.mjs
+++ b/apps/desktop/test/work-panel.test.mjs
@@ -642,6 +642,10 @@ test("the launcher tool list scrolls when it outgrows the panel body", () => {
const list = globalStyles.match(/\.work-panel-launcher-list \{[^}]*\}/)?.[0] ?? "";
assert.match(list, /min-height: 0/);
assert.match(list, /overflow-y: auto/);
+ // Rows are flex items of that list: without flex-shrink: 0 a constrained
+ // list first compresses them below their 40px height instead of scrolling.
+ const row = globalStyles.match(/\.work-panel-launcher-row \{[^}]*\}/)?.[0] ?? "";
+ assert.match(row, /flex-shrink: 0/);
// The title stays pinned; only the rows scroll.
const title = globalStyles.match(/\.work-panel-launcher-title \{[^}]*\}/)?.[0] ?? "";
assert.doesNotMatch(title, /overflow-y/);