From 9ef9fae206598a80824a93525331e73413de889f Mon Sep 17 00:00:00 2001 From: busya Date: Fri, 29 May 2026 16:47:50 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20critical=20QA=20findings=20=E2=80=94=20d?= =?UTF-8?q?ead=20code=20and=20prop=20mismatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Remove get_config_manager() call from translate_run_websocket (@app.websocket /ws/translate/run/{run_id}) — was not imported and unused. Also remove unused from sqlalchemy.orm import Session. 2. Fix prop name mismatch: showBulkReplace -> showPageBulkReplace in RunTabContent. Use () for reactive two-way binding. 3. Add ('DRAFT') for status prop in RunTabContent. --- backend/src/app.py | 2 -- .../src/lib/components/translate/RunTabContent.svelte | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/backend/src/app.py b/backend/src/app.py index e79ab799..509de40d 100755 --- a/backend/src/app.py +++ b/backend/src/app.py @@ -640,10 +640,8 @@ async def translate_run_websocket(websocket: WebSocket, run_id: str): await websocket.accept() logger.reason("Accepted translate run WebSocket", extra={"run_id": run_id}) try: - config_manager = get_config_manager() while True: try: - from sqlalchemy.orm import Session from .core.database import SessionLocal from .plugins.translate.orchestrator_aggregator import TranslationResultAggregator from .core.event_log import EventLog diff --git a/frontend/src/lib/components/translate/RunTabContent.svelte b/frontend/src/lib/components/translate/RunTabContent.svelte index cbfe5674..da852c9d 100644 --- a/frontend/src/lib/components/translate/RunTabContent.svelte +++ b/frontend/src/lib/components/translate/RunTabContent.svelte @@ -21,7 +21,7 @@ import TranslationRunResult from './TranslationRunResult.svelte'; let { - status = 'DRAFT', + status = $bindable('DRAFT'), jobId = '', isRunning = false, isFullRun = false, @@ -30,14 +30,12 @@ runComplete = false, completedRuns = [], expandedRunIds = [], - showBulkReplace = false, + showPageBulkReplace = $bindable(false), onTriggerRun = (isFull) => {}, onRetryRun = () => {}, onRetryInsert = () => {}, onLoadRunHistory = () => {}, onToggleRunDetails = (id) => {}, - onBulkReplaceApplied = (count) => {}, - onBulkReplaceClose = () => {}, getJobStatusLabel = (s) => s, } = $props(); @@ -144,7 +142,7 @@

{$t.translate?.config?.recent_runs}