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(react): clarify done activity wording in issue detail (#20035)
boojack62076345b960
diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vueindex a1b6465de9..4f5bd2fe49 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/ApprovalFlowSection/ApprovalFlowSection.vue@@ -35,6 +35,7 @@:step-index="index":step-number="index + 1":issue="issue"+ :readonly="hasRollout"/></NTimeline><div@@ -65,9 +66,13 @@ interface StatusTag {type?: TagProps["type"];}-const props = defineProps<{- issue: Issue;-}>();+const props = withDefaults(+ defineProps<{+ issue: Issue;+ hasRollout?: boolean;+ }>(),+ { hasRollout: false }+);const { t } = useI18n();diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vueindex fcffb73fde..f0157c7947 100644--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/Sidebar.vue@@ -9,7 +9,7 @@</div><!-- 2. Approval Flow - Reviewers -->- <ApprovalFlowSection :issue="issue" />+ <ApprovalFlowSection :issue="issue" :has-rollout="plan.hasRollout" /><!-- 3. Labels - Metadata --><IssueLabelsdiff --git a/frontend/src/components/Plan/components/PlanDetailPage/PlanMetadataSidebar.vue b/frontend/src/components/Plan/components/PlanDetailPage/PlanMetadataSidebar.vueindex b605096c4d..900d8012d3 100644--- a/frontend/src/components/Plan/components/PlanDetailPage/PlanMetadataSidebar.vue+++ b/frontend/src/components/Plan/components/PlanDetailPage/PlanMetadataSidebar.vue@@ -22,7 +22,7 @@<!-- Issue group: Approval flow + link + Labels --><div v-if="issue" class="flex flex-col gap-3 py-3 border-t">- <ApprovalFlowSection :issue="issue" />+ <ApprovalFlowSection :issue="issue" :has-rollout="!!rollout" /><IssueLabels:project="project":value="issue.labels || []"diff --git a/frontend/src/components/Plan/components/PlanDetailPage/PlanSectionReview.vue b/frontend/src/components/Plan/components/PlanDetailPage/PlanSectionReview.vueindex 477931f5bc..08458e380c 100644--- a/frontend/src/components/Plan/components/PlanDetailPage/PlanSectionReview.vue+++ b/frontend/src/components/Plan/components/PlanDetailPage/PlanSectionReview.vue@@ -41,6 +41,7 @@:step-index="index":step-number="index + 1":issue="issue"+ :readonly="plan.hasRollout"/></NTimeline></div>diff --git a/frontend/src/components/Plan/components/PlanDetailPage/usePhaseState.ts b/frontend/src/components/Plan/components/PlanDetailPage/usePhaseState.tsindex bbd716aaad..07f14f85d8 100644--- a/frontend/src/components/Plan/components/PlanDetailPage/usePhaseState.ts+++ b/frontend/src/components/Plan/components/PlanDetailPage/usePhaseState.ts@@ -97,12 +97,14 @@ export const usePhaseState = (type: "info",},};- // If review phase is completed but approval is still pending, it was bypassed+ // If review phase is completed but approval was not explicitly approved/skipped,+ // the approval was bypassed by manual rollout creation — show "Skipped"if (statusMap.value.review === "completed" &&- issue.value.approvalStatus === Issue_ApprovalStatus.PENDING+ issue.value.approvalStatus !== Issue_ApprovalStatus.APPROVED &&+ issue.value.approvalStatus !== Issue_ApprovalStatus.SKIPPED) {- return { label: t("common.bypassed"), type: "default" };+ return { label: t("common.skipped"), type: "default" };}return map[issue.value.approvalStatus];});diff --git a/frontend/src/components/RolloutV1/components/Task/TaskItem.vue b/frontend/src/components/RolloutV1/components/Task/TaskItem.vueindex f69373bf83..f237408f2b 100644--- a/frontend/src/components/RolloutV1/components/Task/TaskItem.vue+++ b/frontend/src/components/RolloutV1/components/Task/TaskItem.vue@@ -104,20 +104,18 @@<!-- Task metadata - expanded only --><div v-if="isExpanded" class="space-y-3"><!-- Task information line with quick actions -->- <div class="flex items-center justify-between gap-x-2">+ <div class="flex items-center gap-x-2"><divv-if="timingType === 'scheduled'"class="flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-gray-600">- <template>- <ScheduledTimeIndicator- :time="scheduledTime"- :label="t('task.scheduled-time')"- />- </template>+ <ScheduledTimeIndicator+ :time="scheduledTime"+ :label="t('task.scheduled-time')"+ /></div><!-- Quick action buttons -->- <div v-if="hasActions" class="flex items-center gap-x-2 shrink-0">+ <div v-if="hasActions" class="ml-auto flex items-center gap-x-2 shrink-0"><NButtonv-if="canRun"size="tiny"diff --git a/frontend/src/components/RolloutV1/components/Task/taskPermissions.ts b/frontend/src/components/RolloutV1/components/Task/taskPermissions.tsindex 858372345d..9f9b7db730 100644--- a/frontend/src/components/RolloutV1/components/Task/taskPermissions.ts+++ b/frontend/src/components/RolloutV1/components/Task/taskPermissions.ts@@ -1,15 +1,16 @@import {- useCurrentProjectV1,useCurrentUserV1,usePolicyV1Store,useProjectIamPolicyStore,+ useProjectV1Store,} from "@/store";-import { roleNamePrefix } from "@/store/modules/v1/common";+import { projectNamePrefix, roleNamePrefix } from "@/store/modules/v1/common";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";import { PolicyType } from "@/types/proto-es/v1/org_policy_service_pb";import type { Task } from "@/types/proto-es/v1/rollout_service_pb";import {+ extractProjectResourceName,hasProjectPermissionV2,hasWorkspacePermissionV2,memberMapToRolesInProjectIAM,@@ -22,6 +23,17 @@ const rolloutPolicyAccessStateByEnvironment = new Map<RolloutPolicyAccessState>();+/**+ * Derive the full project resource name from the issue or first task.+ * Both carry the project id in their resource name+ * (e.g. "projects/foo/issues/1" or "projects/foo/rollouts/…").+ */+const resolveProjectName = (tasks: Task[], issue?: Issue): string => {+ const source = issue?.name ?? tasks[0]?.name ?? "";+ const id = extractProjectResourceName(source);+ return id ? `${projectNamePrefix}${id}` : "";+};+/*** Check if the current user can rollout the given tasks* - For data export issues: only the issue creator can rollout@@ -47,12 +59,15 @@ export const canRolloutTasks = (return issue.creator === currentUser.value.name;}- const { project } = useCurrentProjectV1();+ // Resolve project from issue/task resource name instead of useRoute()+ // so the check works correctly inside async callbacks (after await).+ const projectName = resolveProjectName(tasks, issue);+ const project = useProjectV1Store().getProjectByName(projectName);// First check: if user has bb.taskRuns.create permission, always allow rolloutconst hasCreatePermission =hasWorkspacePermissionV2("bb.taskRuns.create") ||- hasProjectPermissionV2(project.value, "bb.taskRuns.create");+ hasProjectPermissionV2(project, "bb.taskRuns.create");if (hasCreatePermission) {return true;}@@ -61,7 +76,7 @@ export const canRolloutTasks = (const projectIamPolicyStore = useProjectIamPolicyStore();const policyStore = usePolicyV1Store();const projectIamPolicy = projectIamPolicyStore.getProjectIamPolicy(- project.value.name+ project.name);const memberRoles = memberMapToRolesInProjectIAM(projectIamPolicy);const userRoles = memberRoles.get(currentUser.value.name);@@ -112,33 +127,28 @@ export const canRolloutTasks = (export const preloadRolloutPermissionContext = async (tasks: Task[],- environment?: string+ environment?: string,+ issue?: Issue) => {if (tasks.length === 0 || !environment) return;- const { project } = useCurrentProjectV1();+ const projectName = resolveProjectName(tasks, issue);const policyStore = usePolicyV1Store();const projectIamPolicyStore = useProjectIamPolicyStore();- const environmentNames = [environment];-await Promise.allSettled([- projectIamPolicyStore.getOrFetchProjectIamPolicy(project.value.name),+ projectIamPolicyStore.getOrFetchProjectIamPolicy(projectName),]);- const policyResults = await Promise.allSettled(- environmentNames.map((environmentName) =>- policyStore.getOrFetchPolicyByParentAndType({- parentPath: environmentName,- policyType: PolicyType.ROLLOUT_POLICY,- })- )- );+ const policyResults = await Promise.allSettled([+ policyStore.getOrFetchPolicyByParentAndType({+ parentPath: environment,+ policyType: PolicyType.ROLLOUT_POLICY,+ }),+ ]);- policyResults.forEach((result, index) => {- rolloutPolicyAccessStateByEnvironment.set(- environmentNames[index],- result.status === "fulfilled" ? "loaded" : "unavailable"- );- });+ rolloutPolicyAccessStateByEnvironment.set(+ environment,+ policyResults[0]?.status === "fulfilled" ? "loaded" : "unavailable"+ );};diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 0d70b50f07..aa635859a5 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -222,7 +222,6 @@"archived": "Archived","back": "Back","back-to-workspace": "Back to workspace",- "bypassed": "Bypassed","cancel": "Cancel","canceled": "Canceled","cannot-undo-this-action": "You cannot undo this action",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 2ff17ea453..318dcca14a 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -222,7 +222,6 @@"archived": "Archivada","back": "Volver","back-to-workspace": "Volver al espacio de trabajo",- "bypassed": "Omitido","cancel": "Cancelar","canceled": "Cancelado","cannot-undo-this-action": "No se puede deshacer esta acción",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 0443ee8767..c70246593f 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -222,7 +222,6 @@"archived": "アーカイブ済み","back": "戻る","back-to-workspace": "ワークスペースに戻る",- "bypassed": "スキップ済み","cancel": "キャンセル","canceled": "キャンセル","cannot-undo-this-action": "この操作は元に戻せません",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 57ad1c24e7..4f2193b7ef 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -222,7 +222,6 @@"archived": "Đã lưu trữ","back": "Quay lại","back-to-workspace": "Quay lại không gian làm việc",- "bypassed": "Đã vượt qua","cancel": "Hủy","canceled": "Đã hủy","cannot-undo-this-action": "Bạn không thể hoàn tác hành động này.",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 20bb068c0e..f865047600 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -222,7 +222,6 @@"archived": "已归档","back": "返回","back-to-workspace": "返回工作空间",- "bypassed": "已绕过","cancel": "取消","canceled": "已取消","cannot-undo-this-action": "这个操作无法撤销",diff --git a/frontend/src/react/locales/en-US.json b/frontend/src/react/locales/en-US.jsonindex d60d769923..2c26cfddd1 100644--- a/frontend/src/react/locales/en-US.json+++ b/frontend/src/react/locales/en-US.json@@ -6,7 +6,11 @@"activity.sentence.created-issue": "created issue","activity.sentence.modified-sql-of": "modified SQL of","activity.sentence.reopened-issue": "reopened issue",- "activity.sentence.resolved-issue": "approved the issue",+ "activity.sentence.resolved-issue": "marked the issue as Done",+ "activity.sentence.review-done-rollout-created": "Review done, rollout created",+ "activity.sentence.review-done-rollout-created-for-plan": "Review done, rollout created for plan",+ "activity.sentence.review-skipped-rollout-created": "Review skipped, rollout created",+ "activity.sentence.review-skipped-rollout-created-for-plan": "Review skipped, rollout created for plan","agent": {"active-only-chats": "Active only","ai-not-configured": {diff --git a/frontend/src/react/locales/es-ES.json b/frontend/src/react/locales/es-ES.jsonindex a3cc6dd8f6..44872ca164 100644--- a/frontend/src/react/locales/es-ES.json+++ b/frontend/src/react/locales/es-ES.json@@ -6,7 +6,11 @@"activity.sentence.created-issue": "created issue","activity.sentence.modified-sql-of": "modified SQL of","activity.sentence.reopened-issue": "reopened issue",- "activity.sentence.resolved-issue": "approved the issue",+ "activity.sentence.resolved-issue": "marcó la incidencia como completada",+ "activity.sentence.review-done-rollout-created": "Revisión completada, rollout creado",+ "activity.sentence.review-done-rollout-created-for-plan": "Revisión completada, rollout creado para el plan",+ "activity.sentence.review-skipped-rollout-created": "Revisión omitida, rollout creado",+ "activity.sentence.review-skipped-rollout-created-for-plan": "Revisión omitida, rollout creado para el plan","agent": {"active-only-chats": "Solo activos","ai-not-configured": {diff --git a/frontend/src/react/locales/ja-JP.json b/frontend/src/react/locales/ja-JP.jsonindex e4609e1d78..aa84ac1715 100644--- a/frontend/src/react/locales/ja-JP.json+++ b/frontend/src/react/locales/ja-JP.json@@ -6,7 +6,11 @@"activity.sentence.created-issue": "created issue","activity.sentence.modified-sql-of": "modified SQL of","activity.sentence.reopened-issue": "reopened issue",- "activity.sentence.resolved-issue": "approved the issue",+ "activity.sentence.resolved-issue": "イシューを完了としてマークしました",+ "activity.sentence.review-done-rollout-created": "レビューが完了し、ロールアウトが作成されました",+ "activity.sentence.review-done-rollout-created-for-plan": "レビューが完了し、プランのロールアウトが作成されました",+ "activity.sentence.review-skipped-rollout-created": "レビューがスキップされ、ロールアウトが作成されました",+ "activity.sentence.review-skipped-rollout-created-for-plan": "レビューがスキップされ、プランのロールアウトが作成されました","agent": {"active-only-chats": "アクティブのみ","ai-not-configured": {diff --git a/frontend/src/react/locales/vi-VN.json b/frontend/src/react/locales/vi-VN.jsonindex 166248508a..f0ba0a4229 100644--- a/frontend/src/react/locales/vi-VN.json+++ b/frontend/src/react/locales/vi-VN.json@@ -6,7 +6,11 @@"activity.sentence.created-issue": "created issue","activity.sentence.modified-sql-of": "modified SQL of","activity.sentence.reopened-issue": "reopened issue",- "activity.sentence.resolved-issue": "approved the issue",+ "activity.sentence.resolved-issue": "đã đánh dấu vấn đề là Hoàn tất",+ "activity.sentence.review-done-rollout-created": "Đánh giá đã hoàn tất, rollout đã được tạo",+ "activity.sentence.review-done-rollout-created-for-plan": "Đánh giá đã hoàn tất, rollout đã được tạo cho kế hoạch",+ "activity.sentence.review-skipped-rollout-created": "Đánh giá đã được bỏ qua, rollout đã được tạo",+ "activity.sentence.review-skipped-rollout-created-for-plan": "Đánh giá đã được bỏ qua, rollout đã được tạo cho kế hoạch","agent": {"active-only-chats": "Chỉ hoạt động","ai-not-configured": {diff --git a/frontend/src/react/locales/zh-CN.json b/frontend/src/react/locales/zh-CN.jsonindex fdb4931966..0f482d5a21 100644--- a/frontend/src/react/locales/zh-CN.json+++ b/frontend/src/react/locales/zh-CN.json@@ -6,7 +6,11 @@"activity.sentence.created-issue": "created issue","activity.sentence.modified-sql-of": "modified SQL of","activity.sentence.reopened-issue": "reopened issue",- "activity.sentence.resolved-issue": "approved the issue",+ "activity.sentence.resolved-issue": "将工单标记为已完成",+ "activity.sentence.review-done-rollout-created": "审批完成,已创建发布",+ "activity.sentence.review-done-rollout-created-for-plan": "审批完成,已为计划创建发布",+ "activity.sentence.review-skipped-rollout-created": "已跳过审批,已创建发布",+ "activity.sentence.review-skipped-rollout-created-for-plan": "已跳过审批,已为计划创建发布","agent": {"active-only-chats": "仅活跃","ai-not-configured": {diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailActionBar.tsx b/frontend/src/react/pages/project/issue-detail/components/IssueDetailActionBar.tsxindex 14225ab5b8..2e33797185 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailActionBar.tsx+++ b/frontend/src/react/pages/project/issue-detail/components/IssueDetailActionBar.tsx@@ -5,6 +5,7 @@ import {CalendarX,ChevronDown,EllipsisVertical,+ ExternalLink,Loader2,} from "lucide-react";import {@@ -451,6 +452,7 @@ export function IssueDetailActionBar() {><span>#{extractPlanUID(page.plan.name)}</span><span>{t("common.plan")}</span>+ <ExternalLink className="size-3.5" /></Button>)}diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsx b/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsxindex 8e405ace32..d029d80519 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsx+++ b/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsx@@ -71,6 +71,7 @@ export function IssueDetailApprovalFlow() {}const approvalSteps = issue.approvalTemplate?.flow?.roles ?? [];+ const hasRollout = page.plan?.hasRollout ?? false;const statusTag = getStatusTag(issue, approvalSteps.length, t);return (@@ -109,7 +110,7 @@ export function IssueDetailApprovalFlow() {<ApprovalStepItemkey={`${step}-${index}`}issue={issue}- readonly={page.readonly}+ readonly={page.readonly || hasRollout}step={step}stepIndex={index}stepNumber={index + 1}diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx b/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsxindex 11017707e2..fc7e0a164a 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx+++ b/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx@@ -1,5 +1,12 @@import { create } from "@bufbuild/protobuf";-import { Loader2, Pencil, Play, Plus, ThumbsUp } from "lucide-react";+import {+ CheckCircle2,+ Loader2,+ Pencil,+ Play,+ Plus,+ ThumbsUp,+} from "lucide-react";import {type ReactNode,useCallback,@@ -23,6 +30,7 @@ import { useVueState } from "@/react/hooks/useVueState";import { cn } from "@/react/lib/utils";import { router } from "@/router";import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/router/dashboard/projectV1";+import { buildPlanDeployRouteFromPlanName } from "@/router/dashboard/projectV1RouteHelpers";import {extractUserEmail,getIssueCommentType,@@ -37,6 +45,7 @@ import {import { projectNamePrefix } from "@/store/modules/v1/common";import { getTimeForPbTimestampProtoEs, unknownUser } from "@/types";import {+ Issue_ApprovalStatus,type IssueComment,IssueComment_Approval_Status,IssueSchema,@@ -53,6 +62,7 @@ import {import { hasProjectPermissionV2 } from "@/utils/iam/permission";import { getSheetStatement } from "@/utils/v1/sheet";import { useIssueDetailContext } from "../context/IssueDetailContext";+import { isDatabaseChangeDoneRolloutComment } from "../utils/activity";function useIssueRefTransform(projectName: string | undefined) {const { t } = useTranslation();@@ -535,6 +545,7 @@ function IssueCommentRow({function CommentActionHeader({ issueComment }: { issueComment: IssueComment }) {const { t } = useTranslation();+ const page = useIssueDetailContext();const userStore = useUserStore();const creator = useVueState(() =>@@ -549,7 +560,11 @@ function CommentActionHeader({ issueComment }: { issueComment: IssueComment }) {return (<>- <CommentCreator creator={creator} />+ {!isDatabaseChangeDoneRolloutComment(+ page.issue,+ page.plan,+ issueComment+ ) && <CommentCreator creator={creator} />}<CommentActionSentence issueComment={issueComment} />{issueComment.createTime && (<HumanizeTs className="text-gray-500" ts={createdTs / 1000} />@@ -640,6 +655,44 @@ function CommentActionSentence({}if (fromStatus !== undefined && toStatus !== undefined) {if (toStatus === IssueStatus.DONE) {+ if (+ isDatabaseChangeDoneRolloutComment(+ page.issue,+ page.plan,+ issueComment+ )+ ) {+ const planUID = page.plan ? extractPlanUID(page.plan.name) : "";+ const planHref = page.plan+ ? router.resolve(buildPlanDeployRouteFromPlanName(page.plan.name))+ .href+ : "";+ const sentence =+ page.issue?.approvalStatus === Issue_ApprovalStatus.APPROVED+ ? planUID+ ? t("activity.sentence.review-done-rollout-created-for-plan")+ : t("activity.sentence.review-done-rollout-created")+ : planUID+ ? t("activity.sentence.review-skipped-rollout-created-for-plan")+ : t("activity.sentence.review-skipped-rollout-created");++ return (+ <span className="wrap-break-word min-w-0 text-gray-600">+ {sentence}+ {planUID && planHref && (+ <>+ {" "}+ <a+ className="font-medium text-accent hover:underline"+ href={planHref}+ >+ #{planUID}+ </a>+ </>+ )}+ </span>+ );+ }return (<span className="wrap-break-word min-w-0 text-gray-600">{t("activity.sentence.resolved-issue")}@@ -717,6 +770,7 @@ function CommentActionSentence({}function CommentActionIcon({ issueComment }: { issueComment: IssueComment }) {+ const page = useIssueDetailContext();const userStore = useUserStore();const user = useVueState(() =>@@ -760,6 +814,17 @@ function CommentActionIcon({ issueComment }: { issueComment: IssueComment }) {commentType === IssueCommentType.ISSUE_UPDATE &&issueComment.event.case === "issueUpdate") {+ if (+ isDatabaseChangeDoneRolloutComment(page.issue, page.plan, issueComment)+ ) {+ return (+ <CommentIconBadge+ className="bg-success text-white"+ icon={<CheckCircle2 className="size-4" />}+ />+ );+ }+const { fromLabels, toDescription, toLabels, toTitle } =issueComment.event.value;if (diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsx b/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsxindex f7669c8296..888e04d8c0 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsx+++ b/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsx@@ -2,7 +2,10 @@ import { Ban, CheckCircle2, Menu } from "lucide-react";import { useTranslation } from "react-i18next";import { Badge } from "@/react/components/ui/badge";import { Button } from "@/react/components/ui/button";-import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";+import {+ Issue_ApprovalStatus,+ IssueStatus,+} from "@/types/proto-es/v1/issue_service_pb";import { useIssueDetailContext } from "../context/IssueDetailContext";import { IssueDetailActionBar } from "./IssueDetailActionBar";import { IssueDetailTitleInput } from "./IssueDetailTitleInput";@@ -12,6 +15,14 @@ export function IssueDetailHeader() {const page = useIssueDetailContext();const showClosedTag = page.issue?.status === IssueStatus.CANCELED;const showDoneTag = page.issue?.status === IssueStatus.DONE;+ const doneTagLabel =+ page.issue?.approvalStatus === Issue_ApprovalStatus.APPROVED+ ? t("common.approved")+ : t("common.skipped");+ const doneTagVariant =+ page.issue?.approvalStatus === Issue_ApprovalStatus.APPROVED+ ? "success"+ : "default";const showMobileSidebarButton = page.sidebarMode === "MOBILE";return (@@ -29,10 +40,10 @@ export function IssueDetailHeader() {{showDoneTag && !showClosedTag && (<BadgeclassName="shrink-0 gap-x-1.5 rounded-full px-3 py-1"- variant="success"+ variant={doneTagVariant}><CheckCircle2 className="h-4 w-4" />- {t("common.approved")}+ {doneTagLabel}</Badge>)}diff --git a/frontend/src/react/pages/project/issue-detail/utils/activity.ts b/frontend/src/react/pages/project/issue-detail/utils/activity.tsnew file mode 100644index 0000000000..7640bf6ce4--- /dev/null+++ b/frontend/src/react/pages/project/issue-detail/utils/activity.ts@@ -0,0 +1,24 @@+import { getIssueCommentType, IssueCommentType } from "@/store";+import type { Issue, IssueComment } from "@/types/proto-es/v1/issue_service_pb";+import { Issue_Type, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";+import type { Plan } from "@/types/proto-es/v1/plan_service_pb";++export const isDatabaseChangeDoneRolloutComment = (+ issue: Issue | undefined,+ plan: Plan | undefined,+ issueComment: IssueComment+) => {+ if (issueComment.event.case !== "issueUpdate") {+ return false;+ }++ const { fromStatus, toStatus } = issueComment.event.value;+ return (+ issue?.type === Issue_Type.DATABASE_CHANGE &&+ plan?.hasRollout === true &&+ getIssueCommentType(issueComment) === IssueCommentType.ISSUE_UPDATE &&+ fromStatus !== undefined &&+ fromStatus !== IssueStatus.DONE &&+ toStatus === IssueStatus.DONE+ );+};