From 3469f208706d5380bc1c4001795c65c842fc6292 Mon Sep 17 00:00:00 2001 From: chloeilabs Date: Mon, 15 Jun 2026 23:04:12 -0500 Subject: [PATCH] Fix dead dropdown menu actions after base-ui migration (Delete chat, Pin, Sign out) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The base-ui migration (d82421b) moved dropdown menus onto base-ui's Menu.Item, which fires onClick and has no onSelect prop. Three menu items were left using Radix's onSelect, so base-ui silently ignored them and the handlers never ran — most visibly, "Delete chat" did nothing. Switch the affected items to onClick: - nav-threads.tsx: Delete chat and Pin chat - nav-user.tsx: Sign out The handlers ignore the event argument, so the swap is type-safe, and base-ui's closeOnClick defaults to true so the menu still closes. Verified: eslint (--max-warnings=0), prettier, typecheck, and 157 unit tests pass. Live browser test: clicking Delete chat now sends DELETE /api/threads (204), removes the thread from the sidebar, and deletes the row from Postgres. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/components/nav-threads.tsx | 4 ++-- src/components/nav-user.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/nav-threads.tsx b/src/components/nav-threads.tsx index a7f9351..a4f5ad8 100644 --- a/src/components/nav-threads.tsx +++ b/src/components/nav-threads.tsx @@ -159,7 +159,7 @@ export function NavThreads({ className="min-w-40" > { + onClick={() => { togglePin(thread.id) }} > @@ -178,7 +178,7 @@ export function NavThreads({ { + onClick={() => { onDeleteThread(thread.id) if (isPinned) togglePin(thread.id) }} diff --git a/src/components/nav-user.tsx b/src/components/nav-user.tsx index bdc1bb5..e77d5f8 100644 --- a/src/components/nav-user.tsx +++ b/src/components/nav-user.tsx @@ -102,7 +102,7 @@ export function NavUser({ viewer }: { viewer: AuthViewer }) { {isPending ? "Signing out…" : "Sign out"}