Trim sidebar to New chat/Patients/Settings; document project vision

- 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 <noreply@anthropic.com>
This commit is contained in:
Khalid Abdi
2026-06-01 21:34:00 +03:00
parent 750622e0db
commit a2654a87e1
2 changed files with 25 additions and 28 deletions
+18 -4
View File
@@ -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 <file#>` (or a bare `/<file#>`) 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 (nonai-elements) input matching a specific design.
+7 -24
View File
@@ -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: <Users className="size-4" />,
link: "#",
},
{
id: "conversations",
title: "Conversations",
icon: <MessageSquare className="size-4" />,
link: "#",
},
{
id: "saved",
title: "Saved",
icon: <Bookmark className="size-4" />,
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() {
<DashboardNavigation routes={dashboardRoutes} />
</SidebarContent>
<SidebarFooter className="px-2">
<TeamSwitcher teams={teams} />
{!isCollapsed && (
<div className="flex items-baseline gap-2 px-2 py-1.5">
<span className="font-semibold text-foreground">temetro</span>
<span className="text-xs text-muted-foreground">open source</span>
</div>
)}
</SidebarFooter>
</Sidebar>
);