From 855e8ceb3b0a988ecfebbb6421c891fec08e2fbd Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sat, 14 Nov 2026 11:18:22 +1100 Subject: [PATCH] fix(ui): the minimised chat composer docks at the bottom of the screen --- ui/src/chat/ChatDock.vue | 2 +- ui/src/chat/ChatDockLayout.ts | 10 +++++----- ui/test/chat-dock-float.test.ts | 11 +++++------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ui/src/chat/ChatDock.vue b/ui/src/chat/ChatDock.vue index 9bd4df6c0..cebca1b97 100644 --- a/ui/src/chat/ChatDock.vue +++ b/ui/src/chat/ChatDock.vue @@ -143,7 +143,7 @@ const wrapStyle = computed | undefined>((): Record { +// Guards the minimised composer floating mid-page under where the window was. +test("the minimised bar docks at the bottom of the screen on the pinned side", () => { const rect = { x: 300, y: 100, w: 440, h: 560 }; - assert.deepEqual(barPlacement(rect, "float", VW, VH), { x: 300, bottom: 800 - 660, w: 440 }); - assert.deepEqual(barPlacement(rect, "left", VW, VH), { x: 0, bottom: 800 - 660, w: 440 }); - assert.deepEqual(barPlacement(rect, "right", VW, VH), { x: 1280 - 440, bottom: 800 - 660, w: 440 }); - // A window dragged to the bottom keeps the bar fully on screen. - assert.deepEqual(barPlacement({ x: 10, y: 700, w: 440, h: 560 }, "float", VW, VH), { x: 10, bottom: 8, w: 440 }); + assert.deepEqual(barPlacement(rect, "float", VW), { x: 300, bottom: 8, w: 440 }); + assert.deepEqual(barPlacement(rect, "left", VW), { x: 0, bottom: 8, w: 440 }); + assert.deepEqual(barPlacement(rect, "right", VW), { x: 1280 - 440, bottom: 8, w: 440 }); }); test("the old edge-pin preference migrates into the new key and is removed", () => {