Skip to content

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

fix(pam): fix horizontal scrollbar on query tab bar without modifying shared utility

bernie-g06493c141eef
diff --git a/docs/documentation/platform/pam/product-reference/web-access/postgresql.mdx b/docs/documentation/platform/pam/product-reference/web-access/postgresql.mdx
index a0012c73b0..08e6d6ba54 100644
--- a/docs/documentation/platform/pam/product-reference/web-access/postgresql.mdx
+++ b/docs/documentation/platform/pam/product-reference/web-access/postgresql.mdx
@@ -40,6 +40,8 @@ Once connected, you get a spreadsheet-like interface for your database where you
The SQL query runner lets you run arbitrary SQL against your database without leaving the browser.
+![SQL Query Runner](/images/pam/product-reference/web-access/pg-sql-query-runner.png)
+
### Usage
Click the **+** button in the tab bar to open a new query tab. Each tab has its own SQL editor and results panel.
diff --git a/frontend/src/components/v3/generic/DataGrid/data-grid-context-menu.tsx b/frontend/src/components/v3/generic/DataGrid/data-grid-context-menu.tsx
index d7910ddf69..dcc61b0047 100644
--- a/frontend/src/components/v3/generic/DataGrid/data-grid-context-menu.tsx
+++ b/frontend/src/components/v3/generic/DataGrid/data-grid-context-menu.tsx
@@ -38,7 +38,6 @@ export function DataGridContextMenu<TData>({
return (
// eslint-disable-next-line @typescript-eslint/no-use-before-define
<ContextMenu
- tableMeta={tableMeta}
columns={columns}
dataGridRef={dataGridRef}
contextMenu={contextMenu}
@@ -65,7 +64,6 @@ interface ContextMenuProps<TData>
| "readOnly"
>,
Required<Pick<TableMeta<TData>, "contextMenu">> {
- tableMeta: TableMeta<TData>;
columns: Array<ColumnDef<TData>>;
}
@@ -84,7 +82,6 @@ const ContextMenu = React.memo(ContextMenuImpl, (prev, next) => {
}) as typeof ContextMenuImpl;
function ContextMenuImpl<TData>({
- tableMeta,
columns,
dataGridRef,
contextMenu,
diff --git a/frontend/src/index.css b/frontend/src/index.css
index f1d4b8a33b..0c5152cb2f 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -302,7 +302,6 @@
@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 8022a627ba..1254e9523d 100644
--- a/frontend/src/pages/pam/PamDataExplorerPage/PamDataExplorerPage.tsx
+++ b/frontend/src/pages/pam/PamDataExplorerPage/PamDataExplorerPage.tsx
@@ -61,7 +61,8 @@ export const PamDataExplorerPage = () => {
const [approvalJustification, setApprovalJustification] = useState("");
- const { tabs, activeTabId, atTabLimit, addTab, closeTab, setActiveTab, updateTabSql } = useQueryTabs();
+ const { tabs, activeTabId, atTabLimit, addTab, closeTab, setActiveTab, updateTabSql } =
+ useQueryTabs();
const [isInTransaction, setIsInTransaction] = useState(false);
const {
@@ -408,7 +409,7 @@ export const PamDataExplorerPage = () => {
/>
<div className="flex flex-1 flex-col overflow-hidden">
- <div className="thin-scrollbar flex shrink-0 items-center overflow-x-auto border-b border-mineshaft-600 bg-mineshaft-800">
+ <div className="flex thin-scrollbar shrink-0 items-center overflow-x-auto border-b border-mineshaft-600 bg-mineshaft-800 [&::-webkit-scrollbar]:h-1">
<button
type="button"
onClick={() => setActiveTab(BROWSE_TAB_ID)}
diff --git a/frontend/src/pages/pam/PamDataExplorerPage/components/QueryPanel.tsx b/frontend/src/pages/pam/PamDataExplorerPage/components/QueryPanel.tsx
index dc1820c6c7..1bb7103a1a 100644
--- a/frontend/src/pages/pam/PamDataExplorerPage/components/QueryPanel.tsx
+++ b/frontend/src/pages/pam/PamDataExplorerPage/components/QueryPanel.tsx
@@ -28,7 +28,15 @@ type Props = {
onTransactionStateChange: (open: boolean) => void;
};
-export function QueryPanel({ tab, executeQuery, cancelQuery, tableDetail, isInTransaction, onSqlChange, onTransactionStateChange }: Props) {
+export function QueryPanel({
+ tab,
+ executeQuery,
+ cancelQuery,
+ tableDetail,
+ isInTransaction,
+ onSqlChange,
+ onTransactionStateChange
+}: Props) {
const [isRunning, setIsRunning] = useState(false);
const [result, setResult] = useState<QueryResult | null>(null);
const [error, setError] = useState<string | null>(null);
diff --git a/frontend/src/pages/pam/PamDataExplorerPage/components/QueryResultsTable.tsx b/frontend/src/pages/pam/PamDataExplorerPage/components/QueryResultsTable.tsx
index 7a8d83b70c..dd4d0e89b0 100644
--- a/frontend/src/pages/pam/PamDataExplorerPage/components/QueryResultsTable.tsx
+++ b/frontend/src/pages/pam/PamDataExplorerPage/components/QueryResultsTable.tsx
@@ -157,9 +157,7 @@ export function QueryResultsTable({ result, error, isRunning, tableDetail }: Pro
<div className="flex h-full flex-col items-center justify-center gap-2">
<span className="rounded bg-mineshaft-700 px-3 py-1.5 font-mono text-sm text-mineshaft-200">
{message}
- {isMutation && (
- <span className="ml-2 text-mineshaft-400">· No rows returned</span>
- )}
+ {isMutation && <span className="ml-2 text-mineshaft-400">· No rows returned</span>}
</span>
</div>
);
diff --git a/frontend/src/pages/pam/PamDataExplorerPage/components/QueryToolbar.tsx b/frontend/src/pages/pam/PamDataExplorerPage/components/QueryToolbar.tsx
index 195aaa7ffa..874d713a13 100644
--- a/frontend/src/pages/pam/PamDataExplorerPage/components/QueryToolbar.tsx
+++ b/frontend/src/pages/pam/PamDataExplorerPage/components/QueryToolbar.tsx
@@ -50,9 +50,7 @@ export function QueryToolbar({
>
<PlayIcon className="size-3" />
{hasSelection ? "Run Selection" : "Run"}
- {!isRunning && (
- <span className="opacity-60">{isMac ? "⌘" : "Ctrl"} ↵</span>
- )}
+ {!isRunning && <span className="opacity-60">{isMac ? "⌘" : "Ctrl"} ↵</span>}
</Button>
{isRunning && (
<Button size="xs" variant="outline" onClick={onCancel} className="gap-1.5">