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
fix(frontend): align expanded secret manager rows (#8242)
Andrew Huang0940ebac99d5
diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/DynamicSecretTableRow/DynamicSecretTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/DynamicSecretTableRow/DynamicSecretTableRow.tsxindex 833328b7be..89e6f38b4d 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/DynamicSecretTableRow/DynamicSecretTableRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/DynamicSecretTableRow/DynamicSecretTableRow.tsx@@ -36,6 +36,8 @@ import {TABLE_ROW_ACTION_BUTTON_CLASS_NAME,TABLE_ROW_EXPAND_ICON_CLASS_NAME,TABLE_ROW_EXPANDED_ICON_CLASS_NAME,+ TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME,+ TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME,TABLE_ROW_RESOURCE_ICON_CLASS_NAME} from "../tableRowActionStyles";@@ -373,8 +375,10 @@ export const DynamicSecretTableRow = ({<TableHeader className="bg-container-hover"><TableRow><TableHead aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableHead className="w-full">Environment</TableHead>- <TableHead variant="action" className="w-px" />+ <TableHead className={TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME}>+ Environment+ </TableHead>+ <TableHead className="w-full" /></TableRow></TableHeader><TableBody>@@ -389,10 +393,12 @@ export const DynamicSecretTableRow = ({return (<TableRow key={slug} className="group relative hover:z-10"><TableCell aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableCell colSpan={2}>+ <TableCell className={TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME}>+ {envName}+ </TableCell>+ <TableCell><div className="relative flex w-full flex-wrap items-center pr-40">- <span>{envName}</span>- <Badge variant="neutral" className="ml-2">+ <Badge variant="neutral">{dynamicSecretProviderRegistry.requireDefinition(dynamicSecret.typediff --git a/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsxindex 3f75623c2c..e79fea646f 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/HoneyTokenTableRow/HoneyTokenTableRow.tsx@@ -46,6 +46,8 @@ import {TABLE_ROW_ACTION_BUTTON_CLASS_NAME,TABLE_ROW_EXPAND_ICON_CLASS_NAME,TABLE_ROW_EXPANDED_ICON_CLASS_NAME,+ TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME,+ TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME,TABLE_ROW_RESOURCE_ICON_CLASS_NAME} from "../tableRowActionStyles";@@ -194,7 +196,10 @@ export const HoneyTokenTableRow = ({);};- const renderHoneyTokenInlineDetails = (honeyToken: TDashboardHoneyToken) => {+ const renderHoneyTokenInlineDetails = (+ honeyToken: TDashboardHoneyToken,+ isExpandedRow = false+ ) => {const tokenInfo = HONEY_TOKEN_MAP[honeyToken.type as HoneyTokenType];const mappedKeys = Object.values(honeyToken.secretsMapping || {});@@ -203,7 +208,10 @@ export const HoneyTokenTableRow = ({{tokenInfo && (<Badgevariant="neutral"- className="mx-2.5 bg-[color-mix(in_srgb,var(--color-neutral)_15%,var(--color-container))]"+ className={twMerge(+ "mr-2.5 bg-[color-mix(in_srgb,var(--color-neutral)_15%,var(--color-container))]",+ !isExpandedRow && "ml-2.5"+ )}><ProviderIconicon={tokenInfo.image}@@ -366,8 +374,10 @@ export const HoneyTokenTableRow = ({<TableHeader className="bg-container-hover"><TableRow><TableHead aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableHead className="w-full">Environment</TableHead>- <TableHead variant="action" className="w-px" />+ <TableHead className={TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME}>+ Environment+ </TableHead>+ <TableHead className="w-full" /></TableRow></TableHeader><TableBody>@@ -389,16 +399,18 @@ export const HoneyTokenTableRow = ({)}><TableCell aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableCell colSpan={2}>+ <TableCell className={TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME}>+ <span+ className={twMerge(+ honeyToken.status === HoneyTokenStatus.Revoked && "text-muted"+ )}+ >+ {envName}+ </span>+ </TableCell>+ <TableCell><div className="relative flex w-full items-center">- <span- className={twMerge(- honeyToken.status === HoneyTokenStatus.Revoked && "text-muted"- )}- >- {envName}- </span>- {renderHoneyTokenInlineDetails(honeyToken)}+ {renderHoneyTokenInlineDetails(honeyToken, true)}<divclassName={twMerge("ml-auto flex items-center transition-[margin] duration-300 motion-reduce:transition-none [@media(hover:hover)]:mr-0",diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/ProxiedServiceTableRow/ProxiedServiceTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/ProxiedServiceTableRow/ProxiedServiceTableRow.tsxindex d55027ed37..e4639cd385 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/ProxiedServiceTableRow/ProxiedServiceTableRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/ProxiedServiceTableRow/ProxiedServiceTableRow.tsx@@ -37,6 +37,8 @@ import {TABLE_ROW_ACTION_BUTTON_CLASS_NAME,TABLE_ROW_EXPAND_ICON_CLASS_NAME,TABLE_ROW_EXPANDED_ICON_CLASS_NAME,+ TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME,+ TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME,TABLE_ROW_RESOURCE_ICON_CLASS_NAME} from "../tableRowActionStyles";@@ -142,13 +144,13 @@ export const ProxiedServiceTableRow = ({</div>);- const renderInlineDetails = (proxiedService: TDashboardProxiedService) => {+ const renderInlineDetails = (proxiedService: TDashboardProxiedService, isExpandedRow = false) => {const lastUsedLabel = formatLastUsed(proxiedService.lastUsedAt);return (<><span- className="ml-2 max-w-[240px] truncate text-xs text-muted"+ className={twMerge("max-w-[240px] truncate text-xs text-muted", !isExpandedRow && "ml-2")}title={proxiedService.hostPattern}>{proxiedService.hostPattern}@@ -265,8 +267,10 @@ export const ProxiedServiceTableRow = ({<TableHeader className="bg-container-hover"><TableRow><TableHead aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableHead className="w-full">Environment</TableHead>- <TableHead variant="action" className="w-px" />+ <TableHead className={TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME}>+ Environment+ </TableHead>+ <TableHead className="w-full" /></TableRow></TableHeader><TableBody>@@ -278,10 +282,12 @@ export const ProxiedServiceTableRow = ({return (<TableRow key={slug} className="group relative hover:z-10"><TableCell aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableCell colSpan={2}>+ <TableCell className={TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME}>+ {envName}+ </TableCell>+ <TableCell><div className="relative flex w-full items-center">- <span>{envName}</span>- {renderInlineDetails(proxiedService)}+ {renderInlineDetails(proxiedService, true)}<div className="absolute top-1/2 -right-1.5 z-20 -translate-y-1/2">{renderActionButtons(proxiedService)}</div>diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretImportTableRow/SecretImportSecretRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretImportTableRow/SecretImportSecretRow.tsxindex 0fa77635c4..1818351414 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretImportTableRow/SecretImportSecretRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretImportTableRow/SecretImportSecretRow.tsx@@ -2,6 +2,7 @@ import { TriangleAlertIcon } from "lucide-react";import { TableCell, TableRow, Tooltip, TooltipContent, TooltipTrigger } from "@app/components/v3";+import { TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME } from "../tableRowActionStyles";import { SecretImportSecretValueCell } from "./SecretImportSecretValueCell";type Props = {@@ -24,7 +25,7 @@ export const SecretImportSecretRow = ({return (<TableRow className="group"><TableCell aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableCell isTruncatable>+ <TableCell isTruncatable className={TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME}><div className="flex items-center gap-1.5"><span className="truncate">{secretKey}</span>{missingFromEnvs && missingFromEnvs.length > 0 && (diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretImportTableRow/SecretImportTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretImportTableRow/SecretImportTableRow.tsxindex 945daf533b..036c526192 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretImportTableRow/SecretImportTableRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretImportTableRow/SecretImportTableRow.tsx@@ -58,6 +58,7 @@ import {TABLE_ROW_EXPAND_ICON_CLASS_NAME,TABLE_ROW_EXPAND_ICON_TRANSITION_CLASS_NAME,TABLE_ROW_EXPANDED_ICON_CLASS_NAME,+ TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME,TABLE_ROW_RESOURCE_ICON_CLASS_NAME} from "../tableRowActionStyles";import { SecretImportSecretRow } from "./SecretImportSecretRow";@@ -511,7 +512,7 @@ export const SecretImportTableRow = ({if (envsWithImport.length <= 1) return null;return (- <div className="flex flex-wrap items-center gap-2 border-b border-border px-3 py-3 pl-13">+ <div className="flex flex-wrap items-center gap-2 border-b border-border px-3 py-3 pl-11"><span className="text-xs text-muted">Viewing secrets for:</span><Select value={effectiveSelectedEnv} onValueChange={setSelectedReplicationEnv}><SelectTrigger size="sm" onClick={(e) => e.stopPropagation()}>@@ -591,8 +592,8 @@ export const SecretImportTableRow = ({<TableHeader className="bg-container-hover"><TableRow><TableHead aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableHead className="w-1/2">Name</TableHead>- <TableHead className="w-1/2">Value</TableHead>+ <TableHead className={TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME}>Name</TableHead>+ <TableHead className="w-full">Value</TableHead></TableRow></TableHeader><TableBody>@@ -644,8 +645,8 @@ export const SecretImportTableRow = ({<TableHeader className="bg-container-hover"><TableRow><TableHead aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableHead className="w-1/2">Name</TableHead>- <TableHead className="w-1/2">Value</TableHead>+ <TableHead className={TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME}>Name</TableHead>+ <TableHead className="w-full">Value</TableHead></TableRow></TableHeader><TableBody>@@ -680,7 +681,7 @@ export const SecretImportTableRow = ({</TableBody></Table>{hasAnyDiscrepancy && (- <p className="max-w-full px-3 py-3 pl-13 text-xs text-wrap text-warning">+ <p className="max-w-full px-3 py-3 pl-11 text-xs text-wrap text-warning"><TriangleAlertIcon className="mr-1.5 mb-0.5 inline-block size-3 shrink-0" />One or more replicated imports may be out of sync. Secrets marked with a warningindicator are not present across all importing environments. Select a single environment@@ -716,8 +717,8 @@ export const SecretImportTableRow = ({<TableHeader className="bg-container-hover"><TableRow><TableHead aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableHead className="w-1/2">Name</TableHead>- <TableHead className="w-1/2">Value</TableHead>+ <TableHead className={TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME}>Name</TableHead>+ <TableHead className="w-full">Value</TableHead></TableRow></TableHeader><TableBody>@@ -889,8 +890,8 @@ export const SecretImportTableRow = ({style={{ minWidth: tableWidth, maxWidth: tableWidth }}className="sticky left-0 border-y border-border bg-container">- <div className="flex flex-wrap items-center gap-2 border-b border-border px-3 py-3 pl-13">- <span className="text-sm text-muted">Imported in:</span>+ <div className="flex min-h-10 flex-wrap items-center gap-2 border-b border-border px-3 py-1.5 pl-11">+ <span className="text-xs text-muted">Imported in:</span>{environments.filter((env) => isSecretImportInEnv(importEnvSlug, importPath, env.slug)).map(({ name: envName, slug }) => {diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsxindex bcaf502774..64c4106b96 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretRotationTableRow/SecretRotationTableRow.tsx@@ -51,7 +51,9 @@ import {TABLE_ROW_ACTION_BAR_CLASS_NAME,TABLE_ROW_ACTION_BAR_VISIBLE_CLASS_NAME,TABLE_ROW_ACTION_BUTTON_CLASS_NAME,- TABLE_ROW_ACTION_BUTTON_VISIBLE_CLASS_NAME+ TABLE_ROW_ACTION_BUTTON_VISIBLE_CLASS_NAME,+ TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME,+ TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME} from "../tableRowActionStyles";type Props = {@@ -449,8 +451,10 @@ export const SecretRotationTableRow = ({<TableHeader className="bg-container-hover"><TableRow><TableHead aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableHead className="w-full">Environment</TableHead>- <TableHead variant="action" className="w-px" />+ <TableHead className={TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME}>+ Environment+ </TableHead>+ <TableHead className="w-full" /></TableRow></TableHeader><TableBody>@@ -471,10 +475,12 @@ export const SecretRotationTableRow = ({return (<TableRow key={slug} className="group relative hover:z-10"><TableCell aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" />- <TableCell colSpan={2}>+ <TableCell className={TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME}>+ {envName}+ </TableCell>+ <TableCell><div className="relative flex w-full flex-wrap items-center">- <span>{envName}</span>- <Badge variant="neutral" className="mx-2.5">+ <Badge variant="neutral"><ProviderIconicon={image}style={{diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretTableRow.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretTableRow.tsxindex 99efcaefdd..c034e6b419 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretTableRow.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/SecretTableRow/SecretTableRow.tsx@@ -54,7 +54,9 @@ import { pendingActionBorderClass, pendingActionRowClass } from "../pendingActioimport { EnvironmentStatus, ResourceEnvironmentStatusCell } from "../ResourceEnvironmentStatusCell";import {TABLE_ROW_ACTION_BAR_CLASS_NAME,- TABLE_ROW_ACTION_BUTTON_CLASS_NAME+ TABLE_ROW_ACTION_BUTTON_CLASS_NAME,+ TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME,+ TABLE_ROW_NAME_COLUMN_CLASS_NAME} from "../tableRowActionStyles";import { SecretEditTableRow } from "./SecretEditTableRow";import { SecretOverrideRow } from "./SecretOverrideRow";@@ -577,7 +579,7 @@ export const SecretTableRow = ({<TableHead aria-hidden="true" className="w-10 max-w-10 min-w-10 p-0" /><TableHeadisTruncatable- className="w-px min-w-40 lg:min-w-64 xl:min-w-80"+ className={TABLE_ROW_NAME_COLUMN_CLASS_NAME}sortDirection={getExpandedTableSortDirection("environment")}onSortChange={(direction) =>handleExpandedTableSortChange("environment", direction)@@ -631,11 +633,10 @@ export const SecretTableRow = ({/><TableCellisTruncatable- className={- hasOverride- ? "border-l border-b-border/50 border-l-override"- : undefined- }+ className={twMerge(+ TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME,+ hasOverride && "border-l border-b-border/50 border-l-override"+ )}><div className="flex h-8 items-center space-x-2"><Tooltip disableHoverableContent>diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/tableRowActionStyles.ts b/frontend/src/pages/secret-manager/OverviewPage/components/tableRowActionStyles.tsindex 4298b50f0f..9efe02f64f 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/tableRowActionStyles.ts+++ b/frontend/src/pages/secret-manager/OverviewPage/components/tableRowActionStyles.ts@@ -22,3 +22,10 @@ export const TABLE_ROW_EXPAND_ICON_TRANSITION_CLASS_NAME =export const TABLE_ROW_EXPAND_ICON_CLASS_NAME = `block ${TABLE_ROW_EXPAND_ICON_TRANSITION_CLASS_NAME} [@media(hover:hover)]:hidden [@media(hover:hover)]:group-hover:block [@media(hover:hover)]:group-focus-within:block`;export const TABLE_ROW_EXPANDED_ICON_CLASS_NAME = `block rotate-90 ${TABLE_ROW_EXPAND_ICON_TRANSITION_CLASS_NAME}`;++export const TABLE_ROW_NAME_COLUMN_CLASS_NAME =+ "w-60 max-w-60 min-w-60 lg:w-96 lg:max-w-96 lg:min-w-96";++export const TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME = `${TABLE_ROW_NAME_COLUMN_CLASS_NAME} pl-1`;++export const TABLE_ROW_NAME_CELL_COLUMN_CLASS_NAME = TABLE_ROW_NAME_HEADER_COLUMN_CLASS_NAME;