Skip to content

Comments

refactor MCP button and MCP response formatting #109

Merged
Safouene1 merged 3 commits intomainfrom
mcp
Sep 15, 2025
Merged

refactor MCP button and MCP response formatting #109
Safouene1 merged 3 commits intomainfrom
mcp

Conversation

@Safouene1
Copy link
Contributor

This pull request refactors the MCP Button

  • Added the FailedProfile type to profile.types.ts to consistently format MCP debug responses.

  • Updated the McpButton component to accept and render complex MCP responses (mcpResponse), support custom icons, and display error messages with improved formatting.

  • Modified usages of McpButton in ProfileRow, ClusterHeading, and VerifyInstallation to the new response

@Safouene1 Safouene1 requested a review from Copilot September 15, 2025 23:11
# Conflicts:
#	src/modules/clusters/cluster-information/components/clusterHeading.tsx
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the MCP Button component to handle complex MCP response formatting and display. It enhances the button's ability to render structured debug responses with improved error formatting and adds support for custom icons.

  • Added FailedProfile type for consistent MCP debug response formatting
  • Refactored McpButton to accept complex response objects and custom icons
  • Updated all MCP button usages to use the new response format

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tsconfig.node.json Added trailing newline
src/types/profile.types.ts Added FailedProfile interface for MCP response structure
src/modules/common/components/actions/VerifyInstallation.tsx Updated to use new MCP button props with custom icons and response data
src/modules/clusters/cluster-information/components/clusterHeading.tsx Updated MCP debug button to use new response format and cleaned up console logs
src/modules/clusters/cluster-information/components/addonsTable/rows/ProfileRow.tsx Updated MCP button to use new mcpResponse prop
src/lib/components/ui/inputs/mcp-button.tsx Major refactor to support custom icons, array responses, and improved error formatting
src/hooks/useMcp.tsx Added response processing functions and updated return types for structured data

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Safouene1 Safouene1 merged commit dcfb6d7 into main Sep 15, 2025
1 check passed
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.

1 participant