Database governance built for humans and agents — controlling changes and access across every major database.
Task List
Task Index: T1: React ReleaseFileTable.tsx [M] — T2: React ReleaseFileDetailPanel.tsx [M] — T3: ProjectReleaseDetailPage.tsx [L] — T4: Add missing React i18n keys [S] — T5: Switch route entry to React [S] — T6: Delete obsolete Vue files [S] — T7: ReleaseFileTable.test.tsx leaf test [M] — T8: Frontend CI gates [S]
T1: Create React ReleaseFileTable.tsx [M]
Objective: Mirror ReleaseFileTable.vue as a React leaf so the React page can render it and CreateRevisionDrawer.vue can later switch to it. Traces to design §4.
Size: M (one new file, ~160 LOC, moderate logic: selection sync, row-click modes).
Files:
- Create:
frontend/src/react/components/release/ReleaseFileTable.tsx
Implementation:
- Port the Vue component verbatim to React using
Table,TableHeader,TableBody,TableRow,TableCell,TableHeadfrom@/react/components/ui/table. - Props contract (matches design §4):
export interface ReleaseFileTableProps { files: Release_File[]; releaseType: Release_Type; showSelection?: boolean; // default false rowClickable?: boolean; // default true selectedFiles?: Release_File[];// default [] onRowClick?: (file: Release_File, e: React.MouseEvent) => void; onSelectedFilesChange?: (files: Release_File[]) => void; } - Selection state: local
useState<Set<string>>of selected paths, synced fromselectedFilesprop viauseEffect. - Columns: selection (when
showSelection), version, type (via portedgetReleaseFileTypeText), filename. Usew-*utility widths to approximate Vue widths (160/64/128). - Selection column uses a native
<input type="checkbox">(no ReactCheckboxprimitive exists inui/); wrap in<td className="px-4 py-3">withonClickstopping propagation. (Per frontend/AGENTS.md: onlyInputis required for text-style inputs; checkboxes are OK as native.) - Row click mirrors
ReleaseFileTable.vue:104-137— in selection mode, toggle; otherwise callonRowClick. Cursor style whenrowClickable || showSelection. i18n: useuseTranslation()forcommon.version,common.type,database.revision.filename,issue.title.change-database.
Boundaries:
- Do not delete
ReleaseFileTable.vue. It still has a live Vue caller atCreateRevisionDrawer.vue:414. - Do not export from a barrel file; import by path. No
index.tsfor the directory. - Do not re-implement
Release_Typeswitch logic differently — port the exact 4-case switch from the Vue file.
Dependencies: None.
Expected Outcome: New file exists, exports ReleaseFileTable, compiles under the React tsconfig.
Validation: pnpm --dir frontend type-check — zero errors.
T2: Create React ReleaseFileDetailPanel.tsx [M]
Objective: Mirror ReleaseFileDetailPanel.vue for use inside the page's file detail sheet. Traces to design §5.
Size: M (one new file, ~90 LOC, moderate logic: async sheet fetch with race-guard).
Files:
- Create:
frontend/src/react/components/release/ReleaseFileDetailPanel.tsx
Implementation:
- Props:
{ release: Release; releaseFile: Release_File }. - State:
statement: string,loading: boolean, bothuseState. - Effect: on
releaseFilechange, setlet cancelled = falseguard, callsheetServiceClientConnect.getSheet({ name: releaseFile.sheet, raw: true }),new TextDecoder().decode(sheet.content)intostatementif not cancelled. Cleanup setscancelled = true. MatchesRevisionDetailPanel.tsx:92-135pattern. - Render structure (ported from
ReleaseFileDetailPanel.vue):- Header row:
common.version:{releaseFile.version}(bold). - Meta row:
database.revision.filename: {releaseFile.path}+Hash: {releaseFile.sheetSha256.slice(0,8)}. - Separator (use
<Separator />from@/react/components/ui/separator). - Statement section: label + inline
CopyButton(port the inlineCopyButtonfromrevision/RevisionDetailPanel.tsx:46-75verbatim into this file — do not share). ReadonlyMonacofrom@/react/components/monaco,className="relative h-auto max-h-[480px] min-h-[120px]".
- Header row:
- Loading indicator: render
Loader2from lucide withanimate-spinabove Monaco whileloading. i18n:common.version,common.statement,database.revision.filename.
Boundaries:
- Do not delete
ReleaseFileDetailPanel.vueyet — deletion happens in T6. - Do not export a shared React
CopyButton. Inline it per the design non-goal. - Do not call any Vue Drawer/DrawerContent — the sheet wrapper is owned by the page.
Dependencies: None.
Expected Outcome: New file exists, renders, async fetches on release file changes with cleanup.
Validation: pnpm --dir frontend type-check — zero errors.
T3: Create ProjectReleaseDetailPage.tsx [L]
Objective: Self-contained React page that replaces ReleaseDetail.vue, BasicInfo.vue, NavBar/*.vue, and context.ts. Traces to design §2, §3, §6.
Size: L (one new file, ~500 LOC: page state + header + basic-info + apply-sheet + file detail sheet + inline DatabaseAndGroupSelector).
Files:
- Create:
frontend/src/react/pages/project/ProjectReleaseDetailPage.tsx
Implementation:
- Exported signature:
export function ProjectReleaseDetailPage({ projectId, releaseId, }: { projectId: string; releaseId: string; }) - Page-level state:
releaseName = \${projectNamePrefix}${projectId}/releases/${releaseId}``projectName = \${projectNamePrefix}${projectId}``const release = useVueState(() => releaseStore.getReleaseByName(releaseName) ?? unknownRelease())const project = useVueState(() => projectV1Store.getProjectByName(projectName) ?? unknownProject())useEffectwithignoreguard:projectV1Store.getOrFetchProjectByName(projectName)andreleaseStore.fetchReleaseByName(releaseName).allowApply = hasPermissionToCreateChangeDatabaseIssueInProject(project)(computed inline each render).- Document title
useEffectonproject.title: callsetDocumentTitle(t("release.releases"), project.title)— the route is always the detail route when this page is mounted, so skip the Vue route-name check. const [selectedReleaseFile, setSelectedReleaseFile] = useState<Release_File | undefined>()for the file detail sheet.const [applyOpen, setApplyOpen] = useState(false)for the apply-to-database sheet.const [abandonOpen, setAbandonOpen] = useState(false)for the abandon confirm.
- Page layout (mirrors
ReleaseDetail.vue:1-11):- Outer
<div className="flex flex-col items-start gap-y-4 p-4 relative">. <ReleaseHeader>(local),<ReleaseBasicInfo>(local),<ReleaseFileTable>(from T1) withonRowClick={(f) => setSelectedReleaseFile(f)}.
- Outer
<ReleaseHeader>local component:- If
release.state === State.DELETED, render a sticky<div className="h-8 w-full text-base font-medium bg-gray-700 text-white flex justify-center items-center">{t("common.archived")}</div>(port ofArchiveBanner.vue). - Title row:
<h1 className="text-xl font-medium truncate p-0.5">{releaseName.split('/').pop()}</h1>. - Right side:
<Button>{t("common.apply-to-database")}</Button>whenrelease.state === State.ACTIVE(opens apply sheet) +<DropdownMenu>withabandon/restoredepending on state. Use@/react/components/ui/dropdown-menu. - Abandon selection opens
AlertDialogwith titlet("bbkit.confirm-button.sure-to-abandon"), descriptiont("bbkit.confirm-button.can-undo"), Cancel / Confirm footer. On confirm:releaseStore.deleteRelease(release.name). - Restore selection: directly
releaseStore.undeleteRelease(release.name)(no confirm, mirrors Vue).
- If
<ReleaseBasicInfo>local component:- Row with
Clock4icon +HumanizeTs ts={getTimeForPbTimestampProtoEs(release.createTime)/1000}. - If
release.vcsSource?.vcsType !== VCSType.VCS_TYPE_UNSPECIFIED: render a small row withLink2icon and<a href={release.vcsSource.url} target="_blank">{beautifyUrl(release.vcsSource.url)}</a>. PortbeautifyUrlinline as a local function.
- Row with
<ApplyToDatabaseSheet>local component:<Sheet open={applyOpen} onOpenChange={(o) => !o && setApplyOpen(false)}>+<SheetContent width="wide">.- Header:
SheetTitlet("common.apply-to-database"). - Body: inline
<DatabaseAndGroupSelector>ported fromProjectPlanDashboardPage.tsx:881-949(copyDatabaseAndGroupSelector+DatabaseSelector+DatabaseGroupSelectorinto this file, bound to local state). Footer status text usest("database.selected-n-databases", { n }). - Footer: Cancel + Create buttons, disabled unless selection is valid.
- On Create: port the RPC sequence from
ApplyToDatabasePanel.vue:103-154verbatim —create(PlanSchema, { title, description, specs: [changeDatabaseConfig with release]}),planServiceClientConnect.createPlan,rolloutServiceClientConnect.createRollout, thenrouter.push(buildPlanDeployRoute({ projectId, planId })).
- File detail sheet:
<Sheet open={!!selectedReleaseFile} onOpenChange={(o) => !o && setSelectedReleaseFile(undefined)}>+<SheetContent width="wide">.<SheetHeader><SheetTitle>{t("release.file") ?? "Release File"}</SheetTitle></SheetHeader>. Use the existing keyrelease.fileif present, otherwise inline literal "Release File" (Vue did literal text).- Body:
<ReleaseFileDetailPanel release={release} releaseFile={selectedReleaseFile!} />from T2.
- Imports:
(Imports actually needed forimport { create } from "@bufbuild/protobuf"; import { Clock4, Link2, MoreVertical } from "lucide-react"; import { v4 as uuidv4 } from "uuid"; import { useEffect, useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { planServiceClientConnect, rolloutServiceClientConnect } from "@/connect"; import { HumanizeTs } from "@/react/components/HumanizeTs"; import { ReleaseFileDetailPanel } from "@/react/components/release/ReleaseFileDetailPanel"; import { ReleaseFileTable } from "@/react/components/release/ReleaseFileTable"; import { AlertDialog, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogTitle } from "@/react/components/ui/alert-dialog"; import { Button } from "@/react/components/ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/react/components/ui/dropdown-menu"; import { Sheet, SheetBody, SheetContent, SheetFooter, SheetHeader, SheetTitle } from "@/react/components/ui/sheet"; import { useVueState } from "@/react/hooks/useVueState"; import { cn } from "@/react/lib/utils"; import { router } from "@/router"; import { buildPlanDeployRoute } from "@/router/dashboard/projectV1RouteHelpers"; import { useProjectV1Store, useReleaseStore, useDatabaseV1Store, useDBGroupStore } from "@/store"; import { projectNamePrefix } from "@/store/modules/v1/common"; import { getTimeForPbTimestampProtoEs, unknownProject, unknownRelease } from "@/types"; import { State, VCSType } from "@/types/proto-es/v1/common_pb"; import { CreatePlanRequestSchema, Plan_ChangeDatabaseConfigSchema, PlanSchema } from "@/types/proto-es/v1/plan_service_pb"; import type { Release, Release_File } from "@/types/proto-es/v1/release_service_pb"; import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb"; import { hasPermissionToCreateChangeDatabaseIssueInProject, setDocumentTitle } from "@/utils";DatabaseAndGroupSelectorinline copy will be expanded to match the source inProjectPlanDashboardPage.tsx.)
Boundaries:
- Do not introduce
React.createContextor any new store. Pinia is the only data source. - Do not extract a shared
DatabaseAndGroupSelector. Copy the three-function block (DatabaseAndGroupSelector,DatabaseSelector,DatabaseGroupSelector) fromProjectPlanDashboardPage.tsxinline. - Do not introduce
tanstack/query,zustand, or any new state library. - Do not add a permission gate around abandon/restore beyond what Vue had.
- Do not touch Monaco internals.
Dependencies: T1, T2.
Expected Outcome: frontend/src/react/mount.ts can resolve page: "ProjectReleaseDetailPage" automatically via the ./pages/project/*.tsx glob.
Validation: pnpm --dir frontend type-check — zero errors.
T4: Add missing React i18n keys [S]
Objective: Make the keys consumed by T1/T2/T3 resolve in all five React locale files. Traces to design §7, design goal 5.
Files:
- Modify:
frontend/src/react/locales/en-US.json - Modify:
frontend/src/react/locales/es-ES.json - Modify:
frontend/src/react/locales/ja-JP.json - Modify:
frontend/src/react/locales/vi-VN.json - Modify:
frontend/src/react/locales/zh-CN.json
Implementation: For each locale file, add the missing keys (copying values verbatim from frontend/src/locales/<lang>.json):
| Key | en-US | es-ES | ja-JP | vi-VN | zh-CN |
|---|---|---|---|---|---|
common.version |
Version | Versión | バージョン | Phiên bản | 版本 |
common.apply-to-database |
Apply to database | Aplicar a la base de datos | データベースに適用 | Áp dụng cho cơ sở dữ liệu | 应用到数据库 |
common.abandon |
Abandon | Abandonar | 破棄 | Hủy bỏ | 废弃 |
database.revision.filename |
Filename | Nombre del archivo | ファイル名 | Tên tệp | 文件名 |
issue.title.change-database |
Change database | Modificar base de datos | データベースの変更 | Thay đổi cơ sở dữ liệu | 变更数据库 |
bbkit.confirm-button.sure-to-abandon |
Are you sure to abandon? | ¿Estás seguro de abandonar? | 本当に破棄しますか? | Bạn có chắc chắn muốn hủy bỏ? | 确定要废弃吗? |
bbkit.confirm-button.can-undo |
You can undo this action later. | Podrás deshacer esta acción más tarde. | この操作は後で元に戻すことができます。 | Bạn có thể hoàn tác hành động này sau. | 此操作可以撤销。 |
Keep existing alphabetical/group ordering. common.restore, common.cancel, common.confirm, common.create, common.type, common.statement, common.copy, common.copied, common.close, common.archived, release.releases, release.files, database.selected-n-databases — already present, do not duplicate.
Validation: pnpm --dir frontend check — zero errors (runs check-react-i18n).
T5: Switch route entry to React [S]
Objective: Make PROJECT_V1_ROUTE_RELEASE_DETAIL mount the new React page. Traces to design §1, design goal 3.
Files:
- Modify:
frontend/src/router/dashboard/projectV1.ts
Implementation: Replace lines 512-520:
{
path: ":releaseId",
name: PROJECT_V1_ROUTE_RELEASE_DETAIL,
meta: {
requiredPermissionList: () => ["bb.releases.get"],
},
component: () => import("@/react/ReactPageMount.vue"),
props: (route: RouteLocationNormalized) => ({
page: "ProjectReleaseDetailPage",
...route.params,
}),
},
This matches the sibling PROJECT_V1_ROUTE_RELEASES pattern at lines 500-511.
Validation: pnpm --dir frontend type-check — zero errors. rg "Release/ReleaseDetail/\"" frontend/src/router — no output (route no longer imports the Vue tree).
T6: Delete obsolete Vue files [S]
Objective: Remove Vue files with no remaining callers. Preserve ReleaseFileTable.vue because CreateRevisionDrawer.vue:414 still imports it. Traces to design §9, design goal 2.
Files:
- Delete:
frontend/src/components/Release/ReleaseDetail/index.ts - Delete:
frontend/src/components/Release/ReleaseDetail/ReleaseDetail.vue - Delete:
frontend/src/components/Release/ReleaseDetail/context.ts - Delete:
frontend/src/components/Release/ReleaseDetail/BasicInfo.vue - Delete:
frontend/src/components/Release/ReleaseDetail/NavBar/index.ts - Delete:
frontend/src/components/Release/ReleaseDetail/NavBar/NavBar.vue - Delete:
frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabaseButton.vue - Delete:
frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue - Delete:
frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileDetailPanel.vue
Keep:
frontend/src/components/Release/ReleaseDetail/ReleaseFileTable/index.tsfrontend/src/components/Release/ReleaseDetail/ReleaseFileTable/ReleaseFileTable.vue
Implementation: rm each file above. Use rmdir on NavBar/ if it empties out (it will).
Validation:
rg "Release/ReleaseDetail/index" frontend/src— no hits.rg "Release/ReleaseDetail/ReleaseDetail" frontend/src— no hits.rg "Release/ReleaseDetail/BasicInfo" frontend/src— no hits.rg "Release/ReleaseDetail/NavBar" frontend/src— no hits.rg "Release/ReleaseDetail/context" frontend/src— no hits.rg "ReleaseFileDetailPanel.vue" frontend/src— no hits.rg "ReleaseFileTable" frontend/src— only hits areCreateRevisionDrawer.vue:414(Vue) + T1's new React file + (if present) a test file.
T7: Leaf test — ReleaseFileTable.test.tsx [M]
Objective: Contract test for the React ReleaseFileTable. Traces to design §8 (primary leaf test; page-level and detail-panel tests are out of scope per the plan tail).
Size: M (one new file, ~120 LOC, isolated contract test with no RPC mocking).
Files:
- Create:
frontend/src/react/components/release/ReleaseFileTable.test.tsx
Implementation:
- Setup:
IS_REACT_ACT_ENVIRONMENT = true; importcreateElement,createRoot,act. - Mock
react-i18nextsouseTranslationreturns{ t: (k) => k }— no real locale loading. - Three tests (each < 30 LOC):
- renders version/type/filename cells for each
Release_File. - hides the selection column by default; shows when
showSelection=true. - clicking a row in non-selection mode fires
onRowClickwith the file.
- renders version/type/filename cells for each
- Use minimal test fixtures: two
Release_Fileobjects with onlypath,version,sheetSha256,sheetpopulated;releaseType = Release_Type.VERSIONED.
Boundaries:
- Do not mock
ui/tableinternals — render the real components. - Do not test selection toggling edge cases beyond hide/show (the Vue version did not have tests either — this is parity plus a minimum guard).
Dependencies: T1.
Expected Outcome: Test file exists, passes with pnpm --dir frontend test ReleaseFileTable.
Validation: pnpm --dir frontend test ReleaseFileTable.test — 3/3 tests pass.
T8: Frontend CI gates [S]
Objective: Confirm fix, check, type-check, test all pass. Traces to design goal 6.
Files: none modified (fix may auto-edit).
Implementation: Run in order:
pnpm --dir frontend fix— format + lint + organize imports, auto-fixes only.pnpm --dir frontend check— CI-mode validation (no modifications).pnpm --dir frontend type-check— TypeScript/vue-tsc.pnpm --dir frontend test— full vitest suite.
If fix edits files, re-run check and type-check once more.
Validation: All four commands exit 0. No new lint errors beyond any pre-existing ones on main.
Out-of-Scope Tasks
- Page-level test (
ProjectReleaseDetailPage.test.tsx) — design §8 listed it, but precedentProjectReleaseDashboardPageandProjectPlanDashboardPageship without page-level tests, and adding one requires mockingplanServiceClientConnect,rolloutServiceClientConnect,releaseServiceClientConnect,useReleaseStore,useProjectV1Store,router.push,Monaco, and five Vue-reactive getters. Design goal 1 calls for manual walkthrough, and design goal 6 covers CI gates, so the page is verified at those two levels instead. Defer to a follow-up if needed. ReleaseFileDetailPanel.test.tsx— same reasoning; requires mockingsheetServiceClientConnect.getSheetandReadonlyMonaco. Covered by design goal 1 walkthrough.- Extracting a shared React
DatabaseAndGroupSelector— explicit Non-Goal in both definition and design. - Extracting a shared React
CopyButton— explicit Non-Goal; each page that needs one ports the inline 30 LOC version. - Porting
VCSIcon.vue,ArchiveBanner.vue,HumanizeDate.vue,EllipsisText.vue,@/components/v2Drawer/CopyButton— explicit Non-Goal. - Migrating
frontend/src/components/Revision/CreateRevisionDrawer.vue— explicit Non-Goal. This is the reasonReleaseFileTable.vueis kept alive in T6. - Changing the apply RPC sequence, adding permission gates on abandon/restore, redesigning layout — explicit Non-Goals.