From 7b06c2033ccd7cdb024a6b39c06d3eeef4635d82 Mon Sep 17 00:00:00 2001 From: Viktor Avelino <64113566+viktoravelino@users.noreply.github.com> Date: Thu, 16 Apr 2026 14:29:24 -0400 Subject: [PATCH] fix(frontend): filter duplicate draft/live connections in deploy modal (#12724) * fix(frontend): filter duplicate draft/live connections in deploy modal Connections with same app_id can exist as both draft and live, causing both to appear selected simultaneously. Filter to draft-only and add environment badge for clarity. LFOSS-3373 * fix: remove connection environment badge (cherry picked from commit 899f82de5bc53512a7b4a796d3bbb4a3ef74f127) --- .../deploymentsPage/components/step-attach-flows.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/pages/MainPage/pages/deploymentsPage/components/step-attach-flows.tsx b/src/frontend/src/pages/MainPage/pages/deploymentsPage/components/step-attach-flows.tsx index b14698ee0a..1beac14672 100644 --- a/src/frontend/src/pages/MainPage/pages/deploymentsPage/components/step-attach-flows.tsx +++ b/src/frontend/src/pages/MainPage/pages/deploymentsPage/components/step-attach-flows.tsx @@ -78,16 +78,17 @@ export default function StepAttachFlows() { return; seededExistingConnections.current = true; - const existingConnections: ConnectionItem[] = configsData.configs.map( - (cfg) => ({ + const existingConnections: ConnectionItem[] = configsData.configs + .filter((cfg) => cfg.environment !== "live") + .map((cfg) => ({ id: cfg.app_id, connectionId: cfg.connection_id, name: cfg.app_id, + environment: cfg.environment, variableCount: 0, isNew: false, environmentVariables: {}, - }), - ); + })); setConnections((prev) => { // Avoid duplicates if user already created connections with the same id