Skip to content

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

feat(frontend): add Data Access section to project sidebar (#19395)

zchpeter5f7a78050807
diff --git a/CLAUDE.md b/CLAUDE.md
index 02792e78aa..8cc7c333c9 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -148,15 +148,28 @@ psql -U bbdev bbdev
- **Code Review** — Follow [Google's Code Review Guideline](https://google.github.io/eng-practices/)
- **Author Responsibility** — Authors are responsible for driving discussions, resolving comments, and promptly merging pull requests
-- **Breaking Changes** — Add the `breaking` label to PRs that contain breaking changes, including:
- - API breaking changes (removed/renamed endpoints, changed request/response formats)
- - Database schema breaking changes that are not backward-compatible
- - Proto message breaking changes (removed/renamed fields, changed field types)
- - Configuration breaking changes (removed flags, changed behavior)
- **Description** — Clearly describe what the PR changes and why
- **Testing** — Include information about how the changes were tested
- **SonarCloud** — When creating or updating a PR, update `.sonarcloud.properties` to reflect the latest file structure. Use `sonar.exclusions` for generated code, build artifacts, and dependencies (directory paths only). Use `sonar.test.inclusions` for test file patterns (wildcards like `**/*_test.go`). Use `sonar.cpd.exclusions` to skip copy-paste detection on test files
+### Breaking Change Check (MANDATORY before `gh pr create`)
+
+**Before every `gh pr create`, you MUST review the diff against the base branch and check for:**
+
+1. **API breaking changes** — removed/renamed endpoints, changed request/response formats, removed/renamed query parameters
+2. **Database schema breaking changes** — dropped columns/tables, non-backward-compatible migrations
+3. **Proto breaking changes** — removed/renamed fields, changed field numbers/types, removed RPCs
+4. **Configuration breaking changes** — removed flags, changed default behavior, renamed environment variables
+5. **Behavior changes** — changed default values, altered existing workflows, modified permission/access control logic
+6. **Webhook/event changes** — renamed/removed events, changed payload formats
+7. **UI workflow changes** — redesigned user-facing flows that change how users perform existing tasks (e.g., merging steps, splitting pages, changing navigation)
+
+**If ANY of the above apply:**
+1. Add `--label breaking` to the `gh pr create` command
+2. Include a `## Breaking Changes` section in the PR description summarizing what changed and what users need to be aware of
+
+Do NOT skip this check. Do NOT assume changes are non-breaking without reviewing the diff.
+
## Common Go Lint Rules
Always follow these guidelines to avoid common linting errors:
diff --git a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/DatabaseResourceSelector.vue b/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/DatabaseResourceSelector.vue
index 541997735b..4b0630a6cb 100644
--- a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/DatabaseResourceSelector.vue
+++ b/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/DatabaseResourceSelector.vue
@@ -10,7 +10,7 @@
<NTransfer
id="database-resource-selector"
v-model:value="selectedValueList"
- style="height: 512px"
+ class="h-[min(512px,60vh)]"
:disabled="disabled"
:options="sourceTransferOptions"
:render-source-list="renderSourceList"
@@ -609,7 +609,7 @@ const renderTargetList: TransferRenderSourceList = () => {
data: targetTreeOptions.value,
blockLine: true,
virtualScroll: true,
- style: "height: 468px", // since <NTransfer> height is 512
+ style: "height: calc(100% - 44px)",
renderLabel: ({ option }: { option: TreeOption }) => {
const node = option as DatabaseTreeOption;
return (
diff --git a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue b/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue
index 49a74e9b7b..85c3e5e2ca 100644
--- a/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue
+++ b/frontend/src/components/GrantRequestPanel/DatabaseResourceForm/index.vue
@@ -3,7 +3,7 @@
<NRadioGroup
:value="state.radioValue"
:disabled="disabled || state.loading"
- class="w-full flex! flex-row justify-start items-center gap-4"
+ class="w-full flex! flex-col sm:flex-row justify-start sm:items-center gap-2 sm:gap-4"
@update:value="onSelectUpdate"
>
<NTooltip trigger="hover">
diff --git a/frontend/src/components/Project/useProjectSidebar.ts b/frontend/src/components/Project/useProjectSidebar.ts
index 9c3b8ecffc..eb37e705e7 100644
--- a/frontend/src/components/Project/useProjectSidebar.ts
+++ b/frontend/src/components/Project/useProjectSidebar.ts
@@ -1,8 +1,8 @@
import {
CircleDot,
Database,
- DownloadIcon,
Settings,
+ ShieldCheck,
Users,
Workflow,
} from "lucide-vue-next";
@@ -111,11 +111,29 @@ export const useProjectSidebar = (project: MaybeRef<Project>) => {
...cicdRoutes,
...databaseRoutes,
{
- title: t("export-center.self"),
- icon: () => h(DownloadIcon),
- path: PROJECT_V1_ROUTE_EXPORT_CENTER,
+ title: t("settings.sidebar.data-access"),
+ icon: () => h(ShieldCheck),
type: "div",
hide: isDefaultProject.value,
+ expand: true,
+ children: [
+ {
+ title: t("sql-editor.access-grants"),
+ path: PROJECT_V1_ROUTE_ACCESS_GRANTS,
+ type: "div",
+ hide: !isDev(),
+ },
+ {
+ title: t("project.masking-exemption.self"),
+ path: PROJECT_V1_ROUTE_MASKING_EXEMPTION,
+ type: "div",
+ },
+ {
+ title: t("export-center.data-export"),
+ path: PROJECT_V1_ROUTE_EXPORT_CENTER,
+ type: "div",
+ },
+ ],
},
{
title: t("common.manage"),
@@ -144,17 +162,6 @@ export const useProjectSidebar = (project: MaybeRef<Project>) => {
path: PROJECT_V1_ROUTE_WEBHOOKS,
type: "div",
},
- {
- title: t("sql-editor.access-grants"),
- path: PROJECT_V1_ROUTE_ACCESS_GRANTS,
- type: "div",
- hide: !isDev(),
- },
- {
- title: t("project.masking-exemption.self"),
- path: PROJECT_V1_ROUTE_MASKING_EXEMPTION,
- type: "div",
- },
{
title: t("settings.sidebar.audit-log"),
path: PROJECT_V1_ROUTE_AUDIT_LOGS,
diff --git a/frontend/src/components/ProjectWebhookForm.vue b/frontend/src/components/ProjectWebhookForm.vue
index be66ff45e4..8cee32f71f 100644
--- a/frontend/src/components/ProjectWebhookForm.vue
+++ b/frontend/src/components/ProjectWebhookForm.vue
@@ -205,7 +205,7 @@
</template>
<template #footer>
<div class="flex justify-end">
- <div class="flex items-center gap-x-3">
+ <div class="flex items-center gap-x-2">
<NButton v-if="create" @click.prevent="cancel">
{{ $t("common.cancel") }}
</NButton>
diff --git a/frontend/src/components/SensitiveData/GrantAccessForm.vue b/frontend/src/components/SensitiveData/GrantAccessForm.vue
index a35e557c5d..665a352a2b 100644
--- a/frontend/src/components/SensitiveData/GrantAccessForm.vue
+++ b/frontend/src/components/SensitiveData/GrantAccessForm.vue
@@ -57,7 +57,7 @@
</template>
<template #footer>
<div class="flex justify-end items-center">
- <div class="flex items-center gap-x-3">
+ <div class="flex items-center gap-x-2">
<NButton @click.prevent="onDismiss">
{{ $t("common.cancel") }}
</NButton>
diff --git a/frontend/src/components/SensitiveData/MaskingExceptionUserTable.vue b/frontend/src/components/SensitiveData/MaskingExceptionUserTable.vue
index 193d2cddf3..614d306aef 100644
--- a/frontend/src/components/SensitiveData/MaskingExceptionUserTable.vue
+++ b/frontend/src/components/SensitiveData/MaskingExceptionUserTable.vue
@@ -8,6 +8,7 @@
:striped="true"
:loading="!ready || state.loading"
:max-height="'calc(100vh - 15rem)'"
+ :scroll-x="scrollX"
virtual-scroll
/>
</template>
@@ -234,6 +235,7 @@ const accessTableColumns = computed(
{
key: "member",
title: t("common.members"),
+ minWidth: 140,
resizable: true,
render: (item: AccessUser) => {
if (item.member.startsWith(groupBindingPrefix)) {
@@ -251,6 +253,7 @@ const accessTableColumns = computed(
{
key: "resource",
title: t("common.resource"),
+ minWidth: 200,
resizable: true,
hide: !props.showDatabaseColumn,
render: (item: AccessUser) => {
@@ -260,6 +263,7 @@ const accessTableColumns = computed(
{
key: "expire",
title: t("common.expiration"),
+ minWidth: 200,
render: (item: AccessUser) => {
return (
<NDatePicker
@@ -283,6 +287,7 @@ const accessTableColumns = computed(
{
key: "reason",
title: t("common.reason"),
+ minWidth: 120,
render: (item: AccessUser) => {
return item.description;
},
@@ -310,6 +315,12 @@ const accessTableColumns = computed(
}
);
+const scrollX = computed(() => {
+ return accessTableColumns.value.reduce((sum, col) => {
+ return sum + ((col as { minWidth?: number }).minWidth ?? 100);
+ }, 0);
+});
+
const revokeAccessAlert = (item: AccessUser) => {
$dialog.warning({
title: t("common.warning"),
diff --git a/frontend/src/components/v2/Form/FormLayout.vue b/frontend/src/components/v2/Form/FormLayout.vue
index 9931be31ab..0f4d7e7ac6 100644
--- a/frontend/src/components/v2/Form/FormLayout.vue
+++ b/frontend/src/components/v2/Form/FormLayout.vue
@@ -1,6 +1,6 @@
<template>
<div class="h-full flex flex-col">
- <div class="flex-1 mb-6">
+ <div class="flex-1 mb-6 px-4">
<slot name="title">
<div v-if="title" class="text-lg leading-6 font-medium text-main">
{{ title }}
@@ -11,7 +11,7 @@
</div>
<div class="w-full sticky bottom-0 z-10">
<div
- class="w-full py-4 border-t border-block-border bg-white"
+ class="w-full py-4 px-4 border-t border-block-border bg-white"
>
<slot name="footer" />
</div>
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 0339516edb..ead52e2f3c 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -2763,7 +2763,8 @@
"delete-group": "Delete the database group {name}"
},
"export-center": {
- "self": "Export Center"
+ "self": "Export Center",
+ "data-export": "Data Export"
},
"schema-designer": {
"use-tips": "Click a table to start."
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index ca2f4744ac..82c768bbea 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -2763,7 +2763,8 @@
"delete-group": "Eliminar el grupo de bases de datos {name}"
},
"export-center": {
- "self": "centro de exportacion"
+ "self": "centro de exportacion",
+ "data-export": "Exportación de datos"
},
"schema-designer": {
"use-tips": "Selecciona las tablas a diseñar"
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 3b60ff7662..7adca7b6bf 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -2763,7 +2763,8 @@
"delete-group": "データベースグループを削除する"
},
"export-center": {
- "self": "エクスポートセンター"
+ "self": "エクスポートセンター",
+ "data-export": "データエクスポート"
},
"schema-designer": {
"use-tips": "デザインするテーブルを選択してください"
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index a4ada0da19..ade7ca9286 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -2763,7 +2763,8 @@
"delete-group": "Xóa nhóm cơ sở dữ liệu {name}"
},
"export-center": {
- "self": "Trung tâm xuất"
+ "self": "Trung tâm xuất",
+ "data-export": "Xuất dữ liệu"
},
"schema-designer": {
"use-tips": "Nhấp vào một bảng để bắt đầu."
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 5d869f6924..3f7a83b5c3 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -2763,7 +2763,8 @@
"delete-group": "删除数据库组 {name}"
},
"export-center": {
- "self": "导出中心"
+ "self": "导出中心",
+ "data-export": "数据导出"
},
"schema-designer": {
"use-tips": "选择需要设计的表"