Skip to content

Commit 5be7f79

Browse files
waleedlatif1claude
andcommitted
fix(mcp): revert optimistic oauthClientId to undefined to match McpServer type
The response contract preprocesses null → undefined, so McpServer.oauthClientId is string | undefined. Using null broke type checking. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6c75f50 commit 5be7f79

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

apps/sim/hooks/queries/mcp.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,7 @@ export function useUpdateMcpServer() {
273273
const { oauthClientSecret: _omitSecret, oauthClientId, ...rest } = updates
274274
const safeUpdates: Partial<McpServer> = { ...rest }
275275
if (oauthClientId !== undefined) {
276-
// Server normalizes empty string → null; mirror that to avoid UI flicker
277-
// between optimistic apply and server response invalidation.
278-
safeUpdates.oauthClientId = oauthClientId || null
276+
safeUpdates.oauthClientId = oauthClientId || undefined
279277
}
280278
queryClient.setQueryData<McpServer[]>(
281279
mcpKeys.serversList(workspaceId),

0 commit comments

Comments
 (0)