Skip to content

Commit 98d1397

Browse files
authored
fix(ui): keep chat sidebar opening transparent (#121464)
Keep transient sidebar columns transparent while preserving explicit panel and discussion surfaces.\n\nFixes #121462. Related to #113712 and #121435.
1 parent 35e8798 commit 98d1397

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

‎ui/src/pages/chat/chat-responsive.browser.test.ts‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,6 +2288,35 @@ describeBrowserLayout.concurrent("chat responsive browser layout", () => {
22882288
},
22892289
);
22902290

2291+
it("keeps newly opened sidebar columns transparent while panel owners retain their surface", async () => {
2292+
const page = await openBrowserPage(1_000, 700);
2293+
try {
2294+
await page.setContent(
2295+
`<!doctype html><html><head><style>${readUiCss()}</style></head><body>
2296+
<div class="sidebar-region" style="--panel: rgb(12, 34, 56)">
2297+
<main class="sidebar-region__primary">Primary chat</main>
2298+
</div>
2299+
</body></html>`,
2300+
);
2301+
2302+
const backgrounds = await page.evaluate(() => {
2303+
const column = document.createElement("section");
2304+
column.className = "sidebar-column";
2305+
column.innerHTML = '<div class="sidebar-panel">Owned panel surface</div>';
2306+
document.querySelector(".sidebar-region")?.append(column);
2307+
return {
2308+
column: getComputedStyle(column).backgroundColor,
2309+
panel: getComputedStyle(column.firstElementChild!).backgroundColor,
2310+
};
2311+
});
2312+
2313+
expect(backgrounds.column).toBe("rgba(0, 0, 0, 0)");
2314+
expect(backgrounds.panel).toBe("rgb(12, 34, 56)");
2315+
} finally {
2316+
await closeBrowserPage(page);
2317+
}
2318+
});
2319+
22912320
it("collapses sidebar columns into one tabbed column below the pane breakpoint", async () => {
22922321
const page = await openBrowserPage(900, 700);
22932322
try {

‎ui/src/styles/chat/sidebar.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ openclaw-chat-sidebar-region,
225225
min-width: 260px;
226226
min-height: 0;
227227
overflow: hidden;
228-
background: var(--panel);
228+
background: transparent;
229229
flex-direction: column;
230230
animation: chat-sidebar-fade-in 160ms ease-out;
231231
}

0 commit comments

Comments
 (0)