Skip to content

[HIGH] Auto Setup crashes if regenerated client list no longer contains the clicked integration #75

Description

@Daliys

Problem

AutoSetupIntegration assumes a regenerated config-client list still contains the clicked client kind and uses First(...), which throws if the item is absent.

Evidence

  • Editor/MCPServerWindow.Integrations.cs:96-110 receives a previously rendered client.
  • It redeploys the bridge, then calls NexusMcpConfigGenerator.BuildAllForCurrentProject().First(item => item.Kind == client.Kind).
  • If the regenerated list changes shape, First throws InvalidOperationException before the method can report a friendly setup failure.

Impact

A transient PATH/filesystem condition or future conditional client filtering can make the Auto Setup button handler crash instead of showing the user a clear failure message.

Suggested fix

Use FirstOrDefault, check for null, and surface a friendly integration message when the client kind is no longer available. Ideally avoid rebuilding the list unless needed.

Source report

Imported from audit report item: correctness (11) / Editor/MCPServerWindow.Integrations.cs:110.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageImported or reported issue awaiting owner reviewpriority: highMajor broken workflow or broad compatibility failuresurface: integrationsCLI installer and external tool integration surfacesurface: uiEditor UI Toolkit automation and window workflowstype: correctnessIncorrect result, bad validation, or misleading success/failure behavior

    Type

    No type

    Fields

    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