Skip to content

Conversation

lucasgoral
Copy link
Contributor

@lucasgoral lucasgoral commented Sep 24, 2025

What this PR does / why we need it:

Edit MCP improvements:

  • added option to duplicate MCP config
  • simplified logic
  • added option to jump between form sections in edit mode

@lucasgoral lucasgoral changed the title Edit mcp improvements Edit MCP wizard improvements Sep 26, 2025
@lucasgoral lucasgoral marked this pull request as ready for review September 26, 2025 07:24
@Copilot Copilot AI review requested due to automatic review settings September 26, 2025 07:24
Copy link
Contributor

@Copilot 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 enhances the MCP (Managed Control Plane) wizard with editing improvements. It adds functionality to duplicate MCP configurations, simplifies component selection logic by moving it to a custom hook, and provides the ability to jump between form sections when editing MCPs directly from the MCP page.

  • Introduces MCP duplication functionality alongside existing edit capability
  • Refactors component selection logic into a reusable custom hook
  • Adds direct navigation to specific wizard sections from the MCP page

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/spaces/mcp/pages/McpPage.tsx Adds button for editing components and wizard section navigation
src/spaces/mcp/pages/McpPage.module.css Adds CSS styles for action bar and panel header layout
src/components/Wizards/CreateManagedControlPlane/useComponentsSelectionData.ts New custom hook extracting component selection logic
src/components/Wizards/CreateManagedControlPlane/SummarizeStep.tsx Removes unused originalYamlString prop
src/components/Wizards/CreateManagedControlPlane/EditManagedControlPlaneWizardDataLoader.tsx Adds support for duplicate mode and initial section navigation
src/components/Wizards/CreateManagedControlPlane/CreateManagedControlPlaneWizardContainer.tsx Major refactor supporting duplicate mode and section jumping
src/components/Wizards/CreateManagedControlPlane/CreateManagedControlPlaneWizardContainer.module.css New CSS for wizard layout improvements
src/components/Ui/Infobox/Infobox.tsx Enhanced infobox component with icon support
src/components/Ui/Infobox/Infobox.module.css Updated infobox styling with modern appearance
src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCardMenu.tsx Adds duplicate menu option
src/components/ControlPlanes/ControlPlaneCard/ControlPlaneCard.tsx Refactors wizard state management for edit/duplicate modes
src/components/ComponentsSelection/ComponentsSelectionContainer.tsx Simplified by removing complex component loading logic
src/components/ComponentsSelection/ComponentsSelection.tsx Minor layout and messaging improvements
public/locales/en.json Adds new translation keys for duplicate functionality
Comments suppressed due to low confidence (1)

src/components/Wizards/CreateManagedControlPlane/CreateManagedControlPlaneWizardContainer.tsx:1

  • The prop name 'setIsOpen' expects a function that sets a boolean, but 'handleEditManagedControlPlaneWizardClose' implies it only closes (sets to false). This naming mismatch could be confusing. Consider renaming the handler to 'handleWizardStateChange' or updating the prop interface.
import { FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';

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

Copy link
Contributor

@Hubert-Szczepanski-SAP Hubert-Szczepanski-SAP left a comment

Choose a reason for hiding this comment

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

Good Job!

@lucasgoral lucasgoral merged commit d272e62 into main Sep 26, 2025
5 checks passed
@lucasgoral lucasgoral deleted the edit-mcp-improvements branch September 26, 2025 12:15
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.

2 participants