From 65a10723b38ac221c0c046adac687875dfeac70f Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Wed, 11 Mar 2026 12:01:33 +0100 Subject: [PATCH] fix(shell): clear stale taskbar entries on WebSocket reconnect When weft-appd restarts, session IDs reset to 0. Without clearing, RUNNING_APPS repopulation after reconnect would coexist with stale entries from the previous session. Removing all weft-taskbar-app elements on the open event ensures the taskbar reflects only the current appd session registry. --- infra/shell/system-ui.html | 1 + 1 file changed, 1 insertion(+) diff --git a/infra/shell/system-ui.html b/infra/shell/system-ui.html index 517b0c6..e4760e1 100644 --- a/infra/shell/system-ui.html +++ b/infra/shell/system-ui.html @@ -256,6 +256,7 @@ ws.addEventListener('open', function () { wsReconnectDelay = 1000; + document.querySelectorAll('weft-taskbar-app').forEach(function (el) { el.remove(); }); ws.send(JSON.stringify({ type: 'QUERY_RUNNING' })); ws.send(JSON.stringify({ type: 'QUERY_INSTALLED_APPS' })); });