Skip to content

Commit 7c42511

Browse files
fix(ui): ensure actions override state spacing
1 parent b8b727f commit 7c42511

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

‎ui/src/e2e/session-management.trailing-state.e2e.test.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,12 @@ suite.define(() => {
261261
.toBe(true);
262262
await expect.poll(() => state.locator(".session-run-spinner").isVisible()).toBe(true);
263263
await expect.poll(() => state.locator(".session-unread-dot").isVisible()).toBe(true);
264+
const link = row.locator(".sidebar-recent-session__link");
264265
const pin = row.getByRole("button", { name: "Pin thread" });
265266
const menu = row.getByRole("button", { name: "Open thread menu" });
267+
await expect
268+
.poll(() => link.evaluate((element) => getComputedStyle(element).paddingRight))
269+
.toBe("68px");
266270

267271
const [restingNameBounds, restingStateBounds, restingPinBounds, restingMenuBounds] =
268272
await Promise.all([
@@ -286,6 +290,9 @@ suite.define(() => {
286290
await expect.poll(() => actionOpacity(state)).toBe("0");
287291
await expect.poll(() => actionOpacity(pin)).toBe("1");
288292
await expect.poll(() => actionOpacity(menu)).toBe("1");
293+
await expect
294+
.poll(() => link.evaluate((element) => getComputedStyle(element).paddingRight))
295+
.toBe("52px");
289296

290297
const [nameBounds, pinBounds, menuBounds] = await Promise.all([
291298
row.locator(".sidebar-recent-session__name").boundingBox(),
@@ -303,6 +310,9 @@ suite.define(() => {
303310
await expect.poll(() => actionOpacity(state)).toBe("0");
304311
await expect.poll(() => actionOpacity(pin)).toBe("1");
305312
await expect.poll(() => actionOpacity(menu)).toBe("1");
313+
await expect
314+
.poll(() => link.evaluate((element) => getComputedStyle(element).paddingRight))
315+
.toBe("52px");
306316

307317
const [focusedNameBounds, focusedPinBounds, focusedMenuBounds] = await Promise.all([
308318
row.locator(".sidebar-recent-session__name").boundingBox(),

‎ui/src/styles/layout.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,8 +2182,8 @@ html.openclaw-native-macos
21822182

21832183
/* Resting semantic state remains visible, so reserve its overlay slot before
21842184
the title. Action-only rows still get the full resting width. */
2185-
.sidebar-recent-session:not(.sidebar-recent-session--child):has(
2186-
> .sidebar-recent-session__aside > .session-row-state
2185+
.sidebar-recent-session:not(.sidebar-recent-session--child):where(
2186+
:has(> .sidebar-recent-session__aside > .session-row-state)
21872187
)
21882188
> .sidebar-recent-session__link {
21892189
padding-right: 68px;

0 commit comments

Comments
 (0)