fix: add placeholder for MCP tool return type field #1970
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PR fixes the MCP tool form's return type placeholder by initializing it from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
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
`@workspaces/ballerina/ballerina-visualizer/src/views/BI/ServiceDesigner/Forms/McpToolForm/index.tsx`:
- Line 204: The placeholder lookup is using
model.returnType.metadata?.placeholder (which isn't defined) instead of the
top-level PropertyModel.placeholder; update the expression in the component to
prefer model.returnType.placeholder first, then fall back to
model.returnType.metadata?.placeholder (or the hardcoded default), so configured
placeholders on PropertyModel are honored—look for the usage of model.returnType
in the component (the placeholder prop at line with placeholder:
model.returnType.metadata?.placeholder || ...) and change it to check
model.returnType.placeholder before the metadata fallback.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2304a30b-0d38-451e-97bd-7698bb24acd6
📒 Files selected for processing (1)
workspaces/ballerina/ballerina-visualizer/src/views/BI/ServiceDesigner/Forms/McpToolForm/index.tsx
Purpose
Fixes wso2/product-integrator#731
The return type field in the MCP tool form was displaying
undefinedas placeholder text when a user adds a newtool in the MCP service creator.
Goals
Show a meaningful placeholder for the return type field instead of
undefined.Approach
Added a placeholder property to the returnType field in McpToolForm/index.tsx that falls back to "e.g. string,
int, json" when no placeholder is defined in the metadata.
UI Component Development
N/A - No new UI components added
Manage Icons
N/A - No new icons added
User stories
N/A
Release note
Fixed undefined placeholder text in MCP tool return type field.
Documentation
N/A - Minor placeholder fix, no doc impact
Training
N/A
Certification
N/A
Marketing
N/A
Automation tests
N/A
Security checks
Samples
N/A
Related PRs
N/A
Migrations
N/A
Test environment
N/A
Learning
N/A
Summary by CodeRabbit