Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix(frontend): align instance and database table rows (#21490)

p0ny14d6dd1c93c9
diff --git a/docs/agents/frontend-ux.md b/docs/agents/frontend-ux.md
index 05fc993575..b0b309ac3e 100644
--- a/docs/agents/frontend-ux.md
+++ b/docs/agents/frontend-ux.md
@@ -440,6 +440,9 @@ A resource table is composed in this order:
- Header rows are 40px high.
- Default cells use 16px horizontal and 12px vertical padding.
+- Instance and database body cells use `TableCellContent` for a vertically
+ centered, 24px minimum content area: 48px with cell padding, plus row borders.
+ Expanded or multi-line content can increase the row height.
- Interactive menu/list rows have a 32px compact or 36px default minimum
height, 14/20px primary text, and an 8px internal gap.
- Numeric values align right. Selection and icon-only columns remain narrow.
diff --git a/frontend/src/components/database/DatabaseTableView.tsx b/frontend/src/components/database/DatabaseTableView.tsx
index 41cc89a49a..b8712041e6 100644
--- a/frontend/src/components/database/DatabaseTableView.tsx
+++ b/frontend/src/components/database/DatabaseTableView.tsx
@@ -23,6 +23,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
+import { TableCellContent } from "@/components/ui/table-cell-content";
import { useEnvironmentList, usePlanFeature } from "@/hooks/useAppState";
import { useColumnWidths } from "@/hooks/useColumnWidths";
import { cn } from "@/lib/utils";
@@ -501,11 +502,13 @@ const DatabaseRowView = memo(function DatabaseRowView({
onToggleSelection(database.name);
}}
>
- <Checkbox
- checked={selected}
- onCheckedChange={() => onToggleSelection(database.name)}
- onClick={(e) => e.stopPropagation()}
- />
+ <TableCellContent>
+ <Checkbox
+ checked={selected}
+ onCheckedChange={() => onToggleSelection(database.name)}
+ onClick={(e) => e.stopPropagation()}
+ />
+ </TableCellContent>
</TableCell>
)}
{columns.map((col) => (
@@ -520,7 +523,7 @@ const DatabaseRowView = memo(function DatabaseRowView({
col.onCellClick ? (e) => col.onCellClick!(database, e) : undefined
}
>
- {col.render(database)}
+ <TableCellContent>{col.render(database)}</TableCellContent>
</TableCell>
))}
</TableRow>
diff --git a/frontend/src/components/instance/InstanceDashboard.tsx b/frontend/src/components/instance/InstanceDashboard.tsx
index 00483a8132..833e217660 100644
--- a/frontend/src/components/instance/InstanceDashboard.tsx
+++ b/frontend/src/components/instance/InstanceDashboard.tsx
@@ -67,6 +67,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
+import { TableCellContent } from "@/components/ui/table-cell-content";
import {
WorkspacePageContent,
WorkspacePageFooter,
@@ -914,7 +915,6 @@ export function InstanceDashboard({
/>
),
defaultWidth: 48,
- cellClassName: "px-4 py-2",
onCellClick: (instance, e) => {
e.stopPropagation();
toggleSelection(instance.name);
@@ -983,7 +983,7 @@ export function InstanceDashboard({
const isExpanded = expandedDataSources.has(instance.name);
const hasMultipleDS = instance.dataSources.length > 1;
return (
- <div className="flex items-start gap-x-2">
+ <div className="flex items-center gap-x-2 min-w-0">
<span className="truncate">
{isExpanded
? instance.dataSources.map((ds, idx) => (
@@ -1032,7 +1032,10 @@ export function InstanceDashboard({
title: "",
defaultWidth: 50,
render: (instance) => (
- <div className="flex justify-end" onClick={(e) => e.stopPropagation()}>
+ <div
+ className="flex w-full justify-end"
+ onClick={(e) => e.stopPropagation()}
+ >
<InstanceActionDropdown
instance={instance}
project={project}
@@ -1165,7 +1168,9 @@ export function InstanceDashboard({
: undefined
}
>
- {col.render(instance)}
+ <TableCellContent>
+ {col.render(instance)}
+ </TableCellContent>
</TableCell>
))}
</TableRow>
diff --git a/frontend/src/components/ui/styles.stylex.ts b/frontend/src/components/ui/styles.stylex.ts
index 7a7af94bd5..7bc80dd78a 100644
--- a/frontend/src/components/ui/styles.stylex.ts
+++ b/frontend/src/components/ui/styles.stylex.ts
@@ -1,5 +1,11 @@
import * as stylex from "@stylexjs/stylex";
+export const tableStyles = stylex.create({
+ cellContent: {
+ minHeight: 24,
+ },
+});
+
export const controlSize = {
xs: {
height: 24,
diff --git a/frontend/src/components/ui/table-cell-content.tsx b/frontend/src/components/ui/table-cell-content.tsx
new file mode 100644
index 0000000000..ad90f5d952
--- /dev/null
+++ b/frontend/src/components/ui/table-cell-content.tsx
@@ -0,0 +1,23 @@
+import * as stylex from "@stylexjs/stylex";
+import type { ComponentPropsWithoutRef } from "react";
+import { cn } from "@/lib/utils";
+import { tableStyles } from "./styles.stylex";
+
+export function TableCellContent({
+ className,
+ style,
+ ...props
+}: ComponentPropsWithoutRef<"div">) {
+ const stylexProps = stylex.props(tableStyles.cellContent);
+ return (
+ <div
+ {...props}
+ className={cn(
+ "flex min-w-0 items-center",
+ stylexProps.className,
+ className
+ )}
+ style={{ ...stylexProps.style, ...style }}
+ />
+ );
+}