You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PaneManager.panes_ keeps a sidebar window that showSidebar() has replaced #19202
PaneManager.panes_ lists the sidebar's LogicalWindow when the quadrants pref includes Sidebar, which the default layout does. showSidebar(true) replaces that window (clearSidebarCache(), then createTabSet()) and stores the new one in panesByName_, but panes_ keeps the old one. Layouts saved from the Pane Layout dialog leave Sidebar out of quadrants, so there panes_ has no sidebar at all.
Code that needs the current sidebar works around this by reading panesByName_ as well as panes_, in three places:
getLogicalWindow(WindowFrame) has no such workaround, so it returns null for a sidebar shown after page load. Its caller, the WindowEnsureVisibleEvent handler, then returns early. That handler is what moves a zoom to a pane that raises itself, and what reopens a pane's collapsed column. So once the sidebar has been shown after load, a raise request from a sidebar tab is ignored.
I haven't confirmed a user-visible effect. Activating Posit Assistant (Ctrl+Cmd+I) while Environment was zoomed left the sidebar collapsed whether or not it was visible at page load, so either that command doesn't send a raise request this way or something else stops it first.
Proposed fix
Keep the sidebar in one place, for example:
update the sidebar entry in panes_ when showSidebar() replaces the window, or
leave the sidebar out of panes_ and always read it from panesByName_.
Then remove the three workarounds. The zoom code also loops over panes_ (endZoomIfActive(), fullyMaximizeWindow(), restorePaneStateToDefault()), so either option changes which sidebar window those loops reach; check the zoom tests in e2e/rstudio/tests/panes/layout/ afterwards.
Activity
List every window in one place, leaving out a hidden sidebar
Undo the sidebar test's pref write after any failure
Test that help() ends a column zoom that shut a reshown sidebar
Find the sidebar window when a sidebar tab raises itself (#19275)