Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvement: relocate org encryption to settings and refine org nav

Scott Wilsona6ed871c490b
diff --git a/frontend/src/components/v3/generic/Sidebar/Sidebar.tsx b/frontend/src/components/v3/generic/Sidebar/Sidebar.tsx
index 9108b052f4..67fe7ece31 100644
--- a/frontend/src/components/v3/generic/Sidebar/Sidebar.tsx
+++ b/frontend/src/components/v3/generic/Sidebar/Sidebar.tsx
@@ -508,6 +508,7 @@ function SidebarCollapsibleGroup({
label,
collapsedLabel,
defaultOpen = true,
+ collapsible = true,
children,
className
}: {
@@ -515,6 +516,8 @@ function SidebarCollapsibleGroup({
/** Short label shown when the sidebar is collapsed. Defaults to initials of the label. */
collapsedLabel?: string;
defaultOpen?: boolean;
+ /** When false, the group is always expanded and renders a static (non-clickable) label. */
+ collapsible?: boolean;
children: React.ReactNode;
className?: string;
}) {
@@ -524,8 +527,11 @@ function SidebarCollapsibleGroup({
const contentRef = React.useRef<HTMLDivElement>(null);
const previousHasActiveChildRef = React.useRef<boolean | undefined>(undefined);
+ // A non-collapsible group is always open.
+ const open = collapsible ? isOpen : true;
+
React.useEffect(() => {
- if (isCollapsed) return;
+ if (isCollapsed || !collapsible) return;
const hasActiveChild = !!contentRef.current?.querySelector('[data-active="true"]');
const previous = previousHasActiveChildRef.current;
if (hasActiveChild && previous !== true && !isOpen) {
@@ -541,6 +547,24 @@ function SidebarCollapsibleGroup({
.map((w) => w[0])
.join("");
+ const expandedHeader = collapsible ? (
+ <button
+ type="button"
+ aria-expanded={isOpen}
+ onClick={() => setIsOpen((prev) => !prev)}
+ className="flex h-7 shrink-0 cursor-pointer items-center gap-1 px-4 text-xs font-medium tracking-wide text-muted outline-hidden transition-colors select-none hover:text-muted focus-visible:ring-2 focus-visible:ring-sidebar-ring"
+ >
+ <span className="truncate">{label}</span>
+ <ChevronDown
+ className={cn("size-3 shrink-0 transition-transform duration-200", !isOpen && "-rotate-90")}
+ />
+ </button>
+ ) : (
+ <div className="flex h-7 shrink-0 items-center gap-1 px-4 text-xs font-medium tracking-wide text-muted select-none">
+ <span className="truncate">{label}</span>
+ </div>
+ );
+
return (
<SidebarGroup className={cn(isCollapsed ? "mt-1" : "mt-3", className)}>
{isCollapsed ? (
@@ -561,27 +585,14 @@ function SidebarCollapsibleGroup({
</TooltipContent>
</Tooltip>
) : (
- <button
- type="button"
- aria-expanded={isOpen}
- onClick={() => setIsOpen((prev) => !prev)}
- className="flex h-7 shrink-0 cursor-pointer items-center gap-1 px-4 text-[0.65rem] font-semibold tracking-wide text-muted/60 outline-hidden transition-colors select-none hover:text-muted focus-visible:ring-2 focus-visible:ring-sidebar-ring"
- >
- <span className="truncate uppercase">{label}</span>
- <ChevronDown
- className={cn(
- "size-3 shrink-0 transition-transform duration-200",
- !isOpen && "-rotate-90"
- )}
- />
- </button>
+ expandedHeader
)}
<div
// eslint-disable-next-line @typescript-eslint/no-explicit-any
- {...(!isCollapsed && !isOpen ? { inert: "" as any } : {})}
+ {...(!isCollapsed && !open ? { inert: "" as any } : {})}
className={cn(
"grid transition-[grid-template-rows,opacity] duration-200 ease-in-out",
- isCollapsed || isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
+ isCollapsed || open ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
)}
>
<div ref={contentRef} className="overflow-hidden">
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgNav.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgNav.tsx
index bb86595781..ef27209ee5 100644
--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgNav.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgNav.tsx
@@ -37,6 +37,7 @@ export const OrgNav = () => {
const groups: OrgNavGroup[] = [
{
label: "General",
+ collapsible: false,
items: [
{
label: "Home",
@@ -97,6 +98,7 @@ export const OrgNav = () => {
<SidebarCollapsibleGroup
key={group.label}
label={group.label}
+ collapsible={group.collapsible}
defaultOpen={group.defaultOpen}
>
<OrgNavList items={group.items} onOpenSubmenu={handleOpenSettings} />
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSubmenuView.tsx b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSubmenuView.tsx
index bbc7903c5d..4744ce8d96 100644
--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSubmenuView.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/OrgSubmenuView.tsx
@@ -1,6 +1,7 @@
import {
ChevronLeft,
Cog,
+ KeyRound,
LayoutTemplate,
Lock,
Network,
@@ -51,6 +52,12 @@ export const OrgSettingsSubmenuView = ({ onBack }: { onBack: () => void }) => {
search: { selectedTab: "tab-org-security" },
hidden: isSubOrganization
},
+ {
+ label: "Encryption",
+ icon: KeyRound,
+ pathSuffix: "settings",
+ search: { selectedTab: "tab-org-encryption" }
+ },
{
label: "Project Templates",
icon: LayoutTemplate,
diff --git a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/types.ts b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/types.ts
index 76dd8b9702..51b2876a2b 100644
--- a/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/types.ts
+++ b/frontend/src/layouts/OrganizationLayout/components/OrgSidebar/types.ts
@@ -64,4 +64,6 @@ export type OrgNavGroup = {
label: string;
items: OrgNavItem[];
defaultOpen?: boolean;
+ /** When false, the group is always expanded and its label is not clickable. */
+ collapsible?: boolean;
};
diff --git a/frontend/src/pages/organization/AuditLogsPage/AuditLogsPage.tsx b/frontend/src/pages/organization/AuditLogsPage/AuditLogsPage.tsx
index 42f8ff8090..1fda83b6e4 100644
--- a/frontend/src/pages/organization/AuditLogsPage/AuditLogsPage.tsx
+++ b/frontend/src/pages/organization/AuditLogsPage/AuditLogsPage.tsx
@@ -25,7 +25,7 @@ export const AuditLogsPage = () => {
const tabs = [
{ key: AuditLogsPageTabs.AuditLogs, label: "Audit Logs", component: AuditLogsTab },
- { key: AuditLogsPageTabs.Streams, label: "Streams", component: AuditLogStreamsTab }
+ { key: AuditLogsPageTabs.Streams, label: "External Log Streams", component: AuditLogStreamsTab }
];
const activeTab = tabs.some((tab) => tab.key === selectedTab)
diff --git a/frontend/src/pages/organization/IntegrationsPage/IntegrationsPage.tsx b/frontend/src/pages/organization/IntegrationsPage/IntegrationsPage.tsx
index 9a9a92305c..2ba8e6b745 100644
--- a/frontend/src/pages/organization/IntegrationsPage/IntegrationsPage.tsx
+++ b/frontend/src/pages/organization/IntegrationsPage/IntegrationsPage.tsx
@@ -13,7 +13,6 @@ import {
import { withPermission } from "@app/hoc";
import { AppConnectionsTable } from "@app/pages/organization/AppConnections/AppConnectionsPage/components";
import { ExternalMigrationsTab } from "@app/pages/organization/SettingsPage/components/ExternalMigrationsTab";
-import { OrgEncryptionTab } from "@app/pages/organization/SettingsPage/components/OrgEncryptionTab";
import { OrgOauthClientsTab } from "@app/pages/organization/SettingsPage/components/OrgOauthClientsTab";
import { OrgWorkflowIntegrationTab } from "@app/pages/organization/SettingsPage/components/OrgWorkflowIntegrationTab";
import { IntegrationsListPageTabs } from "@app/types/integrations";
@@ -53,7 +52,6 @@ export const IntegrationsPage = () => {
label: "App Connections",
component: AppConnectionsTab
},
- { key: "encryption", label: "Encryption", component: OrgEncryptionTab },
{
key: "workflow-integrations",
label: "Workflow Integrations",
diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgTabGroup/OrgTabGroup.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgTabGroup/OrgTabGroup.tsx
index 1254222ae9..ac1a95868f 100644
--- a/frontend/src/pages/organization/SettingsPage/components/OrgTabGroup/OrgTabGroup.tsx
+++ b/frontend/src/pages/organization/SettingsPage/components/OrgTabGroup/OrgTabGroup.tsx
@@ -7,6 +7,7 @@ import { PageHeader, TabPanel, Tabs } from "@app/components/v2";
import { ROUTE_PATHS } from "@app/const/routes";
import { useOrganization, useSubscription } from "@app/context";
+import { OrgEncryptionTab } from "../OrgEncryptionTab";
import { OrgGeneralTab } from "../OrgGeneralTab";
import { OrgProductSettingsTab } from "../OrgProductSettingsTab";
import { OrgSecurityTab } from "../OrgSecurityTab";
@@ -29,6 +30,11 @@ export const OrgTabGroup = () => {
component: OrgSecurityTab,
isHidden: isSubOrganization
},
+ {
+ name: "Encryption",
+ key: "tab-org-encryption",
+ component: OrgEncryptionTab
+ },
{
name: "Project Templates",
key: "project-templates",
diff --git a/frontend/src/pages/organization/SettingsPage/route.tsx b/frontend/src/pages/organization/SettingsPage/route.tsx
index 9c1ae8cdcd..7f6df8d3ec 100644
--- a/frontend/src/pages/organization/SettingsPage/route.tsx
+++ b/frontend/src/pages/organization/SettingsPage/route.tsx
@@ -11,7 +11,6 @@ const SettingsPageQueryParams = z.object({
// These tabs moved to dedicated pages; keep old deep links (bookmarks, backend
// redirects like the Slack install and SCIM setup flows) working.
const MOVED_SETTINGS_TABS: Record<string, { to: string; selectedTab: string }> = {
- "tab-org-encryption": { to: "/organizations/$orgId/integrations", selectedTab: "encryption" },
"workflow-integrations": {
to: "/organizations/$orgId/integrations",
selectedTab: "workflow-integrations"