From 0d0f67dd35d1025621c81fc8a1277d519889fbc6 Mon Sep 17 00:00:00 2001 From: Carlos Monastyrski Date: Wed, 15 Oct 2025 14:53:02 -0300 Subject: [PATCH] Fix secret imports fetch secret value, and reserved folders not being computed correctly --- .../SecretImportListView.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretImportListView/SecretImportListView.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretImportListView/SecretImportListView.tsx index 7fbbc9436..d8e14b809 100644 --- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretImportListView/SecretImportListView.tsx +++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretImportListView/SecretImportListView.tsx @@ -73,13 +73,13 @@ export const computeImportedSecretRows = ( isEmpty?: boolean; }[] = []; - importedSec.secrets.forEach(({ key, value, env, path, isEmpty }) => { + importedSec.secrets.forEach(({ key, value, isEmpty }) => { if (!importedEntry[key]) { importedSecretEntries.push({ key, value, - environment: env, - secretPath: path, + environment: importedSec.environmentInfo.slug, + secretPath: importedSec.secretPath, overridden: overridenSec?.[key], isEmpty }); @@ -125,6 +125,12 @@ export const SecretImportListView = ({ const [items, setItems] = useState(secretImports ?? []); + const getImportReplicatedFolder = (importPath: string) => { + const cleanImportPath = importPath.replace("/__reserve_replication_", ""); + const replicatedFolder = items?.find(({ id }) => id === cleanImportPath); + return replicatedFolder; + }; + useEffect(() => { if (!isFetching) { setItems(secretImports ?? []); @@ -204,6 +210,7 @@ export const SecretImportListView = ({ {items?.map((item) => { // TODO(akhilmhdh): change this and pass this whole object instead of one by one + const replicatedFolder = item.isReserved ? getImportReplicatedFolder(item.importPath) : undefined; return (