fix(ui): chat workspace panel leaves an empty gap when collapsed (#100088)

* fix(ui): remove reserved gap when chat workspace rail is collapsed

* fix(ui): remove reserved gap when chat workspace rail is collapsed
This commit is contained in:
Peter Steinberger
2026-07-04 22:53:27 -04:00
committed by GitHub
parent b34c188f8f
commit 194d85e891
2 changed files with 26 additions and 2 deletions

View File

@@ -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({

View File

@@ -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 {