You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ux): reload tools/approvals/logs on serverName navigation (ServerDetail.vue)
Vue Router 4 reuses the ServerDetail.vue component instance across
/servers/foo → /servers/bar — same route, different param. The `server`
computed correctly retargets via the Pinia store, but the local data
refs (serverTools, toolApprovals, serverLogs, scan*) stayed populated
with the previous server's data until something refetched them. Navigating
between server detail pages briefly showed server B's name + stats
combined with server A's tool list, which looked like a data-corruption
bug.
Adds a `watch(() => props.serverName)` that resets every per-server
local ref and re-runs loadServerDetails. The reset enumerates exactly
the refs that carry per-server data and leaves UI-state refs (activeTab,
logTail, toolSearch) alone so the user's tab/scope choice persists across
navigation.
Race protection: introduces a `loadGeneration` counter bumped on every
loadServerDetails entry. The three parallel fetches now run via internal
`_loadToolsWithGen / _loadToolApprovalsWithGen / _loadLogsWithGen`
helpers that capture the generation at entry and only commit results if
it hasn't advanced — protects the foo→bar→foo case where foo's response
arrives AFTER bar's load already started. The public no-arg `loadTools /
loadToolApprovals / loadLogs` wrappers preserve existing call sites
(template @click handlers, the connected/enabled watch, post-action
refreshes) unchanged.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments