Skip to content

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

chore: retire unused legacy issue activity codes (#11354)

Liu Jia3c5f864b554
diff --git a/frontend/src/components/Issue/activity/ActionCreator.vue b/frontend/src/components/Issue/activity/ActionCreator.vue
deleted file mode 100644
index 407ba3f797..0000000000
--- a/frontend/src/components/Issue/activity/ActionCreator.vue
+++ /dev/null
@@ -1,35 +0,0 @@
-<template>
- <router-link
- v-if="userEmail !== SYSTEM_BOT_EMAIL"
- :to="`/users/${userEmail}`"
- class="font-medium text-main whitespace-nowrap hover:underline"
- exact-active-class=""
- >{{ user?.title }}</router-link
- >
- <div v-else class="inline-flex items-center">
- <span class="font-medium text-main whitespace-nowrap">
- {{ user?.title }}
- </span>
- <SystemBotTag />
- </div>
-</template>
-
-<script lang="ts" setup>
-import { computed } from "vue";
-import { useUserStore } from "@/store";
-import { SYSTEM_BOT_EMAIL } from "@/types";
-import type { LogEntity } from "@/types/proto/v1/logging_service";
-import { extractUserResourceName } from "@/utils";
-
-const props = defineProps<{
- activity: LogEntity;
-}>();
-
-const userEmail = computed(() => {
- return extractUserResourceName(props.activity.creator);
-});
-
-const user = computed(() => {
- return useUserStore().getUserByEmail(userEmail.value);
-});
-</script>
diff --git a/frontend/src/components/Issue/activity/ActionIcon.vue b/frontend/src/components/Issue/activity/ActionIcon.vue
deleted file mode 100644
index a7b3575d90..0000000000
--- a/frontend/src/components/Issue/activity/ActionIcon.vue
+++ /dev/null
@@ -1,234 +0,0 @@
-<template>
- <div class="relative">
- <div v-if="icon == 'system'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-control-bg rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <img class="mt-1" src="@/assets/logo-icon.svg" alt="Bytebase" />
- </div>
- </div>
- <div v-else-if="icon == 'avatar'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-white rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <PrincipalAvatar
- :username="user?.title"
- override-class="w-7 h-7 font-medium"
- override-text-size="0.8rem"
- />
- </div>
- </div>
- <div v-else-if="icon == 'create'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-control-bg rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <heroicons-solid:plus-sm class="w-5 h-5 text-control" />
- </div>
- </div>
- <div v-else-if="icon == 'update'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-control-bg rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <heroicons-solid:pencil class="w-4 h-4 text-control" />
- </div>
- </div>
- <div v-else-if="icon == 'run' || icon == 'rollout'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-control-bg rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <heroicons-outline:play class="w-6 h-6 text-control" />
- </div>
- </div>
- <div v-else-if="icon == 'approve-review'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-control-bg rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <heroicons-outline:thumb-up class="w-5 h-5 text-control" />
- </div>
- </div>
- <div v-else-if="icon == 'reject-review'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-warning rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <heroicons:pause-solid class="w-5 h-5 text-white" />
- </div>
- </div>
- <div v-else-if="icon == 're-request-review'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-white rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <PrincipalAvatar
- :username="user?.title"
- override-class="w-7 h-7 font-medium"
- override-text-size="0.8rem"
- />
- </div>
- </div>
- <div v-else-if="icon == 'cancel'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-control-bg rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <heroicons-outline:minus class="w-5 h-5 text-control" />
- </div>
- </div>
- <div v-else-if="icon == 'fail'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-white rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <heroicons-outline:exclamation-circle class="w-6 h-6 text-error" />
- </div>
- </div>
- <div v-else-if="icon == 'complete'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-white rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <heroicons-outline:check-circle class="w-6 h-6 text-success" />
- </div>
- </div>
- <div v-else-if="icon == 'skip'" class="relative pl-1">
- <div
- class="w-6 h-6 bg-gray-200 rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <SkipIcon class="w-5 h-5 text-gray-500" />
- </div>
- </div>
- <div v-else-if="icon == 'commit'" class="relative pl-0.5">
- <div
- class="w-7 h-7 bg-control-bg rounded-full ring-4 ring-white flex items-center justify-center"
- >
- <heroicons-outline:code class="w-5 h-5 text-control" />
- </div>
- </div>
- </div>
-</template>
-
-<script lang="ts" setup>
-import { computed } from "vue";
-import { SkipIcon } from "@/components/Icon";
-import PrincipalAvatar from "@/components/PrincipalAvatar.vue";
-import { useUserStore } from "@/store";
-import type {
- ActivityIssueCommentCreatePayload,
- ActivityStageStatusUpdatePayload,
- ActivityTaskStatusUpdatePayload,
-} from "@/types";
-import { SYSTEM_BOT_EMAIL } from "@/types";
-import type { LogEntity } from "@/types/proto/v1/logging_service";
-import { LogEntity_Action } from "@/types/proto/v1/logging_service";
-import { extractUserResourceName } from "@/utils";
-
-type ActionIconType =
- | "avatar"
- | "system"
- | "create"
- | "update"
- | "run"
- | "approve-review"
- | "reject-review"
- | "re-request-review"
- | "rollout"
- | "cancel"
- | "fail"
- | "complete"
- | "skip"
- | "commit";
-
-const props = defineProps<{
- activity: LogEntity;
-}>();
-
-const user = computed(() => {
- const email = extractUserResourceName(props.activity.creator);
- return useUserStore().getUserByEmail(email);
-});
-
-const icon = computed((): ActionIconType => {
- const { activity } = props;
- if (activity.action == LogEntity_Action.ACTION_ISSUE_CREATE) {
- return "create";
- } else if (activity.action == LogEntity_Action.ACTION_ISSUE_FIELD_UPDATE) {
- return "update";
- } else if (
- activity.action == LogEntity_Action.ACTION_PIPELINE_TASK_STATUS_UPDATE
- ) {
- const payload = JSON.parse(
- activity.payload
- ) as ActivityTaskStatusUpdatePayload;
- switch (payload.newStatus) {
- case "PENDING": {
- if (payload.oldStatus == "RUNNING") {
- return "cancel";
- } else if (payload.oldStatus == "PENDING_APPROVAL") {
- return "rollout";
- }
- break;
- }
- case "CANCELED": {
- return "cancel";
- }
- case "RUNNING": {
- return "run";
- }
- case "DONE": {
- if (payload.oldStatus === "RUNNING") {
- return "complete";
- } else {
- return "skip";
- }
- }
- case "FAILED": {
- return "fail";
- }
- case "PENDING_APPROVAL": {
- return "avatar"; // stale approval dismissed.
- }
- }
- } else if (
- activity.action == LogEntity_Action.ACTION_PIPELINE_STAGE_STATUS_UPDATE
- ) {
- const payload = JSON.parse(
- activity.payload
- ) as ActivityStageStatusUpdatePayload;
- switch (payload.stageStatusUpdateType) {
- case "BEGIN": {
- return "run";
- }
- case "END": {
- return "complete";
- }
- }
- } else if (
- activity.action == LogEntity_Action.ACTION_PIPELINE_TASK_FILE_COMMIT
- ) {
- return "commit";
- } else if (
- activity.action == LogEntity_Action.ACTION_PIPELINE_TASK_STATEMENT_UPDATE
- ) {
- return "update";
- } else if (
- activity.action ==
- LogEntity_Action.ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE
- ) {
- return "update";
- } else if (activity.action === LogEntity_Action.ACTION_ISSUE_COMMENT_CREATE) {
- const payload = JSON.parse(
- activity.payload
- ) as ActivityIssueCommentCreatePayload;
- if (payload.approvalEvent) {
- const { status } = payload.approvalEvent;
- switch (status) {
- case "APPROVED":
- return "approve-review";
- case "REJECTED":
- return "reject-review";
- case "PENDING":
- return "re-request-review";
- }
- }
- }
-
- return extractUserResourceName(activity.creator) == SYSTEM_BOT_EMAIL
- ? "system"
- : "avatar";
-});
-</script>
diff --git a/frontend/src/components/Issue/activity/ActionSentence.vue b/frontend/src/components/Issue/activity/ActionSentence.vue
deleted file mode 100644
index d446391d2a..0000000000
--- a/frontend/src/components/Issue/activity/ActionSentence.vue
+++ /dev/null
@@ -1,327 +0,0 @@
-<template>
- <Renderer />
-</template>
-
-<script lang="ts" setup>
-import dayjs from "dayjs";
-import type { PropType } from "vue";
-import { defineComponent, h, watch } from "vue";
-import { Translation, useI18n } from "vue-i18n";
-import TextOverflowPopover from "@/components/misc/TextOverflowPopover.vue";
-import { useSheetV1Store, useSheetStatementByUID } from "@/store";
-import type {
- ActivityIssueCommentCreatePayload,
- ActivityStageStatusUpdatePayload,
- ActivityTaskEarliestAllowedTimeUpdatePayload,
- ActivityTaskFileCommitPayload,
- ActivityTaskStatementUpdatePayload,
- ActivityTaskStatusUpdatePayload,
- Issue,
-} from "@/types";
-import { SYSTEM_BOT_EMAIL, UNKNOWN_ID, empty } from "@/types";
-import type { LogEntity } from "@/types/proto/v1/logging_service";
-import { LogEntity_Action } from "@/types/proto/v1/logging_service";
-import {
- findStageById,
- findTaskById,
- issueActivityActionSentence,
-} from "@/utils";
-import { extractUserResourceName } from "@/utils";
-import StageName from "./StageName.vue";
-import TaskName from "./TaskName.vue";
-
-type RenderedContent = string | ReturnType<typeof h>;
-
-const props = defineProps({
- activity: {
- type: Object as PropType<LogEntity>,
- required: true,
- },
- issue: {
- type: Object as PropType<Issue>,
- required: true,
- },
-});
-
-const { t } = useI18n();
-const sheetV1Store = useSheetV1Store();
-
-const renderActionSentence = () => {
- const renderSpan = (content: string, props?: object) => {
- return h("span", props, content);
- };
-
- const { activity, issue } = props;
- if (activity.resource.startsWith("issues")) {
- if (activity.action === LogEntity_Action.ACTION_ISSUE_COMMENT_CREATE) {
- const payload = JSON.parse(
- activity.payload
- ) as ActivityIssueCommentCreatePayload;
- if (payload.externalApprovalEvent) {
- if (payload.externalApprovalEvent.action == "REJECT") {
- let imName = "";
- switch (payload.externalApprovalEvent.type) {
- case "bb.plugin.app.feishu":
- imName = t("common.feishu");
- break;
- }
- return renderSpan(
- t("activity.sentence.external-approval-rejected", {
- stageName: payload.externalApprovalEvent.stageName,
- imName: imName,
- })
- );
- }
- }
- if (payload.approvalEvent) {
- if (payload.approvalEvent) {
- const { status } = payload.approvalEvent;
- const dict: Record<typeof status, string> = {
- APPROVED: t("custom-approval.issue-review.approved-issue"),
- REJECTED: t("custom-approval.issue-review.sent-back-issue"),
- PENDING: t("custom-approval.issue-review.re-requested-review"),
- };
- const verb = dict[status];
- if (verb) {
- return renderSpan(maybeAutomaticallyVerb(activity, verb));
- }
- }
- }
- }
-
- const [tid, params] = issueActivityActionSentence(activity);
- return renderSpan(t(tid, params));
- }
- switch (activity.action) {
- case LogEntity_Action.ACTION_PIPELINE_TASK_STATUS_UPDATE: {
- const payload = JSON.parse(
- activity.payload
- ) as ActivityTaskStatusUpdatePayload;
- if (payload.newStatus === "PENDING_APPROVAL") {
- // stale approval dismissed.
-
- const task = findTaskById(
- issue.pipeline ?? empty("PIPELINE"),
- payload.taskId
- );
- const taskName = t("activity.sentence.task-name", {
- name: task.name,
- });
- return t("activity.sentence.dismissed-stale-approval", {
- task: taskName,
- });
- }
- const params: VerbTypeTarget = {
- activity,
- verb: "",
- type: t("common.task"),
- target: "",
- };
- switch (payload.newStatus) {
- case "PENDING": {
- if (payload.oldStatus == "RUNNING") {
- params.verb = t("activity.sentence.canceled");
- } else if (payload.oldStatus == "PENDING_APPROVAL") {
- params.verb = maybeAutomaticallyVerb(
- activity,
- t("activity.sentence.rolled-out")
- );
- }
- break;
- }
- case "RUNNING": {
- params.verb = t("activity.sentence.started");
- break;
- }
- case "DONE": {
- if (payload.oldStatus === "RUNNING") {
- params.verb = t("activity.sentence.completed");
- } else {
- params.verb = t("activity.sentence.skipped");
- }
- break;
- }
- case "FAILED": {
- params.verb = t("activity.sentence.failed");
- break;
- }
- case "CANCELED": {
- params.verb = t("activity.sentence.canceled");
- break;
- }
- default:
- params.verb = t("activity.sentence.changed");
- }
- const task = findTaskById(
- issue.pipeline ?? empty("PIPELINE"),
- payload.taskId
- );
- if (task) {
- params.target = h(TaskName, { issue, task });
- }
- return renderVerbTypeTarget(params, {
- tag: "span",
- });
- }
- case LogEntity_Action.ACTION_PIPELINE_STAGE_STATUS_UPDATE: {
- const payload = JSON.parse(
- activity.payload
- ) as ActivityStageStatusUpdatePayload;
- const stage = findStageById(
- issue.pipeline ?? empty("PIPELINE"),
- payload.stageId
- );
- const params: VerbTypeTarget = {
- activity,
- verb: "",
- type: t("common.stage"),
- target: h(StageName, { stage, issue }),
- };
- switch (payload.stageStatusUpdateType) {
- case "BEGIN":
- params.verb = maybeAutomaticallyVerb(
- activity,
- t("activity.sentence.started")
- );
- break;
- case "END":
- params.verb = t("activity.sentence.completed");
- break;
- default:
- params.verb = t("activity.sentence.changed");
- break;
- }
- return renderVerbTypeTarget(params, {
- tag: "span",
- });
- }
- case LogEntity_Action.ACTION_PIPELINE_TASK_FILE_COMMIT: {
- const payload = JSON.parse(
- activity.payload
- ) as ActivityTaskFileCommitPayload;
- // return `committed ${payload.filePath} to ${payload.branch}@${payload.repositoryFullPath}`;
- return t("activity.sentence.committed-to-at", {
- file: payload.filePath,
- branch: payload.branch,
- repo: payload.repositoryFullPath,
- });
- }
- case LogEntity_Action.ACTION_PIPELINE_TASK_STATEMENT_UPDATE: {
- const payload = JSON.parse(
- activity.payload
- ) as ActivityTaskStatementUpdatePayload;
- const oldStatement =
- useSheetStatementByUID(String(payload.oldSheetId || UNKNOWN_ID))
- .value || payload.oldStatement;
- const newStatement =
- useSheetStatementByUID(String(payload.newSheetId || UNKNOWN_ID))
- .value || payload.newStatement;
- return h(
- "span",
- {},
- h(
- Translation,
- {
- keypath: "activity.sentence.changed-from-to",
- },
- {
- name: () => "SQL",
- oldValue: () => renderStatement(oldStatement),
- newValue: () => renderStatement(newStatement),
- }
- )
- );
- }
- case LogEntity_Action.ACTION_PIPELINE_TASK_EARLIEST_ALLOWED_TIME_UPDATE: {
- const payload = JSON.parse(
- activity.payload
- ) as ActivityTaskEarliestAllowedTimeUpdatePayload;
- const newVal = payload.newEarliestAllowedTs;
- const oldVal = payload.oldEarliestAllowedTs;
- return t("activity.sentence.changed-from-to", {
- name: "earliest allowed time",
- oldValue: oldVal ? dayjs(oldVal * 1000) : "Unset",
- newValue: newVal ? dayjs(newVal * 1000) : "Unset",
- });
- }
- }
- return "";
-};
-
-const maybeAutomaticallyVerb = (activity: LogEntity, verb: string): string => {
- if (extractUserResourceName(activity.creator) !== SYSTEM_BOT_EMAIL) {
- return verb;
- }
- return t("activity.sentence.xxx-automatically", {
- verb,
- });
-};
-
-type VerbTypeTarget = {
- activity: LogEntity;
- verb: RenderedContent;
- type: RenderedContent;
- target?: RenderedContent;
-};
-
-const renderVerbTypeTarget = (params: VerbTypeTarget, props: object = {}) => {
- const keypath =
- extractUserResourceName(params.activity.creator) === SYSTEM_BOT_EMAIL
- ? "activity.sentence.verb-type-target-by-system-bot"
- : "activity.sentence.verb-type-target-by-people";
- return h(
- Translation,
- {
- ...props,
- keypath,
- },
- {
- verb: () => params.verb,
- type: () => params.type,
- target: () => params.target,
- }
- );
-};
-
-const Renderer = defineComponent({
- name: "ActionSentenceRenderer",
- render: renderActionSentence,
-});
-
-const renderStatement = (statement: string) => {
- return h(TextOverflowPopover, {
- content: statement,
- maxLength: 50,
- width: 400,
- contentClass: "text-main",
- });
-};
-
-watch(
- () => props.activity,
- async () => {
- const activity = props.activity;
- // Prepare sheet data for renderering.
- if (
- activity.action === LogEntity_Action.ACTION_PIPELINE_TASK_STATEMENT_UPDATE
- ) {
- // Use any (basic or full) view of sheets here to save data size
- sheetV1Store.getOrFetchSheetByUID(
- String(
- (JSON.parse(activity.payload) as ActivityTaskStatementUpdatePayload)
- .newSheetId || UNKNOWN_ID
- )
- );
- sheetV1Store.getOrFetchSheetByUID(
- String(
- (JSON.parse(activity.payload) as ActivityTaskStatementUpdatePayload)
- .oldSheetId || UNKNOWN_ID
- )
- );
- }
- },
- {
- immediate: true,
- }
-);
-</script>
diff --git a/frontend/src/components/Issue/activity/ActivityAction.vue b/frontend/src/components/Issue/activity/ActivityAction.vue
deleted file mode 100644
index c7ca92f5fa..0000000000
--- a/frontend/src/components/Issue/activity/ActivityAction.vue
+++ /dev/null
@@ -1,90 +0,0 @@
-<template>
- <div class="ml-3 min-w-0 flex-1">
- <div class="min-w-0 flex-1 pt-1 flex justify-between">
- <div class="text-sm text-control-light space-x-1">
- <ActionCreator
- v-if="
- extractUserResourceName(activity.creator) !== SYSTEM_BOT_EMAIL ||
- activity.action === LogEntity_Action.ACTION_ISSUE_COMMENT_CREATE
- "
- :activity="activity"
- />
-
- <ActionSentence :issue="issue" :activity="activity" />
-
- <HumanizeTs
- :ts="(activity.createTime?.getTime() ?? 0) / 1000"
- class="ml-1"
- />
-
- <span
- v-if="
- activity.createTime?.getTime() !== activity.updateTime?.getTime() &&
- activity.action == LogEntity_Action.ACTION_ISSUE_COMMENT_CREATE
- "
- >
- <span>({{ $t("common.edited") }}</span>
- <HumanizeTs
- :ts="(activity.updateTime?.getTime() ?? 0) / 1000"
- class="ml-1"
- />)
- </span>
-
- <span
- v-if="similar.length > 0"
- class="text-sm font-normal text-gray-400 ml-1"
- >
- {{
- $t("activity.n-similar-activities", {
- count: similar.length + 1,
- })
- }}
- </span>
- </div>
-
- <slot name="subject-suffix"></slot>
- </div>
- <div class="mt-2 text-sm text-control whitespace-pre-wrap">
- <slot name="comment" />
-
- <template
- v-if="
- activity.action == LogEntity_Action.ACTION_PIPELINE_TASK_FILE_COMMIT
- "
- >
- <a
- :href="fileCommitActivityUrl(activity)"
- target="__blank"
- class="normal-link flex flex-row items-center"
- >
- {{ $t("issue.view-commit") }}
- <heroicons-outline:external-link class="w-4 h-4" />
- </a>
- </template>
- </div>
- </div>
-</template>
-
-<script lang="ts" setup>
-import type { Issue, ActivityTaskFileCommitPayload } from "@/types";
-import { SYSTEM_BOT_EMAIL } from "@/types";
-import type { LogEntity } from "@/types/proto/v1/logging_service";
-import { LogEntity_Action } from "@/types/proto/v1/logging_service";
-import { extractUserResourceName } from "@/utils";
-import ActionCreator from "./ActionCreator.vue";
-import ActionSentence from "./ActionSentence.vue";
-
-defineProps<{
- issue: Issue;
- index: number;
- activity: LogEntity;
- similar: LogEntity[];
-}>();
-
-const fileCommitActivityUrl = (activity: LogEntity) => {
- const payload = JSON.parse(activity.payload) as ActivityTaskFileCommitPayload;
- if (payload.vcsInstanceUrl.includes("https://github.com"))
- return `${payload.vcsInstanceUrl}/${payload.repositoryFullPath}/commit/${payload.commitId}`;
- return `${payload.vcsInstanceUrl}/${payload.repositoryFullPath}/-/commit/${payload.commitId}`;
-};
-</script>
diff --git a/frontend/src/components/Issue/activity/ActivityItem.vue b/frontend/src/components/Issue/activity/ActivityItem.vue
deleted file mode 100644
index a6527dee92..0000000000
--- a/frontend/src/components/Issue/activity/ActivityItem.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-<template>
- <li>
- <div :id="`#${activity.name}`" class="relative pb-4">
- <span
- v-if="index !== activityList.length - 1"
- class="absolute left-4 -ml-px h-full w-0.5 bg-block-border"
- aria-hidden="true"
- ></span>
- <div class="relative flex items-start">
- <ActionIcon :activity="activity" />
-
- <ActivityAction
- :issue="issue"
- :index="index"
- :activity="activity"
- :similar="similar"
- >
- <template #subject-suffix>
- <slot name="subject-suffix" />
- </template>
-
- <template #comment>
- <slot name="comment" />
- </template>
- </ActivityAction>
- </div>
- </div>
- </li>
-</template>
-
-<script lang="ts" setup>
-import type { Issue } from "@/types";
-import type { LogEntity } from "@/types/proto/v1/logging_service";
-import ActionIcon from "./ActionIcon.vue";
-import ActivityAction from "./ActivityAction.vue";
-import type { DistinctActivity } from "./common";
-
-defineProps<{
- issue: Issue;
- activityList: DistinctActivity[];
- index: number;
- activity: LogEntity;
- similar: LogEntity[];
-}>();
-</script>
diff --git a/frontend/src/components/Issue/activity/StageName.vue b/frontend/src/components/Issue/activity/StageName.vue
deleted file mode 100644
index 9c5bb89444..0000000000
--- a/frontend/src/components/Issue/activity/StageName.vue
+++ /dev/null
@@ -1,14 +0,0 @@
-<template>
- <span class="font-medium text-main">
- {{ stage.name }}
- </span>
-</template>
-
-<script lang="ts" setup>
-import type { Issue, Stage } from "@/types";
-
-defineProps<{
- issue: Issue;
- stage: Stage;
-}>();
-</script>
diff --git a/frontend/src/components/Issue/activity/TaskName.vue b/frontend/src/components/Issue/activity/TaskName.vue
deleted file mode 100644
index abc2fd3e55..0000000000
--- a/frontend/src/components/Issue/activity/TaskName.vue
+++ /dev/null
@@ -1,65 +0,0 @@
-<template>
- <router-link
- :to="link"
- exact-active-class=""
- class="font-medium text-main hover:border-b hover:border-b-main"
- @click="toTop"
- >
- <span>{{ task.name }}</span>
- <template v-if="schemaVersion">
- <span class="ml-1 text-control-placeholder">(</span>
- <span class="lowercase text-control-placeholder">{{
- $t("common.schema-version")
- }}</span>
- <span class="ml-1 text-control-placeholder">{{ schemaVersion }}</span>
- <span class="text-control-placeholder">)</span>
- </template>
- </router-link>
-</template>
-
-<script lang="ts" setup>
-import scrollIntoView from "scroll-into-view-if-needed";
-import { computed } from "vue";
-import type { Issue, Task } from "@/types";
-
-const props = defineProps<{
- issue: Issue;
- task: Task;
-}>();
-
-const schemaVersion = computed(() => {
- const { task } = props;
-
- const taskPayload = task.payload as { schemaVersion?: string };
- return taskPayload.schemaVersion ?? "";
-});
-
-const link = computed(() => {
- const { issue, task } = props;
- const query: Record<string, any> = {
- task: task.id,
- };
-
- const stageIndex =
- issue.pipeline?.stageList.findIndex((stage) => {
- return stage.taskList.findIndex((t) => t.id === task.id) >= 0;
- }) ?? -1;
- if (stageIndex >= 0) {
- query.stage = stageIndex + 1;
- }
-
- return {
- path: `/issue/${issue.id}`,
- query,
- };
-});
-
-const toTop = (e: Event) => {
- const taskElem = document.querySelector(`[data-task-id="${props.task.id}"]`);
- if (taskElem) {
- scrollIntoView(taskElem, {
- scrollMode: "if-needed",
- });
- }
-};
-</script>
diff --git a/frontend/src/components/Issue/activity/common.ts b/frontend/src/components/Issue/activity/common.ts
deleted file mode 100644
index 31f508cf16..0000000000
--- a/frontend/src/components/Issue/activity/common.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import type { LogEntity } from "@/types/proto/v1/logging_service";
-
-export type DistinctActivity = {
- activity: LogEntity;
- similar: LogEntity[];
-};
diff --git a/frontend/src/components/Issue/activity/index.ts b/frontend/src/components/Issue/activity/index.ts
deleted file mode 100644
index 7b5f21c5ed..0000000000
--- a/frontend/src/components/Issue/activity/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import ActivityItem from "./ActivityItem.vue";
-
-export * from "./common";
-export { ActivityItem };