From a2515c5372a49502fb83595e09ebebce9145f893 Mon Sep 17 00:00:00 2001 From: MarekWo Date: Thu, 29 Jan 2026 21:16:08 +0100 Subject: [PATCH] fix: Add delayed reloads to update echo counts after sending Echo counts weren't appearing until sending another message because auto-refresh only triggers when new messages arrive. Added 6s and 15s delayed reloads after sending to catch echoes as they arrive. Co-Authored-By: Claude Opus 4.5 --- app/static/js/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/static/js/app.js b/app/static/js/app.js index 41540a2..a6ded90 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -807,8 +807,11 @@ async function sendMessage() { updateCharCounter(); showNotification('Message sent', 'success'); - // Reload messages after short delay + // Reload messages after short delay to show sent message setTimeout(() => loadMessages(), 1000); + // Reload again to catch echo counts (echoes typically arrive within 5-30 seconds) + setTimeout(() => loadMessages(), 6000); + setTimeout(() => loadMessages(), 15000); } else { showNotification('Failed to send: ' + data.error, 'danger'); }