feat: Add MCP refresh button - #118
Conversation
Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
marekdano
left a comment
There was a problem hiding this comment.
Findings:
1. Refresh toast drops resource/prompt count changes
src/pages/Servers.tsx:235
The success toast picks the "counts" message variant whenever tools, resources, or prompts changed, but the ICU string (mcpServer.refresh.success) only interpolates toolsAdded/toolsUpdated/toolsRemoved. If a refresh only changes resources/prompts (e.g. resourcesAdded: 3, tool counts all 0), every ICU plural block resolves to empty, so the toast renders as "Refreshed {name}. ." — a stray trailing period with no mention of what actually changed. This is duplicated across en-US, es-ES, and pt-BR locale files.
2. Post-success refetch failure surfaces as a refresh failure
src/pages/Servers.tsx:242
await refetch() runs inside the same try block as serversApi.refreshTools(). If the refresh succeeds but the follow-up list refetch throws (e.g. transient network error), the generic catch fires and shows a second, contradicting toast: "Failed to refresh {name}...", right after the success toast already appeared. handleDelete in the same file already wraps its post-success refetch in its own nested try/catch to avoid this exact issue — handleRefresh doesn't follow that precedent and should.
bf5e9aa to
f8efc2a
Compare
Closes IBM/mcp-context-forge#6550