Opus finding
InstallDialog re-fetches detail and wipes user input whenever prefillEnv prop identity changes
- app/src/components/channels/mcp/InstallDialog.tsx:35-58
The effect that calls registryGet has prefillEnv in its dependency array. prefillEnv is an object passed from a parent (McpServersTab passes rightPane.prefillEnv). Because the parent reconstructs the rightPane state object on every state change, the prefillEnv object reference will frequently change, causing this effect to re-run. Each re-run sets loadingDetail=true (which unmounts the form entirely, showing the 'Loading server details...' placeholder) and overwrites envValues with prefill data — discarding anything the user has typed. Even within a stable session, any parent re-render that supplies a new object literal for prefillEnv triggers a full refetch and reset of the user's input.
Recommendation
Either serialize/stabilize prefillEnv via useMemo in the parent, or split the effect: fetch detail only on qualifiedName changes, and apply prefillEnv in a separate effect (or only on first detail load). Prefer keying the prefill-merge by qualifiedName + a stable signature of prefillEnv.