fix(theseus): quiet add-ons hide from the dock on a fresh profile

autoHideQuietDock ran only when the sidebar state was pushed; on a
fresh boot the chrome pulls it, so Shield and Cookie Pop-ups showed
in the dock until something re-emitted. Run it on the pull path too.

(cherry picked from commit 4f489303f3591444980f0f456b1672fcbf3dae7a)
This commit is contained in:
Local Dev 2026-09-27 20:45:06 +02:00
parent 0f9209e1a9
commit 5388858a65

View file

@ -2606,6 +2606,9 @@ function toggleSidebar() { setSidebar(!sidebarVisible); }
// Everything the chrome needs to draw the extension dock + plug-in row:
// panels, toolbar menus, which panel is open, and the user's dock prefs.
function sidebarStatePayload() {
// Runs on the pull path too (the chrome asks at boot), not only on pushes —
// a fresh profile otherwise showed the quiet add-ons until something re-emitted.
try { autoHideQuietDock(); } catch {}
return {
visible: sidebarVisible,
active: sidebarActivePanelId,
@ -2635,7 +2638,6 @@ function autoHideQuietDock() {
if (changed) { settings.dockHidden = [...hidden]; settings.dockAutoHidden = [...seen]; saveSettings(); }
}
function emitSidebarState() {
try { autoHideQuietDock(); } catch {}
try { chrome?.webContents.send("sidebar-state", sidebarStatePayload()); } catch {}
}
function setSidebar(show, panelId) {