From da785ee51fa0cefbef3c5a14e12cc902bbdf4cfb Mon Sep 17 00:00:00 2001 From: Khalid Abdi Date: Mon, 1 Jun 2026 19:04:50 +0300 Subject: [PATCH] Accept bare / command and remove page-level scrollbar - chat-panel.tsx: `/10293` now triggers a lookup, not just `/patient 10293` (regex accepts an optional `patient` keyword; matches digits only so `/help` etc. still fall through to the normal reply). - app/layout.tsx: make a fixed h-dvh, overflow-hidden shell so the page no longer shows its own scrollbar; each route's SidebarInset already scrolls internally (chat = overflow-hidden, settings = overflow-y-auto). Co-Authored-By: Claude Opus 4.8 --- frontend/app/layout.tsx | 2 +- frontend/components/chat/chat-panel.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx index 8f8a108..80c3c72 100644 --- a/frontend/app/layout.tsx +++ b/frontend/app/layout.tsx @@ -31,7 +31,7 @@ export default function RootLayout({ lang="en" className={cn("dark", "h-full", "antialiased", geistSans.variable, geistMono.variable, "font-sans", inter.variable)} > - {children} + {children} ); } diff --git a/frontend/components/chat/chat-panel.tsx b/frontend/components/chat/chat-panel.tsx index e947f17..8e13bb8 100644 --- a/frontend/components/chat/chat-panel.tsx +++ b/frontend/components/chat/chat-panel.tsx @@ -32,8 +32,8 @@ type ChatMessage = const HEADING = "Which patient would you like to look up?"; -// Strict trigger: only `/patient ` pulls up records. -const PATIENT_COMMAND = /^\/patient\s+(\S+)$/i; +// Trigger: `/patient 10293` or just `/10293` pulls up records. +const PATIENT_COMMAND = /^\/(?:patient\s+)?(\d+)$/i; export function ChatPanel() { const [messages, setMessages] = useState([]);