diff --git a/src/web/public/app.js b/src/web/public/app.js index a61c9217..157fc392 100644 --- a/src/web/public/app.js +++ b/src/web/public/app.js @@ -3438,14 +3438,19 @@ class CodemanApp { statusEl.className = `tab-status ${status}`; } - // Update name if changed + // Update name if changed. #232: a description (the `: suffix` part of the + // name) is the whole tab label; the generated id lives in the tooltip. The + // compare targets the DISPLAY text, or a described tab would re-render on + // every pass (textContent never equals the full name there). const nameEl = tab.querySelector('.tab-name'); - if (nameEl && nameEl.textContent !== name) { + if (nameEl) { const _p = parseSessionPrefix(name); - if (_p && _p.suffix) { - nameEl.innerHTML = '' + escapeHtml(_p.prefix) + ': ' + escapeHtml(_p.suffix) + ''; - } else { - nameEl.textContent = name; + const _label = _p && _p.suffix ? _p.suffix : name; + if (nameEl.textContent !== _label) { + nameEl.textContent = _label; + tab.title = _p && _p.suffix + ? (session.workingDir ? `${_p.prefix} (${session.workingDir})` : _p.prefix) + : (session.workingDir || ''); } } @@ -3617,14 +3622,23 @@ class CodemanApp { const tallTabsEnabled = this._tallTabsEnabled ?? false; const showFolder = tallTabsEnabled && session.name && folderName && folderName !== name; - parts.push(`