From e33d1c782f594263eb0718e57d0547c5f0a23a0f Mon Sep 17 00:00:00 2001 From: duffyduck Date: Fri, 3 Jul 2026 02:46:25 +0200 Subject: [PATCH] =?UTF-8?q?fix(diagnostic):=20ARIA-Datei-Bubbles=20(Bilder?= =?UTF-8?q?)=20tragen=20project=5Fid=20=E2=80=94=20kein=20Ausblenden=20meh?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Regression aus dem chat_history-projectId-Fix: nach dem History-Reload laeuft jetzt updateChatVisibilityByFocus(). addAriaFile() setzte aber kein dataset.projectId → Datei-/Bild-Bubbles galten als Hauptchat und wurden ausgeblendet, sobald der (aus localStorage wiederhergestellte) Focus auf einem Projekt lag. In der App trat das nicht auf (datengetriebener Filter mit korrektem projectId). - addAriaFile(): setzt dataset.projectId aus p.projectId und respektiert beim Live-Anhaengen den aktuellen Focus (wie addChat via hiddenByFocus). - chat_history-Renderer: reicht m.projectId an addAriaFile weiter. - Bridge _process_core_response: haengt turn_pid als f["projectId"] an die file_from_aria-Payload, damit der Live-Pfad die Zuordnung kennt. Co-Authored-By: Claude Opus 4.8 (1M context) --- bridge/aria_bridge.py | 4 ++++ diagnostic/index.html | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/bridge/aria_bridge.py b/bridge/aria_bridge.py index 4cb292a..db688a0 100644 --- a/bridge/aria_bridge.py +++ b/bridge/aria_bridge.py @@ -1228,6 +1228,10 @@ class ARIABridge: server_path = f.get("serverPath") if turn_pid and server_path: self._tag_file_to_project(server_path, turn_pid) + # projectId mitschicken, damit App+Diagnostic die Datei-Bubble dem + # richtigen Kontext zuordnen (sonst faellt sie im Diagnostic-Focus- + # Filter durch = wird nur im Hauptchat angezeigt). + f["projectId"] = turn_pid await self._broadcast_aria_file(f) # Bei fehlenden Files: User informieren (sonst sieht er nur stille # Verluste — ARIA hat den Marker hingeschrieben aber das File nicht diff --git a/diagnostic/index.html b/diagnostic/index.html index 93790fe..7ddf498 100644 --- a/diagnostic/index.html +++ b/diagnostic/index.html @@ -1910,7 +1910,7 @@ const m = msg.messages[mi]; try { if (m.type === 'aria_file') { - addAriaFile({ serverPath: m.serverPath, name: m.name, mimeType: m.mimeType, size: m.size, deleted: m.deleted }); + addAriaFile({ serverPath: m.serverPath, name: m.name, mimeType: m.mimeType, size: m.size, deleted: m.deleted, projectId: m.projectId }); continue; } const cleaned = (m.text || '').replace(/\[FILE:\s*\/shared\/uploads\/[^\]]+\]/gi, '').replace(/\n{3,}/g, '\n\n').trim(); @@ -2343,6 +2343,15 @@ const el = document.createElement('div'); el.className = 'chat-msg received'; el.dataset.ariaFilePath = serverPath; + // Kontext-Zuordnung fuer den Focus-Filter — ohne das wurde die + // Datei-Bubble beim Reload ausgeblendet wenn ein Projekt fokussiert war. + const filePid = p.projectId || ''; + el.dataset.projectId = filePid; + // Beim Live-Anhaengen den aktuellen Focus respektieren (wie addChat), + // sonst blitzt eine Projekt-Datei kurz im Hauptchat auf. + if (typeof focusedContextId === 'string' && filePid !== focusedContextId) { + el.style.display = 'none'; + } if (deleted) el.dataset.deleted = '1'; el.innerHTML = html; box.appendChild(el);