agent: Fix disabled MCP servers disappearing from UI after restart#47758
Conversation
When an MCP server is disabled in settings, it was never added to the `servers` HashMap on startup because `maintain_servers` only starts enabled servers. The `server_ids()` method only returned IDs from `servers` and the extension registry, so disabled servers configured in settings were not shown in the Agent Configuration panel. Include server IDs from `context_server_settings` in the `server_ids()` result so that all configured servers appear in the UI regardless of their enabled state.
MrSubidubi
left a comment
There was a problem hiding this comment.
Nice find and good fix! I quickly hopped on and changed this so that we do not need to deduplicate the IDs and sort the list each frame but instead only do this one as well as some refactors I stumbled across when looking into this. DIdn't want to bother you with this after the wait here.
Aside from that, thanks a lot for adding a good test for this! Made it that much easier to repro and validate.
Thanks!
* main: (57 commits) agent: Fix disabled MCP servers disappearing from UI after restart (zed-industries#47758) Update Rust crate git2 to v0.20.4 [SECURITY] (zed-industries#48400) Update Rust crate time to v0.3.47 [SECURITY] (zed-industries#48514) gpui: Reset `external_files_dragged` after successful drag-drop on macOS (zed-industries#48727) language: Return early if no grammars are added (zed-industries#48685) Properly handle multi-char folds (zed-industries#48721) collab: Proxy `GET /extensions` to Cloud (zed-industries#48717) git: Fix a potential misalignment in the side-by-side diff (zed-industries#48690) Move extension API DTOs into `cloud_api_types` (zed-industries#48689) git: Add a setting for the default view mode of `SplittableEditor` (zed-industries#48440) Use proper settings name for semantic tokens' settings UI (zed-industries#48686) gpui: Fix restarting panicking due to double borrows on windows (zed-industries#48667) Strip broken thinking blocks from Anthropic requests (zed-industries#48548) keymap_editor: Add `alt-l` keybinding for cycling favorite models (zed-industries#48390) Only raise Windows timer resolution while blocking with timeout (zed-industries#48379) editor: Propagate `buffer_font_features` to signatureHelp popover (zed-industries#48653) Add configurable LSP timeout setting (zed-industries#44745) editor: Use buffer_font for folds and change foreground color (zed-industries#48652) lsp: Update root_path for compatibility with language servers (zed-industries#48587) Fix panic with LSP folds on disappearing excerpts (zed-industries#48649) ...
|
Pleasure!
Makes sense, I completely missed that the sorting happened for every frame - I'm still internalizing the gpui rendering lifecycle (I come from backend dev). Thanks for going ahead and optimizing! |
Key changes: - Side-by-side diff UX improvements (zed-industries#48821) - major diff view polish - Display map refactoring - large cleanup of display_map.rs (~1000 line reduction) - Split editor growth (zed-industries#48753) - significant expansion of split.rs - Multi-char folds fix (zed-industries#48721) - New multi workspace (zed-industries#47795, then reverted zed-industries#48776) - Default view mode setting for SplittableEditor (zed-industries#48440) - macOS drag-drop fix: reset external_files_dragged (zed-industries#48727) - Windows: OS caption/buttons for custom titlebar (zed-industries#48330) - Windows timer resolution guard (zed-industries#48379) - Bedrock Claude Opus 4.6 model (zed-industries#48525) - MCP servers: fix disabled servers disappearing after restart (zed-industries#47758) - Shell command parser extracted to shared crate (zed-industries#48660) - Format-on-save for streaming edit file tool (zed-industries#48663) - Agent: insert images at cursor position (zed-industries#48779) - Project panel: improved file/folder creation in folded paths (zed-industries#46750) - Folding ranges panic fix (zed-industries#48809) - REPL: shutdown all kernels on app quit (zed-industries#48760) - Extension CI improvements - Security updates: time v0.3.47, git2 v0.20.4 Conflict resolution: - collab (Cargo.toml, extensions API, db, tests): deleted - GPUI (8 files): deleted from Glass (handled in Obsydian-HQ/gpui) - Cargo.lock: took upstream Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Closes #42888
Release Notes: