From fe5d18afa790a7bf428123452991c2ff66a61fd7 Mon Sep 17 00:00:00 2001 From: janvanwan Date: Tue, 18 Aug 2026 14:39:30 -0500 Subject: [PATCH] feat(ui): bulk-clear conversations, fold Start/Stop AI into the status dot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Clear button beside Export deletes every conversation currently listed. It respects the search filter, so it doubles as "delete these matches"; the confirm text names which of the two is about to happen. Starts a fresh conversation id if the active one was among those deleted. - The separate Start/Stop AI button is gone. The status dot was already colour-coding the same state and sitting right above it, so clicking it now toggles Ollama and the tooltip carries the phase text ("loading model…"), which is where the eye already is during the wait. - Active nav/conversation items are marked with a blue left border and weighted text instead of a filled background, and the sidebar is wider so conversation titles stop truncating. Co-Authored-By: Claude Opus 5 --- interface/web/src/App.jsx | 83 ++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 32 deletions(-) diff --git a/interface/web/src/App.jsx b/interface/web/src/App.jsx index 45e8637..e2c39e3 100644 --- a/interface/web/src/App.jsx +++ b/interface/web/src/App.jsx @@ -154,6 +154,21 @@ function App() { } }; + // Bulk delete of everything currently listed (respects the search filter). + const clearConversations = async () => { + const n = conversations.length; + if (!n) return; + const what = search ? `${n} matching conversation${n > 1 ? "s" : ""}` : `all ${n} conversation${n > 1 ? "s" : ""}`; + if (!window.confirm(`Delete ${what}? This cannot be undone.`)) return; + const ids = conversations.map(c => c.id); + await Promise.all( + ids.map(id => fetch(`${API_BASE}/conversations/${id}`, { method: "DELETE" }).catch(err => + console.error("Failed to delete conversation:", err))) + ); + if (ids.includes(activeConversationId)) setActiveConversationId(crypto.randomUUID()); + loadConversations(search); + }; + const navItems = [ { key: "chatbot", icon: "💬", label: "Chat" }, { key: "playbook", icon: "📖", label: "Playbooks" }, @@ -168,7 +183,7 @@ function App() {
{/* Sidebar */}
)} - {/* Manual AI start/stop — Ollama is off until the user turns it on */} - + {/* Start/Stop AI moved onto the status dot above — click it to toggle. */}