Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Use activity id instead of the index as the anchor since that’s more stable.
天舟56f37722d200
diff --git a/frontend/src/miragejs/routes/activity.js b/frontend/src/miragejs/routes/activity.jsindex 384a099060..1968893a9a 100644--- a/frontend/src/miragejs/routes/activity.js+++ b/frontend/src/miragejs/routes/activity.js@@ -50,6 +50,7 @@ export default function configureActivity(route) {workspaceId: WORKSPACE_ID,payload: {taskName: task.name,+ commentId: createdActivity.id,},};diff --git a/frontend/src/miragejs/seeds/index.ts b/frontend/src/miragejs/seeds/index.tsindex a724d21583..f9e6fb031c 100644--- a/frontend/src/miragejs/seeds/index.ts+++ b/frontend/src/miragejs/seeds/index.ts@@ -137,7 +137,7 @@ const workspacesSeeder = (server: any) => {workspace: workspace1,});- server.create("activity", {+ const createdActivity = server.create("activity", {actionType: "bytebase.task.create",containerId: task.id,creator: {@@ -158,6 +158,7 @@ const workspacesSeeder = (server: any) => {workspace: workspace1,payload: {taskName: faker.fake("{{lorem.sentence}}"),+ commentId: createdActivity.id,},});} else {@@ -188,6 +189,7 @@ const workspacesSeeder = (server: any) => {workspace: workspace1,payload: {taskName: faker.fake("{{lorem.sentence}}"),+ commentId: createdActivity.id,},});} else {@@ -218,6 +220,7 @@ const workspacesSeeder = (server: any) => {workspace: workspace1,payload: {taskName: faker.fake("{{lorem.sentence}}"),+ commentId: createdActivity.id,},});} else {@@ -247,6 +250,7 @@ const workspacesSeeder = (server: any) => {workspace: workspace2,payload: {taskName: faker.fake("{{lorem.sentence}}"),+ commentId: createdActivity.id,},});} else {diff --git a/frontend/src/types/bytebase.ts b/frontend/src/types/bytebase.tsindex ec7303fb1b..012c8ae494 100644--- a/frontend/src/types/bytebase.ts+++ b/frontend/src/types/bytebase.ts@@ -552,6 +552,7 @@ export type TaskUpdateStatusMessagePayload = {export type TaskCommentMessagePayload = {taskName: string;+ commentId: ActivityId;};export type MessagePayload =diff --git a/frontend/src/views/Inbox.vue b/frontend/src/views/Inbox.vueindex 3ffd5b1d4f..b2b03bec17 100644--- a/frontend/src/views/Inbox.vue+++ b/frontend/src/views/Inbox.vue@@ -147,7 +147,7 @@<template v-else-if="message.type == 'bb.msg.task.comment'"><span class="ml-1"> commented task</span><router-link- :to="`/task/${message.containerId}`"+ :to="`/task/${message.containerId}#activity${message.payload.commentId}`"class="normal-link ml-1">{{ message.payload.taskName }}diff --git a/frontend/src/views/TaskActivityPanel.vue b/frontend/src/views/TaskActivityPanel.vueindex e14457cf62..9893857692 100644--- a/frontend/src/views/TaskActivityPanel.vue+++ b/frontend/src/views/TaskActivityPanel.vue@@ -9,10 +9,10 @@<div class="pt-6"><!-- Activity feed--><ul>- <li v-for="(activity, index) in activityList" :key="index">- <div :id="'activity' + (index + 1)" class="relative pb-4">+ <li v-for="(activity, index) in state.activityList" :key="index">+ <div :id="'activity' + activity.id" class="relative pb-4"><span- v-if="index != activityList.length - 1"+ v-if="index != state.activityList.length - 1"class="absolute left-4 -ml-px h-full w-0.5 bg-block-border"aria-hidden="true"></span>@@ -77,7 +77,7 @@>{{ activity.creator.name }}</router-link><a- :href="'#activity' + (index + 1)"+ :href="'#activity' + activity.id"class="ml-1 anchor-link whitespace-normal">{{ actionSentence(activity) }}