diff --git a/apps/web/src/components/SessionLandingPage.tsx b/apps/web/src/components/SessionLandingPage.tsx index 83a06e4..5f30d82 100644 --- a/apps/web/src/components/SessionLandingPage.tsx +++ b/apps/web/src/components/SessionLandingPage.tsx @@ -3,7 +3,6 @@ import { Archive, MessageSquare, Send, ChevronDown, ChevronRight, RotateCcw, Tra import type { Chat } from '@/api/types'; import { Button } from '@/components/ui/button'; import { Textarea } from '@/components/ui/textarea'; -import { Input } from '@/components/ui/input'; import { ContextMenu, ContextMenuContent, @@ -165,7 +164,6 @@ export function SessionLandingPage({ const [renameValue, setRenameValue] = useState(''); const [archiveConfirm, setArchiveConfirm] = useState(null); const [deleteConfirm, setDeleteConfirm] = useState(null); - const [deleteInput, setDeleteInput] = useState(''); const openChats = chats .filter((c) => c.status === 'open') @@ -193,9 +191,6 @@ export function SessionLandingPage({ setRenamingId(null); } - const deleteExpected = deleteConfirm?.name ?? ''; - const deleteEnabled = deleteConfirm !== null && deleteInput === deleteExpected && deleteExpected.length > 0; - // TODO: Landing page chat counts are a snapshot at mount. New messages in // visible chats won't update the per-row stats until next mount/navigation. return ( @@ -217,7 +212,7 @@ export function SessionLandingPage({ onCancelRename={() => setRenamingId(null)} onContextStartRename={() => startRename(chat)} onContextArchive={() => setArchiveConfirm(chat)} - onContextDelete={() => { setDeleteConfirm(chat); setDeleteInput(''); }} + onContextDelete={() => setDeleteConfirm(chat)} showContextMenu actions={ <> @@ -242,7 +237,6 @@ export function SessionLandingPage({ onClick={(e) => { e.stopPropagation(); setDeleteConfirm(chat); - setDeleteInput(''); }} > @@ -352,36 +346,25 @@ export function SessionLandingPage({ - { if (!open) { setDeleteConfirm(null); setDeleteInput(''); } }}> + { if (!open) setDeleteConfirm(null); }}> Delete chat? - Type the chat name to confirm: - {' '} - {deleteExpected || '(unnamed — cannot type-confirm)'} + Permanently delete{' '} + {deleteConfirm?.name || '(unnamed)'} + {' '}and all its messages. This cannot be undone. - setDeleteInput(e.target.value)} - placeholder={deleteExpected} - disabled={!deleteExpected} - /> -
- This will permanently delete this chat and all its messages. This cannot be undone. -
-