Skip to content

fix(app): decouple MCP resource refresh from toggle - #48391

Closed
mapix-etnc wants to merge 1 commit into
anomalyco:devfrom
mapix-etnc:desktop-mcp-toggle
Closed

mapix-etnc wants to merge 1 commit into
anomalyco:devfrom
mapix-etnc:desktop-mcp-toggle

Conversation

@mapix-etnc

Copy link
Copy Markdown

Issue for this PR

Fixes #48386

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

After an MCP toggle connects, the Desktop UI now awaits only the MCP status refresh. Resource catalog discovery runs as a non-blocking best-effort refresh, so a slow or unsupported resources/list from any connected server cannot block the toggle or make it appear to fail. Resource refresh rejections are caught so they do not become unhandled rejections.

The regression tests cover the three toggle actions, pending connections, non-blocking resource discovery, and a rejected refreshResources() call.

How did you verify your code works?

  • cd packages/app && bun test --conditions=solid --preload ./happydom.ts ./src/context/global-sync/mcp.test.ts
  • bun --cwd packages/app typecheck
  • bunx prettier --check packages/app/src/context/global-sync/mcp.ts packages/app/src/context/global-sync/mcp.test.ts packages/app/src/context/server-sync.tsx
  • Pre-push bun turbo typecheck

Screenshots / recordings

Not applicable; this is a behavior-only fix with no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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.

Desktop MCP toggle can fail or block on resource catalog refresh

2 participants