From a2654a87e17f3b72f0063644a398329f54547d3e Mon Sep 17 00:00:00 2001 From: Khalid Abdi Date: Mon, 1 Jun 2026 21:34:00 +0300 Subject: [PATCH] Trim sidebar to New chat/Patients/Settings; document project vision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - app-sidebar: remove the "Saved" and "Conversations" nav items (dead # links) and the "temetro / Clinic" team switcher; footer is now a plain "temetro · open source" wordmark. Keep the notifications bell. Drop the now-unused Bookmark/MessageSquare/Logo/TeamSwitcher imports. - CLAUDE.md (frontend): rewrite "What this is" to match the current patient-records flow (/patient cards, sparklines, create/edit dialog over the mock fixture) and point to the project vision; note team-switcher.tsx is unused. Co-Authored-By: Claude Opus 4.8 --- frontend/CLAUDE.md | 22 ++++++++++--- .../components/sidebar-02/app-sidebar.tsx | 31 +++++-------------- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/frontend/CLAUDE.md b/frontend/CLAUDE.md index b3529c9..2253d43 100644 --- a/frontend/CLAUDE.md +++ b/frontend/CLAUDE.md @@ -10,9 +10,22 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## What this is -`temetro` — an open-source AI chat that lets clinicians retrieve patient information in natural -language. The product surface is currently **UI-only**: the chat appends a mock assistant reply -(`components/chat/chat-panel.tsx`); there is no backend, model call, or patient data yet. +`temetro` — an **open-source** clinical "AI middleman" (see the project vision in the root +`../CLAUDE.md`). This app is the clinician-facing chat UI. It is **UI-only** — no backend, no real +model call — but it now drives a working patient-records flow over a **mock fixture** +(`lib/patients.ts`, in-memory, session-only): + +- The chat parses `/patient ` (or a bare `/`) in `components/chat/chat-panel.tsx` and + renders the record as a horizontal row of cards (`components/chat/patient-cards.tsx`), with small + dependency-free trend sparklines (`components/chat/sparkline.tsx`). Each card opens a detail + dialog; the Summary card has an **Edit record** button. +- Patients can be **created and edited** via the shared `components/chat/patient-form-dialog.tsx` + (mode `create` | `edit`). The "Add patient" pill in `chat-input.tsx` opens it; saving writes to the + fixture (`addPatient`) and opens/updates the record in the chat. +- Non-command messages still get a mock assistant reply. + +The signing / patient-owned-storage / approval features described in the root vision are **not built +yet** — the fixture is the swap point for a future API. ## Commands @@ -45,7 +58,8 @@ trailer. See the root `../CLAUDE.md` for the project-wide per-folder commit poli `ChatStatus`, `FileUIPart`). Note: `@ai-sdk/react` (`useChat`) is **not installed** — chat state is managed with local React state. - **`components/sidebar-02/`** — the dashboard sidebar (`SidebarProvider` / `Sidebar` / - `SidebarInset` from `components/ui/sidebar.tsx`). `app-sidebar.tsx` holds the nav/teams config. + `SidebarInset` from `components/ui/sidebar.tsx`). `app-sidebar.tsx` holds the nav config (New chat + · Patients · Settings) + notifications; `team-switcher.tsx` exists but is no longer used. - **`components/chat/`** — the product chat UI. `chat-panel.tsx` owns message state + empty/active layouts; `chat-input.tsx` is a bespoke (non–ai-elements) input matching a specific design. diff --git a/frontend/components/sidebar-02/app-sidebar.tsx b/frontend/components/sidebar-02/app-sidebar.tsx index c29a81f..4291b66 100644 --- a/frontend/components/sidebar-02/app-sidebar.tsx +++ b/frontend/components/sidebar-02/app-sidebar.tsx @@ -10,19 +10,11 @@ import { } from "@/components/ui/sidebar"; import { cn } from "@/lib/utils"; import { motion } from "framer-motion"; -import { - Bookmark, - MessageSquare, - Plus, - Settings, - Users, -} from "lucide-react"; +import { Plus, Settings, Users } from "lucide-react"; import Image from "next/image"; -import { Logo } from "@/components/sidebar-02/logo"; import type { Route } from "./nav-main"; import DashboardNavigation from "@/components/sidebar-02/nav-main"; import { NotificationsPopover } from "@/components/sidebar-02/nav-notifications"; -import { TeamSwitcher } from "@/components/sidebar-02/team-switcher"; const sampleNotifications = [ { @@ -61,18 +53,6 @@ const dashboardRoutes: Route[] = [ icon: , link: "#", }, - { - id: "conversations", - title: "Conversations", - icon: , - link: "#", - }, - { - id: "saved", - title: "Saved", - icon: , - link: "#", - }, { id: "settings", title: "Settings", @@ -81,8 +61,6 @@ const dashboardRoutes: Route[] = [ }, ]; -const teams = [{ id: "1", name: "temetro", logo: Logo, plan: "Clinic" }]; - export function DashboardSidebar() { const { state } = useSidebar(); const isCollapsed = state === "collapsed"; @@ -131,7 +109,12 @@ export function DashboardSidebar() { - + {!isCollapsed && ( +
+ temetro + open source +
+ )}
);