Skip to content

Commit f7ae085

Browse files
committed
fix(ui): lift session menu to popover top layer and use shadow tokens
1 parent 92a8e96 commit f7ae085

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

‎ui/src/components/session-menu.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ class SessionMenu extends OpenClawLightDomElement {
7272
super.connectedCallback();
7373
document.addEventListener("pointerdown", this.handleDocumentPointerDown, true);
7474
document.addEventListener("keydown", this.handleDocumentKeydown, true);
75+
// Sidebar-hosted menus live inside the nav stacking context (z-index 10),
76+
// which paints below the sidebar resizer divider (z-index 20); promoting
77+
// the menu to the popover top layer keeps app chrome from bleeding
78+
// through it (same pattern as openclaw-native-link-menu).
79+
this.setAttribute("popover", "manual");
80+
if (typeof this.showPopover === "function") {
81+
try {
82+
this.showPopover();
83+
return;
84+
} catch {
85+
// Fall through to in-flow rendering when the top-layer API is unavailable.
86+
}
87+
}
88+
this.removeAttribute("popover");
7589
}
7690

7791
override disconnectedCallback() {

‎ui/src/styles/components.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3938,7 +3938,7 @@ td.data-table-key-col {
39383938
border: 1px solid color-mix(in srgb, var(--border-strong) 78%, transparent);
39393939
border-radius: var(--radius-lg);
39403940
background: var(--bg-elevated);
3941-
box-shadow: 0 18px 40px color-mix(in srgb, black 26%, transparent);
3941+
box-shadow: var(--shadow-lg);
39423942
}
39433943

39443944
.agent-select__option {

‎ui/src/styles/layout.css‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ html.openclaw-native-macos .shell-nav-expand {
13221322
border: 1px solid color-mix(in srgb, var(--border-strong) 78%, transparent);
13231323
border-radius: var(--radius-lg);
13241324
background: var(--bg-elevated);
1325-
box-shadow: 0 18px 40px color-mix(in srgb, black 26%, transparent);
1325+
box-shadow: var(--shadow-lg);
13261326
}
13271327

13281328
.sidebar-customize-menu__title {
@@ -1394,10 +1394,11 @@ html.openclaw-native-macos .shell-nav-expand {
13941394
border: 1px solid color-mix(in srgb, var(--border-strong) 78%, transparent);
13951395
border-radius: var(--radius-lg);
13961396
background: var(--bg-elevated);
1397-
box-shadow: 0 18px 40px color-mix(in srgb, black 26%, transparent);
1397+
box-shadow: var(--shadow-lg);
13981398
}
13991399

1400-
openclaw-native-link-menu[popover] {
1400+
openclaw-native-link-menu[popover],
1401+
openclaw-session-menu[popover] {
14011402
width: 0;
14021403
height: 0;
14031404
margin: 0;
@@ -1416,7 +1417,7 @@ openclaw-native-link-menu[popover] {
14161417
border: 1px solid color-mix(in srgb, var(--border-strong) 78%, transparent);
14171418
border-radius: var(--radius-lg);
14181419
background: var(--bg-elevated);
1419-
box-shadow: 0 18px 40px color-mix(in srgb, black 26%, transparent);
1420+
box-shadow: var(--shadow-lg);
14201421
}
14211422

14221423
.sidebar-session-sort-menu__title {

0 commit comments

Comments
 (0)