Skip to content

๐Ÿ—‚๏ธ refactor: Make MCPSubMenu consistent with MCPSelect #8650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025

Conversation

dustinhealy
Copy link
Collaborator

@dustinhealy dustinhealy commented Jul 24, 2025

Summary

This pull request consolidates functionality and reduces code duplication for MCPSelect and MCPSubMenu utilizing a new hook useMCPServerManager and adds resiliency to simultaneous initialization errors by managing state for the current initializing server and handling when an initialization process is interrupted before completion, avoiding the previous case where MCP servers could become locked in a loading state without access to the cancellation button if initialized in rapid succession such that another query happens before the in-flight query can be resolved and return an OAuth URL. Resolves issue mentioned in #8642

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Testing

  • Verified correct functionality and UI consistency for MCP server selection and configuration flows.
  • Tested initialization, OAuth flows, and connection status handling for both MCPSelect and MCPSubMenu.
  • Ensured proper handling of custom user variables.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@dustinhealy dustinhealy marked this pull request as ready for review July 25, 2025 04:55
- Refactored MCPSelect and MCPSubMenu components to utilize a new custom hook, `useMCPServerManager`, for improved state management and server initialization logic.
- Added functionality to handle simultaneous MCP server initialization requests, including cancellation and user notifications.
- Updated translation files to include new messages for initialization cancellation.
- Improved the configuration dialog handling for MCP servers, streamlining the user experience when managing server settings.
@dustinhealy dustinhealy force-pushed the fix/mcp-submenu-display branch from d220333 to 55f3af1 Compare July 25, 2025 17:55
@danny-avila danny-avila changed the title ๐Ÿ—‚๏ธ feat: Make MCPSubMenu functionality consistent with MCPSelect ๐Ÿ—‚๏ธ refactor: Make MCPSubMenu consistent with MCPSelect Jul 25, 2025
@danny-avila danny-avila merged commit 545a909 into dev Jul 25, 2025
7 checks passed
@danny-avila danny-avila deleted the fix/mcp-submenu-display branch July 25, 2025 18:51
jhrozek pushed a commit to StacklokLabs/LibreChat that referenced this pull request Jul 31, 2025
โ€ฆla#8650)

- Refactored MCPSelect and MCPSubMenu components to utilize a new custom hook, `useMCPServerManager`, for improved state management and server initialization logic.
- Added functionality to handle simultaneous MCP server initialization requests, including cancellation and user notifications.
- Updated translation files to include new messages for initialization cancellation.
- Improved the configuration dialog handling for MCP servers, streamlining the user experience when managing server settings.
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Aug 4, 2025
โ€ฆla#8650)

- Refactored MCPSelect and MCPSubMenu components to utilize a new custom hook, `useMCPServerManager`, for improved state management and server initialization logic.
- Added functionality to handle simultaneous MCP server initialization requests, including cancellation and user notifications.
- Updated translation files to include new messages for initialization cancellation.
- Improved the configuration dialog handling for MCP servers, streamlining the user experience when managing server settings.
xycjscs pushed a commit to xycjscs/LibreChat that referenced this pull request Aug 9, 2025
โ€ฆla#8650)

- Refactored MCPSelect and MCPSubMenu components to utilize a new custom hook, `useMCPServerManager`, for improved state management and server initialization logic.
- Added functionality to handle simultaneous MCP server initialization requests, including cancellation and user notifications.
- Updated translation files to include new messages for initialization cancellation.
- Improved the configuration dialog handling for MCP servers, streamlining the user experience when managing server settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants