fix(titlebar): sync document.title on panel switches (#4039)

This commit is contained in:
Rod Boev
2026-06-12 07:52:57 -04:00
parent df6cfd0a15
commit bad4ec393a
2 changed files with 37 additions and 1 deletions

View File

@@ -72,6 +72,10 @@ function syncAppTitlebar() {
if (_renamingAppTitlebar) return;
titleEl.textContent = mainText;
if (panel !== 'chat') {
const bot = typeof assistantDisplayName === 'function' ? assistantDisplayName() : '';
document.title = bot ? mainText + ' \u2014 ' + bot : mainText;
}
if (subEl) {
if (subText) {
subEl.textContent = subText;
@@ -272,7 +276,8 @@ async function switchPanel(name, opts = {}) {
if (overlay) overlay.classList.add('visible');
}
_resyncChatSidebarAfterPanelSwitch();
syncAppTitlebar();
if (nextPanel === 'chat' && typeof syncTopbar === 'function') syncTopbar();
else syncAppTitlebar();
return true;
}