fix(canvas): Apply pasted Pipe and Kamelet templates - #3838
Conversation
Pipe and Kamelet resources inherit a no-op addNewEntity, so replacing on paste left a blank template. Apply the copied definition and rebuild child entities (beans, error handler, metadata).
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (8)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughPaste handling now passes complete definitions for single-entity resources. Kamelet and pipe resources replace their current data and rebuild visual and supporting entities. Tests cover intermediate steps, beans, error handlers, and payload shapes. ChangesComplete paste replacement
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🔵 Low · up to Pasting full Pipe and Kamelet definitions now applies their steps and supporting metadata instead of resetting to a blank template. The change is mergeable with owner awareness that malformed pasted content could still leave the editor in a partially replaced state if reconstruction fails. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Linked Issues checkExplanation The changes address issue [ Full details: Out of Scope Changes checkExplanation All changes support the linked issue [ Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 7 files. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |



When you copy a full Pipe or Kamelet and confirm replace, Kaoto currently resets to a blank template. Those resources inherit a no-op addNewEntity, so the pasted steps never land.
This implements addNewEntity for Pipe and Kamelet so the copied definition is applied, including beans, error handler, and metadata. Paste now hands those resources the raw clipboard definition. KameletBinding inherits the Pipe path.
Fixes #3446
I ran
yarn workspace @kaoto/kaoto test,lint:fix,lint:style:fix, andbuild.Summary by CodeRabbit