Conversation
📝 WalkthroughWalkthroughIntroduces a new CustomTableToggle component and tests; wires it into the custom fields factory for "Endpoint Properties"; tweaks camel-catalog dependency versions; and updates the camel component schema merge to set Changes
Sequence DiagramsequenceDiagram
participant User
participant CustomTableToggle
participant SchemaContext
participant ToggleGroup
participant ObjectField
participant ArrayFieldWrapper
participant PropertiesField
User->>CustomTableToggle: render form field
CustomTableToggle->>SchemaContext: read schema (parameters / properties)
SchemaContext-->>CustomTableToggle: schema (with/without properties)
CustomTableToggle->>ToggleGroup: init activeView ("standard" if properties exist)
CustomTableToggle->>ObjectField: render Standard view (if selected)
ObjectField-->>User: show object inputs
User->>ToggleGroup: click "Custom"
ToggleGroup->>CustomTableToggle: notify switch
CustomTableToggle->>ArrayFieldWrapper: render Custom view
ArrayFieldWrapper->>PropertiesField: provide properties table
PropertiesField-->>User: show properties table
User->>ToggleGroup: click "Standard"
ToggleGroup->>CustomTableToggle: notify switch
CustomTableToggle->>ObjectField: re-render Standard view
ObjectField-->>User: show object inputs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
46c0019 to
c1e22cf
Compare
The refactor for the issue is in the PR for the editable uri that will be merged before this one. |
5e5c998 to
5815d90
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2972 +/- ##
==========================================
+ Coverage 89.40% 89.41% +0.01%
==========================================
Files 558 559 +1
Lines 20559 20595 +36
Branches 4761 4616 -145
==========================================
+ Hits 18380 18416 +36
- Misses 2051 2177 +126
+ Partials 128 2 -126 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@packages/ui/src/models/visualization/flows/support/camel-component-schema.service.ts`:
- Around line 389-392: The code assumes schema.properties!.parameters exists and
directly assigns to its fields; guard this by checking for schema.properties and
schema.properties.parameters at runtime (e.g., if (!schema.properties)
schema.properties = {} and if (!schema.properties.parameters) initialize
schema.properties.parameters to a proper object shape) before assigning
actualComponentProperties and componentSchema.required; update the block around
the catalogLookup.definition / componentSchema check that sets
schema.properties!.parameters.properties = actualComponentProperties to perform
these null/undefined checks and create a parameters container when missing to
avoid runtime errors.
packages/ui/src/models/visualization/flows/support/camel-component-schema.service.ts
Outdated
Show resolved
Hide resolved
|
There was a problem hiding this comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In
`@packages/ui/src/models/visualization/flows/support/camel-component-schema.service.ts`:
- Around line 389-392: The code uses a non-null assertion
schema.properties!.parameters which can still throw if schema.properties is
undefined; change the defensive check and assignments to use optional chaining
and guarded assignment: verify catalogLookup.definition and componentSchema then
access schema.properties?.parameters (or retrieve const params =
schema.properties?.parameters) and only set params.properties and
params.required when params is truthy, replacing schema.properties!.parameters
with the optional-chained reference to avoid unsafe `!` assertions.



Added a custom table toggle component that will show two modes for endpoint properties table inside the form modal: the standard mode as it is right now and the table mode, to add custom properties with a key-value table.
Once merged these two PRs from camel-catalog repository (one and two), it will also show the custom properties table for components and EIPs such as from, to, toD, poll, that don't have properties configured.
fix: #2968
Summary by CodeRabbit
New Features
Style
Tests
Chores
Bug Fixes