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
- …
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:
We should reconsider this. The UI should:
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: