Skip to content

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

feat(pam): add thin scrollbar to query tab bar and limit open tabs to 20

bernie-gea5059a831eb
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 0c5152cb2f..f1d4b8a33b 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -302,6 +302,7 @@
@utility thin-scrollbar {
&::-webkit-scrollbar {
width: 0.25rem;
+ height: 0.25rem;
background-color: transparent;
}
diff --git a/frontend/src/pages/pam/PamDataExplorerPage/PamDataExplorerPage.tsx b/frontend/src/pages/pam/PamDataExplorerPage/PamDataExplorerPage.tsx
index 36fde710eb..9984d3716d 100644
--- a/frontend/src/pages/pam/PamDataExplorerPage/PamDataExplorerPage.tsx
+++ b/frontend/src/pages/pam/PamDataExplorerPage/PamDataExplorerPage.tsx
@@ -407,7 +407,7 @@ export const PamDataExplorerPage = () => {
/>
<div className="flex flex-1 flex-col overflow-hidden">
- <div className="flex shrink-0 items-center overflow-x-auto border-b border-mineshaft-600 bg-mineshaft-800">
+ <div className="thin-scrollbar flex shrink-0 items-center overflow-x-auto border-b border-mineshaft-600 bg-mineshaft-800">
<button
type="button"
onClick={() => setActiveTab(BROWSE_TAB_ID)}
diff --git a/frontend/src/pages/pam/PamDataExplorerPage/use-query-tabs.ts b/frontend/src/pages/pam/PamDataExplorerPage/use-query-tabs.ts
index 33d9d67dbf..dd2afa5c2e 100644
--- a/frontend/src/pages/pam/PamDataExplorerPage/use-query-tabs.ts
+++ b/frontend/src/pages/pam/PamDataExplorerPage/use-query-tabs.ts
@@ -13,6 +13,7 @@ type TabState = {
};
export const BROWSE_TAB_ID = "browse";
+const MAX_QUERY_TABS = 20;
const DEFAULT_STATE: TabState = { tabs: [], activeTabId: BROWSE_TAB_ID, nextTabNumber: 1 };
@@ -21,6 +22,7 @@ export function useQueryTabs() {
const addTab = () => {
setState((prev) => {
+ if (prev.tabs.length >= MAX_QUERY_TABS) return prev;
const newTab: QueryTab = {
id: crypto.randomUUID(),
title: `Query ${prev.nextTabNumber}`,