Skip to content

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

fix(plan): preserve the compact send icon size

Linuxdazhao84a7cc384682
diff --git a/apps/desktop/src/styles/composer.css b/apps/desktop/src/styles/composer.css
index 80825ff5d..7adae71c0 100644
--- a/apps/desktop/src/styles/composer.css
+++ b/apps/desktop/src/styles/composer.css
@@ -454,7 +454,7 @@
min-height: 28px;
}
-.composer-plan-revision {
+.btn.composer-plan-revision {
height: 28px;
flex: 0 0 auto;
padding: 0 10px;
@@ -463,10 +463,11 @@
.composer-plan-revision svg {
display: none;
+ flex: none;
}
@container composer-stack (max-width: 640px) {
- .composer-plan-revision {
+ .btn.composer-plan-revision {
width: 28px;
padding: 0;
}
diff --git a/scripts/e2e-plan-ui.mjs b/scripts/e2e-plan-ui.mjs
index 57d281bb5..f06a0e43b 100644
--- a/scripts/e2e-plan-ui.mjs
+++ b/scripts/e2e-plan-ui.mjs
@@ -1516,10 +1516,11 @@ async function assertRevisionToolbarFits(state) {
.sort((a, b) => a.left - b.left);
const range = document.createRange();
range.selectNodeContents(button.querySelector("span"));
+ const icon = button.querySelector("svg").getBoundingClientRect();
return {
width, actual: stack.getBoundingClientRect().width, label: button.getAttribute("aria-label"),
height: button.getBoundingClientRect().height, lines: range.getClientRects().length,
- icon: button.querySelector("svg").getBoundingClientRect().width > 0,
+ iconWidth: icon.width, iconHeight: icon.height,
crowded: controls.filter((box, i) => box.left < row.left - 1 || box.right > row.right + 1 ||
(i && box.left < controls[i - 1].right - 1)).map(box => box.name),
};
@@ -1529,7 +1530,9 @@ async function assertRevisionToolbarFits(state) {
}
})()`);
for (const sample of samples) {
- const labelFits = sample.width <= 640 ? sample.icon && sample.lines === 0 : !sample.icon && sample.lines === 1;
+ const labelFits = sample.width <= 640
+ ? sample.iconWidth >= 14 && sample.iconWidth === sample.iconHeight && sample.lines === 0
+ : sample.iconWidth === 0 && sample.lines === 1;
assert(sample.label === "Enviar pedido de alteração" && sample.actual === sample.width &&
sample.height === 28 && labelFits && !sample.crowded.length,
`revision toolbar at ${sample.width}px: ${jsonText(samples)}`);