Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix(plan): ready for review (#16714)
boojack5a819b6837e7
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vueindex be9263d9d4..72383a15d2 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue@@ -9,12 +9,12 @@/><!-- Panels -->+ <IssueCreationActionPanel+ :action="pendingIssueCreationAction"+ @close="pendingIssueCreationAction = undefined"+ /><template v-if="issue">- <IssueCreationActionPanel- :action="pendingIssueCreationAction"- @close="pendingIssueCreationAction = undefined"- /><IssueReviewActionPanel:action="pendingReviewAction"@close="pendingReviewAction = undefined"diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vueindex 36ddb92b90..8fe8f0632f 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateButton.vue@@ -28,12 +28,12 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import { NTooltip, NButton } from "naive-ui";import { zindexable as vZindexable } from "vdirs";import { computed, nextTick, ref } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";-import { create } from "@bufbuild/protobuf";import {ErrorList,useSpecsValidation,@@ -44,12 +44,10 @@ import {} from "@/components/Plan/logic";import { usePlanContext } from "@/components/Plan/logic";import { planServiceClientConnect } from "@/grpcweb";-import { CreatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";-import { convertOldPlanToNew, convertNewPlanToOld } from "@/utils/v1/plan-conversions";-import { convertEngineToOld } from "@/utils/v1/common-conversions";-import { Engine } from "@/types/proto-es/v1/common_pb";import { PROJECT_V1_ROUTE_PLAN_DETAIL } from "@/router/dashboard/projectV1";import { useCurrentProjectV1, useSheetV1Store } from "@/store";+import { Engine } from "@/types/proto-es/v1/common_pb";+import { CreatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { type Plan_ChangeDatabaseConfig } from "@/types/proto/v1/plan_service";import type { Sheet } from "@/types/proto/v1/sheet_service";import {@@ -58,6 +56,11 @@ import {extractSheetUID,hasProjectPermissionV2,} from "@/utils";+import { convertEngineToOld } from "@/utils/v1/common-conversions";+import {+ convertOldPlanToNew,+ convertNewPlanToOld,+} from "@/utils/v1/plan-conversions";const { t } = useI18n();const router = useRouter();@@ -98,7 +101,7 @@ const doCreatePlan = async () => {if (!createdPlan) return;nextTick(() => {- router.push({+ router.replace({name: PROJECT_V1_ROUTE_PLAN_DETAIL,params: {projectId: extractProjectResourceName(createdPlan.name),@@ -130,7 +133,9 @@ const createSheets = async () => {// The sheet is pending createconst sheet = getLocalSheetByName(config.sheet);const engine = await databaseEngineForSpec(spec);- sheet.engine = convertEngineToOld((engine ?? Engine.ENGINE_UNSPECIFIED) as Engine);+ sheet.engine = convertEngineToOld(+ (engine ?? Engine.ENGINE_UNSPECIFIED) as Engine+ );pendingCreateSheetMap.set(sheet.name, sheet);}}diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vuedeleted file mode 100644index 5059a7176f..0000000000--- a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue+++ /dev/null@@ -1,189 +0,0 @@-<template>- <NTooltip :disabled="issueCreateErrorList.length === 0" placement="top">- <template #trigger>- <NButton- type="primary"- size="medium"- tag="div"- :disabled="issueCreateErrorList.length > 0 || loading"- :loading="loading"- @click="handleCreateIssue"- >- {{ $t("plan.ready-for-review") }}- </NButton>- </template>-- <template #default>- <ErrorList :errors="issueCreateErrorList" />- </template>- </NTooltip>-- <!-- prevent clicking the page when creating in progress -->- <div- v-if="loading"- v-zindexable="{ enabled: true }"- class="fixed inset-0 pointer-events-auto flex flex-col items-center justify-center"- @click.stop.prevent- />-</template>--<script setup lang="ts">-import { uniqBy } from "lodash-es";-import { NTooltip, NButton, useDialog } from "naive-ui";-import { zindexable as vZindexable } from "vdirs";-import { computed, nextTick, ref, watchEffect } from "vue";-import { useI18n } from "vue-i18n";-import { useRouter } from "vue-router";-import { ErrorList } from "@/components/Plan/components/common";-import {- planCheckRunListForSpec,- usePlanContext,-} from "@/components/Plan/logic";-import { planCheckRunSummaryForCheckRunList } from "@/components/PlanCheckRun/common";-import { create } from "@bufbuild/protobuf";-import { issueServiceClientConnect } from "@/grpcweb";-import { CreateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";-import { convertNewIssueToOld, convertOldIssueToNew } from "@/utils/v1/issue-conversions";-import { PROJECT_V1_ROUTE_ISSUE_DETAIL_V1 } from "@/router/dashboard/projectV1";-import {- useCurrentProjectV1,- useCurrentUserV1,- usePolicyV1Store,-} from "@/store";-import { emptyIssue } from "@/types";-import { Issue, IssueStatus, Issue_Type } from "@/types/proto/v1/issue_service";-import { PolicyType } from "@/types/proto/v1/org_policy_service";-import { PlanCheckRun_Result_Status } from "@/types/proto/v1/plan_service";-import {- extractIssueUID,- extractProjectResourceName,- hasProjectPermissionV2,-} from "@/utils";--const { t } = useI18n();-const router = useRouter();-const dialog = useDialog();-const { project } = useCurrentProjectV1();-const policyV1Store = usePolicyV1Store();-const { plan, planCheckRunList } = usePlanContext();-const loading = ref(false);-const restrictIssueCreationForSqlReviewPolicy = ref(false);--const planCheckStatus = computed((): PlanCheckRun_Result_Status => {- const planCheckList = uniqBy(- plan.value.specs.flatMap((spec) =>- planCheckRunListForSpec(planCheckRunList.value, spec)- ),- (checkRun) => checkRun.name- );- const summary = planCheckRunSummaryForCheckRunList(planCheckList);- if (summary.errorCount > 0) {- return PlanCheckRun_Result_Status.ERROR;- }- if (summary.warnCount > 0) {- return PlanCheckRun_Result_Status.WARNING;- }- return PlanCheckRun_Result_Status.SUCCESS;-});--const issueCreateErrorList = computed(() => {- const errorList: string[] = [];- if (!hasProjectPermissionV2(project.value, "bb.plans.create")) {- errorList.push(t("common.missing-required-permission"));- }- if (!plan.value.title.trim()) {- errorList.push("Missing issue title");- }- if (- planCheckStatus.value === PlanCheckRun_Result_Status.ERROR &&- restrictIssueCreationForSqlReviewPolicy.value- ) {- errorList.push(- t(- "custom-approval.issue-review.disallow-approve-reason.some-task-checks-didnt-pass"- )- );- }- return errorList;-});--watchEffect(async () => {- const workspaceLevelPolicy =- await policyV1Store.getOrFetchPolicyByParentAndType({- parentPath: "",- policyType: PolicyType.RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW,- });- if (workspaceLevelPolicy?.restrictIssueCreationForSqlReviewPolicy?.disallow) {- restrictIssueCreationForSqlReviewPolicy.value = true;- return;- }-- const projectLevelPolicy =- await policyV1Store.getOrFetchPolicyByParentAndType({- parentPath: project.value.name,- policyType: PolicyType.RESTRICT_ISSUE_CREATION_FOR_SQL_REVIEW,- });- if (projectLevelPolicy?.restrictIssueCreationForSqlReviewPolicy?.disallow) {- restrictIssueCreationForSqlReviewPolicy.value = true;- return;- }-- // Fall back to default value.- restrictIssueCreationForSqlReviewPolicy.value = false;-});--const handleCreateIssue = async () => {- dialog.info({- title: t("common.confirm"),- content: t("issue.this-plan-will-be-converted-to-a-new-issue"),- negativeText: t("common.cancel"),- positiveText: t("common.create"),- onPositiveClick: async () => {- await doCreateIssue();- },- });-};--const doCreateIssue = async () => {- loading.value = true;- // TODO(steven): Check plan check results before creating issue.-- try {- const issueToCreate = {- ...Issue.fromPartial(buildIssue()),- rollout: "",- plan: plan.value.name,- };- const newIssue = convertOldIssueToNew(issueToCreate);- const request = create(CreateIssueRequestSchema, {- parent: project.value.name,- issue: newIssue,- });- const newCreatedIssue = await issueServiceClientConnect.createIssue(request);- const createdIssue = convertNewIssueToOld(newCreatedIssue);-- nextTick(() => {- router.push({- name: PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,- params: {- projectId: extractProjectResourceName(plan.value.name),- issueId: extractIssueUID(createdIssue.name),- },- });- });- } finally {- loading.value = false;- }-};--const buildIssue = () => {- const issue = emptyIssue();- const me = useCurrentUserV1();- issue.creator = `users/${me.value.email}`;- issue.title = plan.value.title;- issue.description = plan.value.description;- issue.status = IssueStatus.OPEN;- issue.type = Issue_Type.DATABASE_CHANGE;- return issue;-};-</script>diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/create/index.ts b/frontend/src/components/Plan/components/HeaderSection/Actions/create/index.tsindex 14255371a7..b30ba24e7e 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/create/index.ts+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/create/index.ts@@ -1,4 +1,3 @@import CreateButton from "./CreateButton.vue";-import CreateIssueButton from "./CreateIssueButton.vue";-export { CreateButton, CreateIssueButton };+export { CreateButton };diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueCreationActionPanel.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueCreationActionPanel.vueindex 55554e20d6..77176b77d7 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueCreationActionPanel.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/panels/IssueCreationActionPanel.vue@@ -3,13 +3,12 @@:show="action !== undefined":title="title":loading="state.loading"- @show="resetState"@close="$emit('close')"><template #default><div v-if="action" class="flex flex-col gap-y-4 px-1"><div class="flex flex-col gap-y-1">- <div class="font-medium text-control">Plan</div>+ <div class="font-medium text-control">{{ $t("plan.self") }}</div><div class="textinfolabel">{{ plan.title }}</div>@@ -23,21 +22,6 @@{{ plan.description || "No description" }}</div></div>-- <div class="flex flex-col gap-y-1">- <p class="font-medium text-control">- {{ $t("common.comment") }}- </p>- <NInput- v-model:value="comment"- type="textarea"- :placeholder="$t('issue.leave-a-comment')"- :autosize="{- minRows: 3,- maxRows: 10,- }"- />- </div></div></template><template #footer>@@ -73,7 +57,7 @@<script setup lang="ts">import { create } from "@bufbuild/protobuf";import { uniqBy } from "lodash-es";-import { NButton, NInput, NTooltip, useDialog } from "naive-ui";+import { NButton, NTooltip } from "naive-ui";import { computed, nextTick, reactive, ref, watchEffect } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";@@ -87,9 +71,11 @@ import { planCheckRunSummaryForCheckRunList } from "@/components/PlanCheckRun/coimport {issueServiceClientConnect,rolloutServiceClientConnect,- planServiceClientConnect,} from "@/grpcweb";-import { PROJECT_V1_ROUTE_PLAN_DETAIL } from "@/router/dashboard/projectV1";+import {+ PROJECT_V1_ROUTE_ISSUE_DETAIL,+ PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,+} from "@/router/dashboard/projectV1";import {useCurrentProjectV1,useCurrentUserV1,@@ -97,7 +83,6 @@ import {} from "@/store";import { emptyIssue } from "@/types";import { CreateIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";-import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import { Issue, IssueStatus, Issue_Type } from "@/types/proto/v1/issue_service";import { PolicyType } from "@/types/proto/v1/org_policy_service";@@ -105,7 +90,9 @@ import { PlanCheckRun_Result_Status } from "@/types/proto/v1/plan_service";import {extractProjectResourceName,hasProjectPermissionV2,- extractPlanUID,+ extractIssueUID,+ isDev,+ issueV1Slug,} from "@/utils";import {convertNewIssueToOld,@@ -127,7 +114,6 @@ const emit = defineEmits<{const { t } = useI18n();const router = useRouter();-const dialog = useDialog();const state = reactive<LocalState>({loading: false,});@@ -135,7 +121,6 @@ const { project } = useCurrentProjectV1();const currentUser = useCurrentUserV1();const policyV1Store = usePolicyV1Store();const { plan, planCheckRunList, events } = usePlanContext();-const comment = ref("");const restrictIssueCreationForSqlReviewPolicy = ref(false);const title = computed(() => {@@ -214,18 +199,7 @@ watchEffect(async () => {});const handleConfirm = async () => {- const { action } = props;- if (!action) return;-- dialog.info({- title: t("common.confirm"),- content: t("issue.this-plan-will-be-converted-to-a-new-issue"),- negativeText: t("common.cancel"),- positiveText: t("common.create"),- onPositiveClick: async () => {- await doCreateIssue();- },- });+ await doCreateIssue();};const doCreateIssue = async () => {@@ -242,9 +216,9 @@ const doCreateIssue = async () => {parent: project.value.name,issue: newIssue,});- const newCreatedIssue =+ const createdIssue =await issueServiceClientConnect.createIssue(issueRequest);- convertNewIssueToOld(newCreatedIssue);+ convertNewIssueToOld(createdIssue);// Then create the rollout from the planconst rolloutRequest = create(CreateRolloutRequestSchema, {@@ -254,32 +228,30 @@ const doCreateIssue = async () => {plan: plan.value.name,},});- const createdRollout = await rolloutServiceClientConnect.createRollout(rolloutRequest);-- // Update the plan to include the rollout reference- const updatePlanRequest = create(UpdatePlanRequestSchema, {- plan: {- name: plan.value.name,- rollout: createdRollout.name,- },- updateMask: {- paths: ["rollout"],- },- });- await planServiceClientConnect.updatePlan(updatePlanRequest);+ await rolloutServiceClientConnect.createRollout(rolloutRequest);// Emit status changed to refresh the UIevents.emit("status-changed", { eager: true });nextTick(() => {- // Stay on the plan page to see the rollout actions- router.push({- name: PROJECT_V1_ROUTE_PLAN_DETAIL,- params: {- projectId: extractProjectResourceName(plan.value.name),- planId: extractPlanUID(plan.value.name),- },- });+ if (isDev()) {+ router.push({+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,+ params: {+ projectId: extractProjectResourceName(plan.value.name),+ issueId: extractIssueUID(createdIssue.name),+ },+ });+ } else {+ // TODO(steven): remove me please.+ router.push({+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL,+ params: {+ projectId: extractProjectResourceName(plan.value.name),+ issueSlug: issueV1Slug(createdIssue.name, createdIssue.title),+ },+ });+ }});} finally {state.loading = false;@@ -296,8 +268,4 @@ const buildIssue = () => {issue.type = Issue_Type.DATABASE_CHANGE;return issue;};--const resetState = () => {- comment.value = "";-};</script>diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionButton.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionButton.vueindex 538f55a7ef..804af62864 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionButton.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionButton.vue@@ -39,7 +39,7 @@ const actionDisplayName = (action: UnifiedAction): string => {case "REOPEN":return t("issue.batch-transition.reopen");case "CREATE_ISSUE":- return t("common.create") + " " + t("common.issue");+ return t("plan.ready-for-review");}};diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionGroup.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionGroup.vueindex 315efaa0e9..e7d6b5281a 100644--- a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionGroup.vue+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionGroup.vue@@ -58,7 +58,7 @@ const actionDisplayName = (action: UnifiedAction): string => {case "REOPEN":return t("issue.batch-transition.reopen");case "CREATE_ISSUE":- return t("common.create") + " " + t("common.issue");+ return t("plan.ready-for-review");}};diff --git a/frontend/src/components/Plan/components/RolloutView/TaskView.vue b/frontend/src/components/Plan/components/RolloutView/TaskView.vueindex 4cd23aa3f7..e65e42740f 100644--- a/frontend/src/components/Plan/components/RolloutView/TaskView.vue+++ b/frontend/src/components/Plan/components/RolloutView/TaskView.vue@@ -11,11 +11,9 @@:size="'large'":instance="database.instanceResource"/>- <span class="font-medium">{{- database.instanceResource.title- }}</span>+ <span>{{ database.instanceResource.title }}</span><ChevronRightIcon class="inline opacity-60 mx-2 w-5" />- <span>{{ database.databaseName }}</span>+ <span class="font-medium">{{ database.databaseName }}</span></div></div>diff --git a/frontend/src/components/Plan/components/SpecDetailView/TargetListSection.vue b/frontend/src/components/Plan/components/SpecDetailView/TargetListSection.vueindex 6400050b90..c7f8551244 100644--- a/frontend/src/components/Plan/components/SpecDetailView/TargetListSection.vue+++ b/frontend/src/components/Plan/components/SpecDetailView/TargetListSection.vue@@ -33,7 +33,7 @@</div></div>- <div class="relative flex-1">+ <div class="relative w-full flex-1"><divv-if="isLoadingTargets"class="flex items-center justify-center py-8"@@ -42,7 +42,7 @@</div><divv-else-if="targets.length > 0"- class="flex flex-wrap gap-2 overflow-y-auto"+ class="w-full flex flex-wrap gap-2 overflow-y-auto"><divv-for="item in tableData"@@ -98,6 +98,7 @@</template><script setup lang="ts">+import { create } from "@bufbuild/protobuf";import {ServerIcon,DatabaseIcon,@@ -111,10 +112,7 @@ import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";import { BBSpin } from "@/bbkit";import EngineIcon from "@/components/Icon/EngineIcon.vue";-import { create } from "@bufbuild/protobuf";import { planServiceClientConnect } from "@/grpcweb";-import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";-import { convertOldPlanToNew, convertNewPlanToOld } from "@/utils/v1/plan-conversions";import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/router/dashboard/projectV1";import {useInstanceV1Store,@@ -126,6 +124,7 @@ import {getProjectNameAndDatabaseGroupName,} from "@/store";import type { Engine } from "@/types/proto-es/v1/common_pb";+import { UpdatePlanRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import {extractInstanceResourceName,instanceV1Name,@@ -133,6 +132,10 @@ import {extractDatabaseGroupName,extractProjectResourceName,} from "@/utils";+import {+ convertOldPlanToNew,+ convertNewPlanToOld,+} from "@/utils/v1/plan-conversions";import { usePlanContext } from "../../logic/context";import { targetsForSpec } from "../../logic/plan";import AllTargetsDrawer from "./AllTargetsDrawer.vue";diff --git a/frontend/src/components/Plan/components/SpecsView.vue b/frontend/src/components/Plan/components/SpecsView.vueindex 7e3bafffe6..d0c08cd853 100644--- a/frontend/src/components/Plan/components/SpecsView.vue+++ b/frontend/src/components/Plan/components/SpecsView.vue@@ -1,5 +1,5 @@<template>- <div class="flex-1 flex pt-2 pb-4">+ <div class="w-full flex-1 flex pt-2 pb-4"><SpecDetailView :key="selectedSpec.id" /></div></template>diff --git a/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue b/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vueindex 7162861666..53032eb008 100644--- a/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue+++ b/frontend/src/components/Plan/components/StatementSection/ReleaseView/ReleaseView.vue@@ -23,15 +23,20 @@v-if="release && isValidReleaseName(release.name)"size="small"tag="a"+ text:href="`/${release.name}`"target="_blank"+ icon-placement="right">{{ $t("common.view") }}+ <template #icon>+ <ExternalLinkIcon class="w-4 h-4" />+ </template></NButton></div></div>- <div v-if="release" class="border rounded-md p-4 bg-gray-50">+ <div v-if="release" class="border rounded-md px-4 py-3 bg-gray-50"><div class="space-y-3"><div class="flex items-start justify-between"><div>@@ -105,7 +110,9 @@</h4><div class="text-xs"><span class="text-gray-500"- >{{ getVCSTypeText(convertVCSTypeToNew(release.vcsSource.vcsType)) }}:</span+ >{{+ getVCSTypeText(convertVCSTypeToNew(release.vcsSource.vcsType))+ }}:</span><av-if="release.vcsSource.url"@@ -147,7 +154,7 @@<script setup lang="ts">import dayjs from "dayjs";-import { PackageIcon } from "lucide-vue-next";+import { PackageIcon, ExternalLinkIcon } from "lucide-vue-next";import { NAlert, NButton } from "naive-ui";import { computed } from "vue";import { useI18n } from "vue-i18n";diff --git a/frontend/src/components/Plan/logic/poll.ts b/frontend/src/components/Plan/logic/poll.tsindex bf6e8fc6c9..e8f082422f 100644--- a/frontend/src/components/Plan/logic/poll.ts+++ b/frontend/src/components/Plan/logic/poll.ts@@ -9,13 +9,13 @@ import {import { useCurrentProjectV1 } from "@/store";import { useIssueCommentStore } from "@/store";import { usePlanStore } from "@/store/modules/v1/plan";-import { ListPlanCheckRunsRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { GetIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";+import { ListPlanCheckRunsRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { GetRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import { ListIssueCommentsRequest } from "@/types/proto/v1/issue_service";import { hasProjectPermissionV2 } from "@/utils";-import { convertNewPlanCheckRunToOld } from "@/utils/v1/plan-conversions";import { convertNewIssueToOld } from "@/utils/v1/issue-conversions";+import { convertNewPlanCheckRunToOld } from "@/utils/v1/plan-conversions";import { convertNewRolloutToOld } from "@/utils/v1/rollout-conversions";import { usePlanContext } from "./context";@@ -52,12 +52,17 @@ export const usePollPlan = () => {}// Refresh rollout if it exists- if (updatedPlan.rollout && rollout && hasProjectPermissionV2(project.value, "bb.rollouts.get")) {+ if (+ updatedPlan.rollout &&+ rollout &&+ hasProjectPermissionV2(project.value, "bb.rollouts.get")+ ) {try {const rolloutRequest = create(GetRolloutRequestSchema, {name: updatedPlan.rollout,});- const newRollout = await rolloutServiceClientConnect.getRollout(rolloutRequest);+ const newRollout =+ await rolloutServiceClientConnect.getRollout(rolloutRequest);rollout.value = convertNewRolloutToOld(newRollout);} catch {// Rollout might not exist or we don't have permission@@ -90,19 +95,33 @@ export const usePollPlan = () => {);};- const poller = useProgressivePoll(refreshPlan, {- interval: {- min: 500,- max: 10000,- growth: 2,- jitter: 500,+ // TODO: split this into a atomic resource poller.+ const poller = useProgressivePoll(+ () => {+ return Promise.all([+ refreshPlan(),+ refreshIssue(),+ refreshIssueComments(),+ ]);},- });+ {+ interval: {+ min: 500,+ max: 10000,+ growth: 2,+ jitter: 500,+ },+ }+ );// Register event handlersevents.on("status-changed", async ({ eager }) => {if (eager) {- await Promise.all([refreshPlan(), refreshIssue()]);+ await Promise.all([+ refreshPlan(),+ refreshIssue(),+ refreshIssueComments(),+ ]);poller.restart();}});diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex ead4f0badd..d3e4bb4aae 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -281,7 +281,7 @@"selected-n-tasks": "{n} task selected | {n} tasks selected","no-tasks-selected": "No tasks selected","no-runnable-tasks": "No runnable tasks",- "no-skippable-tasks": "No skippable tasks",+ "no-skippable-tasks": "No skippable tasks","no-cancellable-tasks": "No cancellable tasks","cross-stage-not-supported": "Cross-stage operations not supported","no-permission": "No permission to perform this action",@@ -1016,7 +1016,6 @@}},"sql-review-only": "SQL Review Only",- "this-plan-will-be-converted-to-a-new-issue": "This plan will be converted to a new issue","title": {"edit-schema": "Edit schema","change-data": "Change data",@@ -2657,9 +2656,6 @@"self": "Export Center","permission-denied": "Permission denied"},- "review-center": {- "self": "Review Center"- },"schema-designer": {"use-tips": "Click a table to start."},diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex e38587f584..e59746176b 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -1016,7 +1016,6 @@}},"sql-review-only": "Sólo revisión de SQL",- "this-plan-will-be-converted-to-a-new-issue": "Este plan se convertirá en una nueva edición.","title": {"edit-schema": "Editar esquema","change-data": "Cambiar datos",@@ -2657,9 +2656,6 @@"self": "centro de exportacion","permission-denied": "Permiso denegado"},- "review-center": {- "self": "Centro de revisión"- },"schema-designer": {"use-tips": "Selecciona las tablas a diseñar"},@@ -2805,4 +2801,4 @@"last-visit": "Última visita","changelog-for-version": "Registro de cambios para {version}"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 79c60d018b..6112131498 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -1016,7 +1016,6 @@}},"sql-review-only": "SQLレビューのみ",- "this-plan-will-be-converted-to-a-new-issue": "この計画は新しい問題に変換されます","title": {"edit-schema": "スキーマを編集","change-data": "データの変更",@@ -2657,9 +2656,6 @@"self": "エクスポートセンター","permission-denied": "この操作を実行する権限がありません"},- "review-center": {- "self": "レビューセンター"- },"schema-designer": {"use-tips": "デザインするテーブルを選択してください"},@@ -2805,4 +2801,4 @@"last-visit": "最終訪問","changelog-for-version": "{version} の変更履歴"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex a4c4ff33a9..d32569f896 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -1016,7 +1016,6 @@}},"sql-review-only": "Chỉ đánh giá SQL",- "this-plan-will-be-converted-to-a-new-issue": "Kế hoạch này sẽ được chuyển đổi thành một vấn đề mới","title": {"edit-schema": "Chỉnh sửa lược đồ","change-data": "Thay đổi dữ liệu",@@ -2657,9 +2656,6 @@"self": "Trung tâm xuất","permission-denied": "Quyền bị từ chối"},- "review-center": {- "self": "Trung tâm đánh giá"- },"schema-designer": {"use-tips": "Nhấp vào một bảng để bắt đầu."},@@ -2805,4 +2801,4 @@"last-visit": "Lần truy cập cuối","changelog-for-version": "Nhật ký thay đổi cho phiên bản {version}"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 8421bcae0c..aa2936593c 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -1016,7 +1016,6 @@}},"sql-review-only": "仅 SQL 审核",- "this-plan-will-be-converted-to-a-new-issue": "该变更计划将转换为一个工单","title": {"edit-schema": "变更 Schema","change-data": "变更数据",@@ -2657,9 +2656,6 @@"self": "导出中心","permission-denied": "您没有权限执行此操作"},- "review-center": {- "self": "SQL 审核中心"- },"schema-designer": {"use-tips": "选择需要设计的表"},diff --git a/frontend/src/router/dashboard/projectV1.ts b/frontend/src/router/dashboard/projectV1.tsindex 125e0864db..9fcd43f416 100644--- a/frontend/src/router/dashboard/projectV1.ts+++ b/frontend/src/router/dashboard/projectV1.ts@@ -234,8 +234,7 @@ const projectV1Routes: RouteRecordRaw[] = [path: "plans",name: PROJECT_V1_ROUTE_PLANS,meta: {- // TODO(claude): rename title to "Plans" later.- title: () => t("review-center.self"),+ title: () => t("plan.plans"),requiredPermissionList: () => ["bb.databases.list", "bb.plans.list"],},component: () => import("@/views/ReviewCenter/index.vue"),