Skip to content

Edit MCP: Merge UI changes with existing YAML #399

@andreaskienle

Description

@andreaskienle

Description

This follows up on the quick fix in #391.

Proper merge

Right now, we overwrite fields that are unknown to the UI (similar to what we fixed in #391). There's also a hard‑coded exception for Landscaper. Other components would be removed when the MCP is edited via UI (❌)

The current UI dialog approach appears to be:

  • Load YAML from the server to prefill known fields.
  • Generate a new YAML from the user’s inputs.
  • Write the new YAML back to the server.

We should reconsider this. The UI should:

  • Visualize only a subset of the YAML (e.g., components and providers).
  • Track user edits within the dialog.
  • Merge those edits back into the original YAML, preserving any unknown fields.

With this approach, we avoid destructive overwrites and remove the need for special handling of components (including the Landscaper exception).

Unit tests

We should add unit tests for the following scenarios that caused issues:

  • Original YAML has an unknown provider – should be kept
  • Original YAML has an unknown component – should be kept
  • Landscaper component should not be removed if present

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/webappAll ManagedControlPlane UI related issues

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions