Accept bare /<file#> 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 <body> 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 <noreply@anthropic.com>
This commit is contained in:
Khalid Abdi
2026-06-01 19:04:50 +03:00
parent 88a45cf19d
commit da785ee51f
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ export default function RootLayout({
lang="en"
className={cn("dark", "h-full", "antialiased", geistSans.variable, geistMono.variable, "font-sans", inter.variable)}
>
<body className="min-h-full flex flex-col">{children}</body>
<body className="h-dvh overflow-hidden flex flex-col">{children}</body>
</html>
);
}
+2 -2
View File
@@ -32,8 +32,8 @@ type ChatMessage =
const HEADING = "Which patient would you like to look up?";
// Strict trigger: only `/patient <fileNumber>` 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<ChatMessage[]>([]);