Skip to content

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

feat(frontend): support "dismissed stale approval" activity (#2116)

Liu Jifb1d6617007e
diff --git a/frontend/src/components/Issue/IssueActivityPanel.vue b/frontend/src/components/Issue/IssueActivityPanel.vue
index 4d8b7eb59a..48ea2531b9 100644
--- a/frontend/src/components/Issue/IssueActivityPanel.vue
+++ b/frontend/src/components/Issue/IssueActivityPanel.vue
@@ -531,6 +531,9 @@ const actionIcon = (activity: Activity): ActionIconType => {
case "FAILED": {
return "fail";
}
+ case "PENDING_APPROVAL": {
+ return "avatar"; // stale approval dismissed.
+ }
}
} else if (activity.type == "bb.pipeline.task.file.commit") {
return "commit";
@@ -588,6 +591,16 @@ const actionSentence = (activity: Activity): string => {
switch (activity.type) {
case "bb.pipeline.task.status.update": {
const payload = activity.payload as ActivityTaskStatusUpdatePayload;
+ if (payload.newStatus === "PENDING_APPROVAL") {
+ // stale approval dismissed.
+
+ const task = findTaskById(issue.value.pipeline, payload.taskId);
+ const taskName = t("activity.sentence.task-name", { name: task.name });
+ return t("activity.sentence.dismissed-stale-approval", {
+ task: taskName,
+ });
+ }
+
let str = t("activity.sentence.changed");
switch (payload.newStatus) {
case "PENDING": {
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 58ed5ac208..2e5dad294c 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -431,7 +431,8 @@
"completed": "completed",
"failed": "failed",
"task-name": " task {name}",
- "committed-to-at": "committed {file} to{branch}{'@'}{repo}"
+ "committed-to-at": "committed {file} to{branch}{'@'}{repo}",
+ "dismissed-stale-approval": "dismissed stale approvals of {task}"
},
"subject-prefix": {
"task": "Task"
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 09693a1ee1..f4163a69ef 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -432,7 +432,8 @@
"completed": "完成",
"failed": "失败",
"task-name": "任务 {name}",
- "committed-to-at": "提交 {file} 到 {branch}{'@'}{repo}"
+ "committed-to-at": "提交 {file} 到 {branch}{'@'}{repo}",
+ "dismissed-stale-approval": "更新了{task},此前的批准已被撤销"
},
"subject-prefix": {
"task": "任务"