Skip to content

fix: MCP Manager Add Stdio Server form improvements#223

Open
sungdark wants to merge 1 commit intoCortexLM:mainfrom
sungdark:fix/mcp-stdio-form-header
Open

fix: MCP Manager Add Stdio Server form improvements#223
sungdark wants to merge 1 commit intoCortexLM:mainfrom
sungdark:fix/mcp-stdio-form-header

Conversation

@sungdark
Copy link
Copy Markdown

Summary

Fixes two validated bounty challenge bugs in the MCP Manager Add Stdio Server form:

Fix 1: Missing form header (#40908)

The Add Stdio Server form now shows Add MCP Server - Stdio as the title, matching the pattern of other server type forms (HTTP shows - HTTP, Registry shows - Registry).

Before: Add MCP Server
After: Add MCP Server - Stdio

Fix 2: Silent failure on empty fields (#40906)

When pressing Enter with empty Name or Command fields, the form now displays a red error message instead of silently doing nothing.

Error messages:

  • Both empty: Error: Name and Command are required
  • Name empty: Error: Server name is required
  • Command empty: Error: Command is required

The error automatically clears when the user starts typing or presses Tab to switch fields.

Files changed

  • src/cortex-tui/src/modal/mcp_manager/types.rs - Added error: Option<String> field to AddStdioServer mode
  • src/cortex-tui/src/modal/mcp_manager/handlers.rs - Set error on empty submit, clear on typing
  • src/cortex-tui/src/modal/mcp_manager/rendering.rs - Render error message + fixed title
  • src/cortex-tui/src/modal/mcp_manager/mod.rs - Updated paste handler to handle new field

Bounty References

收款地址:eB51DWp1uECrLZRLsE2cnyZUzfRWvzUzaJzkatTpQV9

Fixes two validated bounty challenge bugs:

1. MCP Manager Add Stdio Server form now shows '- Stdio' suffix
   in the header, matching other server type forms (HTTP, Registry).
   Fixes PlatformNetwork/bounty-challenge#40908

2. When Enter is pressed with empty Name or Command fields, a red
   error message now appears instead of silently doing nothing.
   Error clears automatically when user starts typing.
   Fixes PlatformNetwork/bounty-challenge#40906

收款地址:eB51DWp1uECrLZRLsE2cnyZUzfRWvzUzaJzkatTpQV9
Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants