Database governance built for humans and agents — controlling changes and access across every major database.
Unify React list-page tables on the shared Table component
Date: 2026-05-06 Status: Approved
Goal
Replace the remaining raw <table> callsites in React list pages with the
unified Table component at
frontend/src/react/components/ui/table.tsx, normalizing visual appearance to
the unified component's defaults.
The unified Table already provides striping, sortable headers (with
ArrowUp/Down/UpDown indicators), and column resizing via the
ColumnResizeHandle. Most React list surfaces already use it. A handful still
ship raw HTML — those are the targets.
Scope
In scope (4 callsites)
frontend/src/react/components/ProjectTable.tsx— used byProjectsPage.frontend/src/react/components/AuditLogTable.tsx.frontend/src/react/pages/settings/InstancesPage.tsx.- The inline
ReleaseTableinfrontend/src/react/pages/project/ProjectReleaseDashboardPage.tsx(currently around lines 186–280).
Out of scope
- Pages that already use the unified
Table(changelog, revisions, groups, SQL review rules, instance roles, release files, approval steps,DatabaseTableView, etc.). They are fine as-is. - Vue list pages. They will pick up the unified
Tablewhen they are migrated to React on their own schedules. - Building a
DataTablewrapper or adopting@tanstack/react-table. Premature given there are only four callsites left. - Adding new APIs to the unified
Tableitself (no expansion API, no sticky header API). All four migrations should be possible with the current API. If implementation hits an unavoidable gap, stop and flag it rather than silently extending the component.
Per-page changes
1. ReleaseTable (in ProjectReleaseDashboardPage.tsx)
Smallest case: no sort, no resize, no selection.
- Swap raw
<table>/<thead>/<tbody>/<tr>/<th>/<td>forTable/TableHeader/TableHead/TableBody/TableRow/TableCell. - Drop the custom
py-2 px-4and accept the unifiedpx-4 py-3. - Row click handler stays on
<TableRow onClick=...>. - Default striping is fine.
2. ProjectTable.tsx
- Same markup swap.
- Drop the
bg-control-bgheader row and the rotatingChevronDown. The unifiedArrowUp/Down/UpDownsort indicators take over viasortable/sortActive/sortDir/onSortprops on<TableHead>. - Current-project highlight (check icon) stays as a name-cell concern. No Table API change.
- Optional checkbox column stays as a leading
<TableHead>/<TableCell>slot.
3. AuditLogTable.tsx
- Replace raw HTML.
- Column resize wires the existing width state through
<TableHead resizable onResizeStart=...>(already supported by the unifiedTable). - Header dropdown filters keep working —
<TableHead>accepts arbitrary children. - If a sticky header is currently in use, keep it as a wrapper-level CSS class on the surrounding scroll container. No Table API change.
4. InstancesPage.tsx
Largest case.
- Same markup swap with
sortable/resizableprops wired to existing state. - Expandable data sources stay as in-cell rendering: the address cell shows
either the single
hostPortOfInstanceV1(instance)line or a vertical list ofhostPortOfDataSource(ds)lines based onexpandedDataSourcesstate. Page-level logic only — no Table API change. - The page builds column widths via
useColumnWidths+<colgroup>and setsstyle={{ width: totalWidth }}+table-fixedon the table element. Pass these through to the unifiedTable(it spreads...propsand accepts arbitrary children including<colgroup>). - Striping default-on is fine; in-cell expansion does not interact with alternating row bands.
Validation
For each migrated page:
pnpm --dir frontend fixpnpm --dir frontend checkpnpm --dir frontend type-checkpnpm --dir frontend testfor any tests touching the surface.- Manual visual check via
pnpm --dir frontend dev: load the page, verify sort, resize, expand, and row-click behavior; eyeball the visual diff against the current build. - For
InstancesPagespecifically: expand a row's data sources, sort while expanded, resize a column, collapse and re-expand.
PR strategy
One PR per page, smallest and safest first:
ReleaseTable— trivial swap, low blast radius.ProjectTable— visual normalization, used byProjectsPage.AuditLogTable— column-resize wiring.InstancesPage— column-resize plus expandable rows; most risk.
This keeps each diff small and reviewable, and a regression in one does not block the others.