diff --git a/apps/desktop-ui/src/components/nosql-explorer/explorer-sidebar.tsx b/apps/desktop-ui/src/components/nosql-explorer/explorer-sidebar.tsx
index ed4b39b3..f160e04e 100644
--- a/apps/desktop-ui/src/components/nosql-explorer/explorer-sidebar.tsx
+++ b/apps/desktop-ui/src/components/nosql-explorer/explorer-sidebar.tsx
@@ -528,7 +528,12 @@ export function ExplorerSidebar({
) : filteredConnections.length === 0 ? (
{t("noConnectionsFound")}
) : (
- visibleConnections.map((node, index) => (
+ visibleConnections.map((node) => {
+ // `visibleConnections` is filtered+sliced, so its map index does NOT
+ // match the real `connections` array that every handler indexes into.
+ // Derive the real index from the stable connection id.
+ const index = connections.findIndex(c => c.connection.id === node.connection.id);
+ return (
{editingConnectionId === node.connection.id ? (
@@ -797,7 +802,8 @@ export function ExplorerSidebar({
)}
- ))
+ );
+ })
)}
{nosqlHasMore && (