Skip to content

feat: Add MCP refresh button - #118

Open
gcgoncalves wants to merge 1 commit into
mainfrom
6550-refresh-button
Open

feat: Add MCP refresh button#118
gcgoncalves wants to merge 1 commit into
mainfrom
6550-refresh-button

Conversation

@gcgoncalves

Copy link
Copy Markdown
Contributor

Signed-off-by: Gabriel Costa <gabrielcg@proton.me>

@marekdano marekdano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refresh action for connected MCP servers (new UI)

2 participants