The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(chat): deleting a chat is findable
purple6e511ee0c894
diff --git a/e2e/chat-delete-discoverable.spec.ts b/e2e/chat-delete-discoverable.spec.tsnew file mode 100644index 00000000..e02cc757--- /dev/null+++ b/e2e/chat-delete-discoverable.spec.ts@@ -0,0 +1,87 @@+import { test, expect, type Page } from '@playwright/test'+import { tauriMockInit, DEFAULT_ASSISTANT_REPLY, DEFAULT_MODEL_NAME } from './support/tauri-mock'+import { openNewChat } from './support/ui'++/**+ * Deleting a chat has to be findable (sweenscapehub, Discord 2026-07-30):+ * "I have searched the whole app and right clicked the chats, checked github+ * readme faq — there doesn't seem to be a intuitive way to delete a chat".+ *+ * The button existed the whole time, at 10 px, unlabelled, and only while the+ * pointer sat on the row. Right-click, the gesture they tried first, did+ * nothing. So this spec pins the two ways out: the context menu, and hover+ * buttons that carry a name a human and a screen reader can both read.+ *+ * Run: npx playwright test e2e/chat-delete-discoverable.spec.ts+ */++/** Conversation rows in the sidebar, counted by their delete affordance. */+const rowCount = async (page: Page) => await page.getByRole('button', { name: 'Delete chat' }).count()++async function bootWithTwoChats(page: Page) {+ await page.addInitScript(tauriMockInit, {+ assistantReply: DEFAULT_ASSISTANT_REPLY,+ modelName: DEFAULT_MODEL_NAME,+ })+ await page.goto('/')+ await page.getByRole('button', { name: /Get Started/i }).click()+ await page.getByRole('button', { name: /Continue/i }).click()+ await page.getByRole('button', { name: /Skip for now/i }).click()+ await expect(page.getByRole('heading', { name: /Pick a starter model/i })).toBeVisible()+ await page.getByRole('button', { name: /Qwen 2\.5 0\.5B/i }).click()+ await page.getByRole('button', { name: /Install \d+ model/i }).click()+ await expect(page.getByRole('button', { name: /Skip for now/i })).toBeVisible({ timeout: 30_000 })+ await page.getByRole('button', { name: /Skip for now/i }).click()+ await page.getByRole('button', { name: /Get Started/i }).click()++ // Two conversations so a delete shows up as a count change. The first one+ // carries a real exchange, the second is the empty chat you get from the+ // button — both are rows in the sidebar.+ await openNewChat(page)+ await page.locator('textarea').first().fill('first chat')+ await page.locator('textarea').first().press('Enter')+ await expect(page.getByText(DEFAULT_ASSISTANT_REPLY).first()).toBeVisible({ timeout: 30_000 })+ await openNewChat(page)+ await expect.poll(async () => await rowCount(page)).toBe(2)+}++test('right-clicking a chat offers rename and delete, and delete removes it', async ({ page }) => {+ await bootWithTwoChats(page)+ const before = await rowCount(page)+ expect(before).toBeGreaterThanOrEqual(2)++ await page.getByRole('button', { name: 'Delete chat' }).first().hover()+ await page.mouse.down({ button: 'right' })+ await page.mouse.up({ button: 'right' })++ const menu = page.getByRole('menu', { name: /Chat actions/i })+ await expect(menu).toBeVisible()+ await expect(menu.getByRole('menuitem', { name: /Rename/i })).toBeVisible()+ await expect(menu.getByRole('menuitem', { name: /Delete chat/i })).toBeVisible()++ await menu.getByRole('menuitem', { name: /Delete chat/i }).click()+ await expect(menu).toHaveCount(0)+ await expect.poll(async () => await rowCount(page)).toBe(before - 1)+})++test('escape closes the menu without deleting anything', async ({ page }) => {+ await bootWithTwoChats(page)+ const before = await rowCount(page)++ await page.getByRole('button', { name: 'Delete chat' }).first().hover()+ await page.mouse.down({ button: 'right' })+ await page.mouse.up({ button: 'right' })+ await expect(page.getByRole('menu', { name: /Chat actions/i })).toBeVisible()++ await page.keyboard.press('Escape')+ await expect(page.getByRole('menu', { name: /Chat actions/i })).toHaveCount(0)+ expect(await rowCount(page)).toBe(before)+})++test('the row buttons carry names, so they are findable without guessing', async ({ page }) => {+ await bootWithTwoChats(page)+ // Named for a screen reader and tooltipped for everyone else — the 10 px+ // unlabelled icon is what sent sweenscapehub to Discord.+ await expect(page.getByRole('button', { name: 'Delete chat' }).first()).toHaveAttribute('title', 'Delete chat')+ await expect(page.getByRole('button', { name: 'Rename chat' }).first()).toHaveAttribute('title', 'Rename chat')+})diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsxindex 59a8fdb6..cb12879c 100644--- a/src/components/layout/Sidebar.tsx+++ b/src/components/layout/Sidebar.tsx@@ -31,6 +31,11 @@ export function Sidebar() {const [countdown, setCountdown] = useState('')const [dispatchPicker, setDispatchPicker] = useState(false)const [qrModalOpen, setQrModalOpen] = useState(false)+ // Right-click menu on a conversation row. sweenscapehub searched the whole+ // app and right-clicked the chats before asking in Discord how to delete one+ // (2026-07-30): the buttons existed, but at 10 px and only on hover, and the+ // gesture everyone tries first did nothing at all.+ const [rowMenu, setRowMenu] = useState<{ id: string; x: number; y: number } | null>(null)const isCodingMode = chatMode === 'codex'const isRemoteMode = chatMode === 'remote'@@ -182,6 +187,12 @@ export function Sidebar() {useEffect(() => {if (qrVisible && dispatchedMessageCount > 0) hideQr()}, [qrVisible, dispatchedMessageCount, hideQr])+ useEffect(() => {+ if (!rowMenu) return+ const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') setRowMenu(null) }+ window.addEventListener('keydown', onKey)+ return () => window.removeEventListener('keydown', onKey)+ }, [rowMenu])// While the QR is visible, poll the connected-device list often so we// auto-hide it the moment the user's phone authenticates.useEffect(() => {@@ -418,6 +429,10 @@ export function Sidebar() {setActiveConversation(conv.id)setView('chat')}}+ onContextMenu={(e) => {+ e.preventDefault()+ setRowMenu({ id: conv.id, x: e.clientX, y: e.clientY })+ }}><div className="flex-1 min-w-0">{editingId === conv.id ? (@@ -458,18 +473,22 @@ export function Sidebar() {<QrCode size={13} /></button>)}- <div className="flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity">+ <div className="flex items-center gap-0.5 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity"><buttononClick={(e) => { e.stopPropagation(); setEditingId(conv.id); setEditTitle(conv.title) }}- className="p-0.5 rounded hover:bg-white/10 text-gray-500 hover:text-gray-300"+ title="Rename chat"+ aria-label="Rename chat"+ className="p-1 rounded hover:bg-white/10 text-gray-500 hover:text-gray-300">- <Edit3 size={10} />+ <Edit3 size={13} /></button><buttononClick={(e) => { e.stopPropagation(); deleteConversation(conv.id) }}- className="p-0.5 rounded hover:bg-red-500/20 text-gray-500 hover:text-red-400"+ title="Delete chat"+ aria-label="Delete chat"+ className="p-1 rounded hover:bg-red-500/20 text-gray-500 hover:text-red-400">- <Trash2 size={10} />+ <Trash2 size={13} /></button></div></div>@@ -564,6 +583,47 @@ export function Sidebar() {</motion.aside>)}+ {/* Right-click menu for a conversation row. The hover buttons stay, this+ is the gesture people reach for first. */}+ {rowMenu && (+ <div+ key="row-menu"+ className="fixed inset-0 z-[110]"+ onClick={() => setRowMenu(null)}+ onContextMenu={(e) => { e.preventDefault(); setRowMenu(null) }}+ >+ <div+ role="menu"+ aria-label="Chat actions"+ className="absolute min-w-[9rem] py-1 rounded-md bg-white dark:bg-[#141414] border border-gray-200 dark:border-white/10 shadow-lg text-[0.7rem]"+ style={{ left: Math.min(rowMenu.x, window.innerWidth - 160), top: Math.min(rowMenu.y, window.innerHeight - 80) }}+ onClick={(e) => e.stopPropagation()}+ >+ <button+ role="menuitem"+ onClick={() => {+ const conv = conversations.find((c) => c.id === rowMenu.id)+ setEditingId(rowMenu.id)+ setEditTitle(conv?.title ?? '')+ setRowMenu(null)+ }}+ className="w-full flex items-center gap-2 px-3 py-1.5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-white/[0.06]"+ >+ <Edit3 size={12} />+ <span>Rename</span>+ </button>+ <button+ role="menuitem"+ onClick={() => { deleteConversation(rowMenu.id); setRowMenu(null) }}+ className="w-full flex items-center gap-2 px-3 py-1.5 text-red-500 hover:bg-red-500/10"+ >+ <Trash2 size={12} />+ <span>Delete chat</span>+ </button>+ </div>+ </div>+ )}+{/* QR Modal — large QR + passcode + URL, opened from the LIVE panel */}{qrModalOpen && (<motion.div