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
e2e: cover reopening shut columns in other pane layouts #19232
The tests for #19184 (PR #19231) in e2e/rstudio/tests/panes/layout/zoom_inert.test.ts all run in one layout: sidebar on the left, Console/Source in the left column, no extra source columns. Run a subset of those scenarios in other layouts, to find problems that layout-specific code may hide.
Layouts, most likely to find something first:
Sidebar on the right. The zoom code has separate paths for each side (resizeHorizontallyWithSidebarOnRight vs ...OnLeft in PaneManager). getZoomedColumn() also has a right-side case, whose comment says right_ "is added with add() not addEast()" when the sidebar is on the right, while MainSplitPanel.initialize() docks it with addEast() either way.
Extra source columns. No current test uses them. A source column is a column of its own (leftList_), so it can be the shut column or the donor. Activating one goes through SourceColumnManager, not activateTab().
Console/Source in the right column. The reopen code finds a column by DOM containment, so placement shouldn't matter to it. What Zoom Left/Right Column hides does change, though.
Scenarios to run in each layout:
Show command (e.g. Show Files) and a pane raising itself (a plot, Move Focus to Console) reopen a column dragged shut.
The donor gives only what the reopened column gains, including with the sidebar as the donor.
Ending a zoom of a tab in a shut column leaves the column shut.
A pane raising itself during a column zoom ends the zoom.
The current tests assume Console is in the left column (e.g. dragging the middle splitter to x=1 shuts it), so they would need to find the right splitter and pane for each layout. Layout changes go through the panes pref and need restoring after each test.
A case to cover with the sidebar on the right, found while addressing review on #19231.
With the sidebar visible and on the right, Zoom Left Column, then End Zoom (or, with #19231, Show Files). The right column comes back, but Zoom Left Column stays checked. Seen with End Zoom on branch code from before Show commands ended a column zoom; not re-checked on main.
Likely cause: PaneManager.getZoomedColumn() reads right_.getOffsetWidth() when the sidebar is on the right, citing right_ being added with add() rather than addEast(). restoreColumnLayout() sets the restored widths and calls manageLayoutCommands() before the next layout pass, so the drawn width is still 0. MainSplitPanel always adds right_ with addEast() (and zoomColumn() says "right_ is always EAST"), so panel_.getWidgetSize(right_) should work for both sidebar locations.
Repro, written for zoom_inert.test.ts in the "Show pane commands reopen a column dragged shut" block; it fails at the last expect.poll:
test('Show Files during a column zoom ends it with the sidebar on the right',async({rstudioPage: page,})=>{awaitsetSidebarVisible(page,true);awaitexecuteCommand(page,'toggleSidebarLocation');try{awaitexecuteCommand(page,'layoutZoomLeftColumn');awaitexpectHidden(page,TABSET2_PANE);awaitexpect.poll(()=>isCommandChecked(page,'layoutZoomLeftColumn')).toBe(true);awaitexecuteCommand(page,'activateFiles');// or 'layoutEndZoom'awaitexpectExposed(page,TABSET2_PANE);awaitexpect.poll(()=>isCommandChecked(page,'layoutZoomLeftColumn')).toBe(false);}finally{awaitresetLayoutZoom(page);awaitexecuteCommand(page,'toggleSidebarLocation');awaitsetSidebarVisible(page,false);}});
Another case for the extra-source-column layouts, from review of #19231 (found from code; not yet reproduced by hand):
With an additional source column open, moving a pane zoom from one pane to another loses the pre-zoom widths when the zoom ends.
PaneManager.fullyMaximizeWindow() records widgetSizePriorToZoom_ and sidebarSizePriorToZoom_ only when they are unset. leftWidgetSizePriorToZoom_ is cleared only when its size differs from leftList_, so a second fullyMaximizeWindow() during the same zoom appends another set of widths, the zoom-time ones. When the zoom ends, restoreLayout() sees leftList_.size() != leftWidthsPriorToZoom.size() and falls back to restorePaneLayout(), which puts back computed widths instead of the saved ones.
Any zoom transfer reaches this:
the Zoom commands (toggleWindowZoom() with a different window)
a pane raising itself (the WindowEnsureVisibleEvent handler)
Sequence to test: open an extra source column, Zoom Console, Zoom Files (or Show Files), End Zoom. The source column and middle splitter should be back where they were before Zoom Console.
Likely fix: in fullyMaximizeWindow(), record the left widths only when none are recorded yet, as the right and sidebar widths are. Keep computing leftTargets either way.
More layout cases from the third review round of #19231. Its zoom tests assume the default quadrants: Files, Plots and Help in TabSet2, Environment and History in TabSet1, TabSet1 above TabSet2 in the right column. Worth covering with tabs moved:
Partner vs. separate column: with History and Files in the same column, history() (an ActivatePaneEvent) during a Files zoom must select History without showing its pane. With them in different columns, it selects History in a 0px column. Either way the zoom stays on Files.
Show for a pane hidden by a zoom: Show Files during a zoom of a pane in Files' own column (partner) and in another column. Both should move the zoom to Files.
Help elsewhere: Search R Help during a Console zoom with Help in the left column, or as Console's partner.
Activity
gtritchie commentedon Oct 22, 2026
A case to cover with the sidebar on the right, found while addressing review on #19231.
With the sidebar visible and on the right, Zoom Left Column, then End Zoom (or, with #19231, Show Files). The right column comes back, but Zoom Left Column stays checked. Seen with End Zoom on branch code from before Show commands ended a column zoom; not re-checked on main.
Likely cause:
PaneManager.getZoomedColumn()readsright_.getOffsetWidth()when the sidebar is on the right, citingright_being added withadd()rather thanaddEast().restoreColumnLayout()sets the restored widths and callsmanageLayoutCommands()before the next layout pass, so the drawn width is still 0.MainSplitPanelalways addsright_withaddEast()(andzoomColumn()says "right_ is always EAST"), sopanel_.getWidgetSize(right_)should work for both sidebar locations.Repro, written for
zoom_inert.test.tsin the "Show pane commands reopen a column dragged shut" block; it fails at the lastexpect.poll:gtritchie commentedon Oct 22, 2026
Another case for the extra-source-column layouts, from review of #19231 (found from code; not yet reproduced by hand):
With an additional source column open, moving a pane zoom from one pane to another loses the pre-zoom widths when the zoom ends.
PaneManager.fullyMaximizeWindow()recordswidgetSizePriorToZoom_andsidebarSizePriorToZoom_only when they are unset.leftWidgetSizePriorToZoom_is cleared only when its size differs fromleftList_, so a secondfullyMaximizeWindow()during the same zoom appends another set of widths, the zoom-time ones. When the zoom ends,restoreLayout()seesleftList_.size() != leftWidthsPriorToZoom.size()and falls back torestorePaneLayout(), which puts back computed widths instead of the saved ones.Any zoom transfer reaches this:
toggleWindowZoom()with a different window)WindowEnsureVisibleEventhandler)Sequence to test: open an extra source column, Zoom Console, Zoom Files (or Show Files), End Zoom. The source column and middle splitter should be back where they were before Zoom Console.
Likely fix: in
fullyMaximizeWindow(), record the left widths only when none are recorded yet, as the right and sidebar widths are. Keep computingleftTargetseither way.gtritchie commentedon Oct 23, 2026
More layout cases from the third review round of #19231. Its zoom tests assume the default quadrants: Files, Plots and Help in TabSet2, Environment and History in TabSet1, TabSet1 above TabSet2 in the right column. Worth covering with tabs moved:
history()(anActivatePaneEvent) during a Files zoom must select History without showing its pane. With them in different columns, it selects History in a 0px column. Either way the zoom stays on Files.gtritchie commentedon Oct 27, 2026
Nice to have, moving to next release.