From 3a49780d8d485092d435852e47955c2c4d0c4249 Mon Sep 17 00:00:00 2001 From: houhuan Date: Tue, 12 May 2026 21:43:15 +0800 Subject: [PATCH] refactor: remove dead code (pollTaskStatus, routeLoadingTimer) Co-Authored-By: Claude Opus 4.7 --- web/frontend/src/router/index.ts | 10 ---------- web/frontend/src/stores/processing.ts | 7 +------ 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/web/frontend/src/router/index.ts b/web/frontend/src/router/index.ts index 4eebc0f..19b1c03 100644 --- a/web/frontend/src/router/index.ts +++ b/web/frontend/src/router/index.ts @@ -83,14 +83,4 @@ router.beforeEach((to, from, next) => { } }) -// Track route loading state for page transitions -let routeLoadingTimer: ReturnType | null = null - -router.afterEach(() => { - if (routeLoadingTimer) clearTimeout(routeLoadingTimer) - routeLoadingTimer = setTimeout(() => { - routeLoadingTimer = null - }, 300) -}) - export default router diff --git a/web/frontend/src/stores/processing.ts b/web/frontend/src/stores/processing.ts index b81eacd..5fc8dd5 100644 --- a/web/frontend/src/stores/processing.ts +++ b/web/frontend/src/stores/processing.ts @@ -121,10 +121,5 @@ export const useProcessingStore = defineStore('processing', () => { return taskId } - async function pollTaskStatus(taskId: string) { - const res = await api.get(`/processing/status/${taskId}`) - return res.data - } - - return { currentTask, tasks, logs, taskSource, connectWebSocket, disconnectWebSocket, startTask, pollTaskStatus } + return { currentTask, tasks, logs, taskSource, connectWebSocket, disconnectWebSocket, startTask } })