From e6e1958fc5752c97ed7e21ec831a3765ea1c9301 Mon Sep 17 00:00:00 2001 From: TyperBody Date: Fri, 25 Sep 2026 13:22:18 +0800 Subject: [PATCH] fix(web): let the docked assistant button collapse again `shouldCollapseRail` was keyed on `!railExpanded`, mirroring the expand helper instead of negating it. Once a hover revealed the button it could never collapse back into the rail, so the collapse looked broken after the first restore. Key the predicate on `railExpanded` being true, restore the mirror relationship with `shouldExpandRail`, and add regression coverage for the expand -> leave -> collapse round trip. Also lengthen the rail strip. --- .../home/components/WorkspaceAssistant.tsx | 2 +- web/src/app/home/components/assistant-dock.ts | 21 +++++++++++----- web/tests/unit/assistant-dock-rail.test.mjs | 25 ++++++++++++++++--- 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/web/src/app/home/components/WorkspaceAssistant.tsx b/web/src/app/home/components/WorkspaceAssistant.tsx index 4651f9f73..5a3d45452 100644 --- a/web/src/app/home/components/WorkspaceAssistant.tsx +++ b/web/src/app/home/components/WorkspaceAssistant.tsx @@ -505,7 +505,7 @@ function AssistantPanel({ storageKey }: { storageKey: string }) {