From 64c06db3084b2442f26bdf02c811b73632330a16 Mon Sep 17 00:00:00 2001 From: duffyduck Date: Fri, 3 Jul 2026 02:15:02 +0200 Subject: [PATCH] fix(diagnostic): keine untagged ARIA-Bubbles/Backup-Writes mehr (leere Projekte) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Das Dashboard hatte dieselbe Ursache wie die App (untagged Nachrichten in chat_backup) PLUS zwei eigene untagged-Pfade ueber den Gateway-Watch: - Frontend: chat_final rendert keine Chat-Bubble mehr. ARIA-Antworten kommen ausschliesslich via rvs_chat (traegt projectId). chat_final stammt vom Gateway-Watch ohne projectId → erzeugte eine Duplikat-Bubble im Hauptchat. - server.js: kein chat_backup-Write im Gateway-final-Handler mehr. Die Bridge (_process_core_response) ist massgeblicher Writer und schreibt MIT project_id; der Write hier erzeugte untagged Duplikate, die beim Reload im Hauptchat statt im Projekt landeten. Der App-Focus-Fix (63dde65) sorgt dafuer dass neue Nachrichten ueberhaupt getaggt in chat_backup landen — davon profitiert das Dashboard direkt. Co-Authored-By: Claude Opus 4.8 (1M context) --- diagnostic/index.html | 6 +++++- diagnostic/server.js | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/diagnostic/index.html b/diagnostic/index.html index b0f671d..91e43e4 100644 --- a/diagnostic/index.html +++ b/diagnostic/index.html @@ -1751,7 +1751,11 @@ } if (msg.type === 'chat_final') { - addChat('received', msg.text || '', 'chat:final'); + // KEINE Bubble mehr rendern: ARIA-Antworten kommen ausschliesslich via + // rvs_chat (traegt projectId → landet im richtigen Kontext). chat_final + // stammt vom Gateway-Watch und hat KEINE projectId — wuerde also eine + // untagged Duplikat-Bubble im Hauptchat erzeugen. Nur noch als + // Aktivitaets-/Trace-Ende-Signal relevant (das macht der Server). return; } if (msg.type === 'file_from_aria') { diff --git a/diagnostic/server.js b/diagnostic/server.js index e99f3cc..69d3915 100644 --- a/diagnostic/server.js +++ b/diagnostic/server.js @@ -660,11 +660,11 @@ function handleGatewayMessage(msg) { broadcast({ type: "agent_activity", activity: "idle" }); pendingMessageTime = 0; // Watchdog: Antwort erhalten updateAgentActivity(); - // Antwort in Backup-Log schreiben - try { - const entry = JSON.stringify({ ts: Date.now(), role: "assistant", text: text.slice(0, 2000), session: activeSessionKey }) + "\n"; - fs.appendFileSync("/shared/config/chat_backup.jsonl", entry); - } catch {} + // KEIN chat_backup-Write mehr hier: die Bridge (_process_core_response) + // ist der massgebliche Writer und schreibt den Assistant-Eintrag MIT + // project_id. Dieser Gateway-Watch-Pfad kennt die project_id nicht — + // ein Write hier erzeugte ein untagged Duplikat, das beim Reload im + // Hauptchat auftaucht (statt im Projekt). return; }