Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: removed trailing slash from secret input and fixed overview not showing nested imported secrets
=9a2355fe6364
diff --git a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx b/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsxindex 9dfb5ff623..b453456d79 100644--- a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx+++ b/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx@@ -78,7 +78,8 @@ export const SecretPathInput = ({const validPaths = inputValue.split("/");validPaths.pop();- const newValue = `${validPaths.join("/")}/${suggestions[selectedIndex]}/`;+ // removed trailing slash+ const newValue = `${validPaths.join("/")}/${suggestions[selectedIndex]}`;onChange?.(newValue);setInputValue(newValue);setSecretPath(newValue);diff --git a/frontend/src/hooks/api/secretImports/queries.tsx b/frontend/src/hooks/api/secretImports/queries.tsxindex 2879c859bf..701a205435 100644--- a/frontend/src/hooks/api/secretImports/queries.tsx+++ b/frontend/src/hooks/api/secretImports/queries.tsx@@ -264,13 +264,12 @@ export const useGetImportedSecretsAllEnvs = ({});const isImportedSecretPresentInEnv = useCallback(- (secPath: string, envSlug: string, secretName: string) => {+ (envSlug: string, secretName: string) => {const selectedEnvIndex = environments.indexOf(envSlug);if (selectedEnvIndex !== -1) {- const isPresent = secretImports?.[selectedEnvIndex]?.data?.find(- ({ secretPath, secrets }) =>- secretPath === secPath && secrets.some((s) => s.key === secretName)+ const isPresent = secretImports?.[selectedEnvIndex]?.data?.find(({ secrets }) =>+ secrets.some((s) => s.key === secretName));return Boolean(isPresent);diff --git a/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretOverviewTableRow.tsx b/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretOverviewTableRow.tsxindex f1476c167d..5e6342d2c2 100644--- a/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretOverviewTableRow.tsx+++ b/frontend/src/views/SecretOverviewPage/components/SecretOverviewTableRow/SecretOverviewTableRow.tsx@@ -29,7 +29,7 @@ type Props = {onSecretCreate: (env: string, key: string, value: string) => Promise<void>;onSecretUpdate: (env: string, key: string, value: string, secretId?: string) => Promise<void>;onSecretDelete: (env: string, key: string, secretId?: string) => Promise<void>;- isImportedSecretPresentInEnv: (name: string, env: string, secretName: string) => boolean;+ isImportedSecretPresentInEnv: (env: string, secretName: string) => boolean;};export const SecretOverviewTableRow = ({@@ -53,9 +53,8 @@ export const SecretOverviewTableRow = ({<><Tr isHoverable isSelectable onClick={() => setIsFormExpanded.toggle()} className="group"><Td- className={`sticky left-0 z-10 bg-mineshaft-800 bg-clip-padding py-0 px-0 group-hover:bg-mineshaft-700 ${- isFormExpanded && "border-t-2 border-mineshaft-500"- }`}+ className={`sticky left-0 z-10 bg-mineshaft-800 bg-clip-padding py-0 px-0 group-hover:bg-mineshaft-700 ${isFormExpanded && "border-t-2 border-mineshaft-500"+ }`}><div className="h-full w-full border-r border-mineshaft-600 py-2.5 px-5"><div className="flex items-center space-x-5">@@ -83,7 +82,7 @@ export const SecretOverviewTableRow = ({{environments.map(({ slug }, i) => {const secret = getSecretByKey(slug, secretKey);- const isSecretImported = isImportedSecretPresentInEnv(secretPath, slug, secretKey);+ const isSecretImported = isImportedSecretPresentInEnv(slug, secretKey);const isSecretPresent = Boolean(secret);const isSecretEmpty = secret?.value === "";@@ -108,8 +107,8 @@ export const SecretOverviewTableRow = ({isSecretPresent? "Present secret": isSecretImported- ? "Imported secret"- : "Missing secret"+ ? "Imported secret"+ : "Missing secret"}><FontAwesomeIcon@@ -133,9 +132,8 @@ export const SecretOverviewTableRow = ({<Tr><TdcolSpan={totalCols}- className={`bg-bunker-600 px-0 py-0 ${- isFormExpanded && "border-b-2 border-mineshaft-500"- }`}+ className={`bg-bunker-600 px-0 py-0 ${isFormExpanded && "border-b-2 border-mineshaft-500"+ }`}><divclassName="ml-2 p-2"@@ -180,11 +178,7 @@ export const SecretOverviewTableRow = ({const secret = getSecretByKey(slug, secretKey);const isCreatable = !secret;- const isImportedSecret = isImportedSecretPresentInEnv(- secretPath,- slug,- secretKey- );+ const isImportedSecret = isImportedSecretPresentInEnv(slug, secretKey);return (<tr