Skip to content

Tools/prompts/resources vanish on connect: capability gate races the connect event #1406

@cliffhall

Description

@cliffhall

Symptom

On the v2 web Inspector, no tools, apps, resources, prompts, or resource templates show for any server after connecting.

Root cause

Regression from #1395. The list-state managers refresh on the `"connect"` event and gate their list RPC on `getCapabilities()`. But `InspectorClient.connect()` dispatched `"connect"` before `fetchServerInfo()` populated `this.capabilities`. `refresh()` runs synchronously up to its first await, so the capability gate executed during the synchronous dispatch, read `undefined` capabilities (reset to undefined on every disconnect), tripped, and wiped every list to empty.

Fix

Dispatch `"connect"` after the awaited `fetchServerInfo()`. See PR #1405.

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions