Compare commits

...
Author SHA1 Message Date
Cursor AgentandJulius Marminge 0bab6801ec Compare discovered SSH row props by value
Co-authored-by: Julius Marminge <[email protected]>
2026-06-25 16:34:00 +00:00
Cursor AgentandJulius Marminge 509ac3fa68 Avoid rerendering suggested SSH host rows
Co-authored-by: Julius Marminge <[email protected]>
2026-06-25 16:29:17 +00:00
@@ -1561,7 +1561,22 @@ const DesktopSshHostRow = memo(function DesktopSshHostRow({
</div>
</div>
);
});
}, areDesktopSshHostRowPropsEqual);
function areDesktopSshHostRowPropsEqual(
previous: Readonly<DesktopSshHostRowProps>,
next: Readonly<DesktopSshHostRowProps>,
): boolean {
return (
previous.connectingHostAlias === next.connectingHostAlias &&
previous.onConnect === next.onConnect &&
previous.target.alias === next.target.alias &&
previous.target.hostname === next.target.hostname &&
previous.target.username === next.target.username &&
previous.target.port === next.target.port &&
previous.target.source === next.target.source
);
}
function CloudLinkSwitch({
checked,
@@ -2749,7 +2764,7 @@ export function ConnectionsSettings() {
key={`${target.alias}:${target.hostname}:${target.port ?? ""}`}
target={target}
connectingHostAlias={connectingSshHostAlias}
onConnect={(nextTarget) => void handleConnectSshHost(nextTarget)}
onConnect={handleConnectSshHost}
/>
))}
{hasLoadedDiscoveredSshHosts &&