Skip to content

Conversation

lucasgoral
Copy link
Contributor

@lucasgoral lucasgoral commented Oct 8, 2025

What this PR does / why we need it:

Feature to allow users edit resources inside MCP by editing YAML config files.

@lucasgoral lucasgoral requested a review from Copilot October 9, 2025 10:51
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 implements YAML editing functionality for MCP (Managed Control Plane) resources, enabling users to edit Kubernetes resource configurations directly through a YAML editor interface.

Key changes include:

  • Enhanced YamlEditor component with edit mode, validation, and apply functionality
  • New utility function to convert Kubernetes resources to clean configuration format
  • Integration of YAML editing capabilities into resource management components
  • Added edit actions to resource tables with confirmation workflows

Reviewed Changes

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

Show a summary per file
File Description
src/utils/convertToResourceConfig.ts New utility to convert Kubernetes resources to clean manifest format by removing server-managed fields
src/utils/convertToResourceConfig.spec.ts Comprehensive test coverage for the resource conversion utility
src/lib/api/types/crossplane/handleResourcePatch.ts New API handler for patching Kubernetes resources via server API
src/lib/api/types/crate/createManagedControlPlane.ts Refactored component naming and variable names for better clarity
src/components/YamlEditor/YamlEditor.tsx Enhanced YAML editor with edit mode, validation, and apply functionality
src/components/YamlEditor/YamlDiffEditor.tsx Updated diff editor options and variable naming
src/components/Yaml/*.tsx Updated YAML viewing components to support edit mode and patch workflows
src/components/ControlPlane/*.tsx Added edit actions and YAML editing integration to resource management tables
public/locales/en.json Added translations for new edit functionality and error messages

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

@lucasgoral lucasgoral marked this pull request as ready for review October 10, 2025 13:59
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.

LGTM :)

@lucasgoral lucasgoral merged commit d0dcca5 into main Oct 20, 2025
5 checks passed
@lucasgoral lucasgoral deleted the edit-resources branch October 20, 2025 07:40
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.

3 participants