From dac54802a00cb934d64e446e750335d3d34be45b Mon Sep 17 00:00:00 2001 From: Philip Zeyliger Date: Tue, 13 Jan 2026 04:24:15 +0000 Subject: [PATCH] shelley/ui: don't re-sort conversation list on updates Prompt: When two conversations are running at the same time, the updates to each other's status (last updated, probably) makes them resort, and it's very distracting, especially if they compete with each other. Let's just not resort them When two conversations run simultaneously, updates cause them to compete for position, which is visually distracting. Now we update conversations in place and only put new conversations at the top. Co-authored-by: Shelley --- ui/src/App.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 3ce862b9a5f902ac9f5802c17ca98c1c18561d2c..7dbe0a29d69059799a39c9b51e760291bcdcbeef 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -127,22 +127,13 @@ function App() { ); if (existingIndex >= 0) { - // Update existing conversation + // Update existing conversation in place (don't re-sort to avoid distracting jumps) const updated = [...prev]; updated[existingIndex] = update.conversation!; - // Re-sort by updated_at descending - updated.sort( - (a, b) => new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime(), - ); return updated; } else { - // Add new conversation at the appropriate position - const updated = [update.conversation!, ...prev]; - // Sort by updated_at descending - updated.sort( - (a, b) => new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime(), - ); - return updated; + // Add new conversation at the top + return [update.conversation!, ...prev]; } }); } else if (update.type === "delete" && update.conversation_id) {