diff --git a/ui/src/e2e/chat-flow.e2e.test.ts b/ui/src/e2e/chat-flow.e2e.test.ts index b327ba8d58c9..3fa6b0b57fd9 100644 --- a/ui/src/e2e/chat-flow.e2e.test.ts +++ b/ui/src/e2e/chat-flow.e2e.test.ts @@ -482,6 +482,12 @@ describeControlUiE2e("Control UI mocked Gateway E2E", () => { expect(await gateway.getRequests("sessions.files.list")).toHaveLength(0); expect(await page.locator(".chat-workspace-rail__file").count()).toBe(0); expect(await page.locator(".chat-workspace-rail__collapsed-icon svg").count()).toBe(1); + // The rail docks flush to the window edge in both states (no content gutter). + const railEdgeGap = () => + page.locator(".chat-workspace-rail").evaluate((element) => { + return window.innerWidth - element.getBoundingClientRect().right; + }); + expect(await railEdgeGap()).toBe(0); await page.getByRole("button", { name: "Expand session workspace" }).click(); await page.getByRole("button", { name: "Collapse session workspace" }).waitFor({ @@ -495,6 +501,7 @@ describeControlUiE2e("Control UI mocked Gateway E2E", () => { }); expect(await gateway.getRequests("sessions.files.list")).toHaveLength(1); expect(await gateway.getRequests("artifacts.list")).toHaveLength(1); + expect(await railEdgeGap()).toBe(0); await page.getByRole("button", { name: "Collapse session workspace" }).click(); await page.getByRole("button", { name: "Expand session workspace" }).waitFor({ diff --git a/ui/src/styles/chat/sidebar.css b/ui/src/styles/chat/sidebar.css index dff9167130a1..db6c57c05fca 100644 --- a/ui/src/styles/chat/sidebar.css +++ b/ui/src/styles/chat/sidebar.css @@ -9,7 +9,24 @@ } .chat-workbench--workspace-collapsed { - grid-template-columns: minmax(0, 1fr) 52px; + /* Collapsed rail is a slim always-visible icon strip (Cursor-style); it + stays in layout so it never overlays or floats over chat content. */ + grid-template-columns: minmax(0, 1fr) 44px; +} + +/* The workspace rail docks flush to the window edge like the terminal panel: + drop the chat content's right gutter and square the card's right corners in + both rail states. Guarded to viewports where the rail actually renders + (it is display:none <=1120px, where the gutter should stay). */ +@media (min-width: 1121px) { + .content--chat:has(.chat-workbench) { + padding-right: 0; + } + + .content--chat:has(.chat-workbench) .chat { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } } .chat-split-container { @@ -54,7 +71,7 @@ .chat-workspace-rail--collapsed { align-items: center; gap: 10px; - padding: 12px 8px; + padding: 12px 6px; } .chat-workspace-rail__header {