From 41ceaca413b923e2605d277993f75cc43a97d630 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 10 Sep 2026 01:41:53 +0200 Subject: [PATCH] fix: actually merge assistant and workspace into one interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mode switch was toggling the `hidden` attribute on elements that each carry their own `display:` rule. A class selector beats the UA stylesheet's [hidden]{display:none}, so every one of those toggles silently did nothing — which is why workspace mode still showed the chat, and why coming back never restored the saved-chat list. Every affected element was in that state. CSS now owns both modes from a single body class, in one block, and the JS does nothing but set that class. No element.hidden juggling remains. One accent. The assistant used --blue for user bubbles, focus rings, blockquotes and example pills while citations, cards and the mode switch used --purple, so the two halves read as two different apps. Purple was already dominant (23 uses to 6) and is the assistant's identity, so blue is gone entirely. Source cards pick up the same shape, shadow and hover accent as the workspace cards, and a targeted citation highlights in the accent instead of a bare border. Go back is removed from both the topbar and the rail: the Assistant/Workspace switch is how you leave now, and the dead handler went with it. Create image no longer takes a full-width gradient row competing with New chat; it is a square icon button beside it with a tooltip and an aria-label. Also guards the delegated document listeners against double registration. initIfNeeded already prevented a second bind in production, but nothing stopped a stray bindEvents() from double-firing every click — which is exactly what the test harness hit, activating a tab twice from one click. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01WjVc5oaAaYFNbZGLeJp6TX --- public/components/assistant.html | 8 +- public/css/assistant.css | 75 +++++++++++------ public/js/clinicalAssistant.js | 54 +++++------- test/assistant-workspace-layout.test.js | 105 +++++++++++++++++++----- 4 files changed, 157 insertions(+), 85 deletions(-) diff --git a/public/components/assistant.html b/public/components/assistant.html index ec14875c..87bbcdcf 100644 --- a/public/components/assistant.html +++ b/public/components/assistant.html @@ -1,5 +1,4 @@
-
@@ -19,9 +18,10 @@
- - - +
+ + +