From ae62faee4e6a64955ade2799d05d64d2096e37e4 Mon Sep 17 00:00:00 2001 From: matevip Date: Fri, 17 Jul 2026 18:15:38 +0800 Subject: [PATCH] fix(chat): refresh agent list on chat page reactivation The chat page is kept alive by the router so navigating away and back only fires an activation hook, not a fresh mount. An agent created, edited, or deleted elsewhere (e.g. the employee management page) never reached the chat page's own agent list, and stayed invisible or unselectable in the agent picker until a full page reload forced a fresh mount. The agent list is now refetched on every reactivation. --- mateclaw-ui/src/views/ChatConsole.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mateclaw-ui/src/views/ChatConsole.vue b/mateclaw-ui/src/views/ChatConsole.vue index 4331c2e9..f1180b99 100644 --- a/mateclaw-ui/src/views/ChatConsole.vue +++ b/mateclaw-ui/src/views/ChatConsole.vue @@ -1254,6 +1254,12 @@ onActivated(async () => { startECharts() startKatex() startMermaid() + // Issue #538: ChatConsole is kept alive by the router (meta.keepAlive), so + // navigating away and back only fires onActivated, not onMounted — an + // agent created/edited/deleted elsewhere (e.g. the Employees page) never + // reached this component's own `agents` list otherwise, and stayed + // invisible in the picker until a full page reload forced a fresh mount. + await loadAgents() activityPollTimer = window.setInterval(pollActivity, ACTIVITY_POLL_MS) elapsedTickTimer = window.setInterval(() => { if (activeCronRuns.value.length > 0) elapsedNow.value = Date.now()