diff --git a/diagnostic/index.html b/diagnostic/index.html index d2fe822..b5d5521 100644 --- a/diagnostic/index.html +++ b/diagnostic/index.html @@ -1424,6 +1424,7 @@ let focusedContextId = localStorage.getItem('diag_focused_context_id') || ''; let diagQueueStatus = {}; let diagProjectsCache = []; + let diagShowHiddenStrip = false; // versteckte Projekte im Streifen zeigen? function updateChatVisibilityByFocus() { for (const box of [chatBox, document.getElementById('chat-box-fs')]) { @@ -1464,20 +1465,79 @@ if (s.queue_size > 0) return { color: '#FFD60A', label: `Queue: ${s.queue_size}` }; return { color: '#34C759', label: 'idle' }; }; + // Projekt-Chip MIT Auge (verstecken/sichtbar). Auge hat eigenes onclick + // + stopPropagation, damit der Klick nicht den Kontext wechselt. + const projChip = (p, isFocus, dotColor, subline) => { + const hidden = !!p.hidden; + const bg = isFocus ? 'rgba(52,199,89,0.15)' : '#1E1E2E'; + const border = isFocus ? '#34C759' : '#2A2A3E'; + const eye = hidden ? '👁' : '🙈'; + const eyeTitle = hidden ? 'Wieder dauerhaft sichtbar machen' : 'Verstecken (aus dem Streifen ausblenden)'; + return `
`; + }; const cards = []; // Hauptchat const mainDot = dotFor('__main__'); cards.push(chip('', '💬 Hauptchat', focusedContextId === '', mainDot.color, mainDot.label || 'idle')); - // Projekte — nur active/ended, sortiert nach letzter Aktivitaet + // Projekte — nur active/ended, sortiert nach letzter Aktivitaet. + // Versteckte standardmaessig raus; per Toggle-Chip einblendbar. + let hiddenCount = 0; for (const p of diagProjectsCache) { if (p.status === 'archived') continue; + if (p.hidden) { + hiddenCount++; + if (!diagShowHiddenStrip) continue; + } const d = dotFor(p.id); const sub = d.label || `${p.turn_count} Turns`; - cards.push(chip(p.id, `📁 ${p.name}`, focusedContextId === p.id, d.color, sub)); + cards.push(projChip(p, focusedContextId === p.id, d.color, sub)); + } + // Toggle-Chip am Ende (nur wenn es versteckte gibt oder gerade gezeigt werden) + if (hiddenCount > 0 || diagShowHiddenStrip) { + const tLabel = diagShowHiddenStrip + ? `🙈 versteckte ausblenden (${hiddenCount})` + : `👁 versteckte anzeigen (${hiddenCount})`; + cards.push(`