Skip to content

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

fix: infinite update for issue (#15891)

ecmadao45ee8c74a4bc
diff --git a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue
index 3b5340bcd8..e17f25646a 100644
--- a/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue
+++ b/frontend/src/components/IssueV1/components/TaskListSection/TaskListSection.vue
@@ -74,7 +74,7 @@ const MAX_LIST_HEIGHT = 256;
// The default number of tasks to show per page.
// This is set to 4 in development mode for easier testing.
-const TASK_PER_PAGE = isDev() ? 20 : 20;
+const TASK_PER_PAGE = isDev() ? 4 : 20;
const state = reactive<LocalState>({
index: TASK_PER_PAGE,
@@ -137,7 +137,12 @@ const loadMore = useDebounceFn(async () => {
}, 500);
watch(
- [() => filteredTaskList.value, () => state.index],
+ () => filteredTaskList.value,
+ () => (state.index = TASK_PER_PAGE)
+);
+
+watch(
+ () => state.index,
async () => {
isRequesting.value = true;
try {
diff --git a/frontend/src/components/IssueV1/logic/poll.ts b/frontend/src/components/IssueV1/logic/poll.ts
index d5bae8e040..bc466d6c89 100644
--- a/frontend/src/components/IssueV1/logic/poll.ts
+++ b/frontend/src/components/IssueV1/logic/poll.ts
@@ -1,3 +1,4 @@
+import { isEqual } from "lodash-es";
import { watch } from "vue";
import { databaseForTask } from "@/components/IssueV1/logic";
import { useProgressivePoll } from "@/composables/useProgressivePoll";
@@ -61,7 +62,9 @@ export const usePollIssue = () => {
clearCache(updatedIssue);
}
- issue.value = updatedIssue;
+ if (!isEqual(issue.value, updatedIssue)) {
+ issue.value = updatedIssue;
+ }
});
};