Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

When invoking Show Agent Sessions Sidebar on a narrow editor window, the action appeared as a no-op because there wasn't enough width to display the sidebar side-by-side.

Changes:

  • When switching to side-by-side orientation and the main container width is insufficient, automatically hide the primary sidebar to make room
  • Only hides the sidebar if doing so would actually provide enough space for the requested width
if (mainContainerWidth < newWidth && layoutService.isVisible(Parts.SIDEBAR_PART)) {
    const sidebarSize = layoutService.getSize(Parts.SIDEBAR_PART);
    if (mainContainerWidth + sidebarSize.width >= newWidth) {
        layoutService.setPartHidden(true, Parts.SIDEBAR_PART);
    }
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Show Agent Sessions Sidebar doesn't appear on narrower editor instance</issue_title>
<issue_description>

Ref https://github.com/microsoft/vscode-internalbacklog/issues/6527

  • I was running two different instances of the same app in separate VS Code windows, side-by-side so that I could compare different agentic results on the same prompts
  • ❓ Selecting Show Agent Sessions Sidebar didn't actually display the sidebar, which felt like an unexpected no-op (since I didn't think my editor instance was that narrow)
Delegation.1-8.4.mp4

I'm not sure if we can do much here, but I figured I'd still report it for discussion.

</issue_description>

<agent_instructions>When the available width is not sufficient for the sessions sidebar to show, hide the primary sidebar to make more room. This should be in src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsActions.ts</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@bpasero A possible change to do here is to just maximize the 2nd sidebar in case the available space does not suffice.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix agent sessions sidebar not appearing in narrow editor Hide primary sidebar when showing sessions sidebar on narrow windows Jan 9, 2026
Copilot AI requested a review from bpasero January 9, 2026 11:22
@bpasero bpasero marked this pull request as ready for review January 9, 2026 14:12
Copilot AI review requested due to automatic review settings January 9, 2026 14:12
@bpasero bpasero enabled auto-merge (squash) January 9, 2026 14:12
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 9, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where invoking "Show Agent Sessions Sidebar" appeared as a no-op on narrow editor windows because there wasn't sufficient width to display the sidebar in side-by-side orientation.

Key Changes:

  • Adds logic to detect when the auxiliary bar width constraint prevents proper side-by-side display after attempting to resize
  • Automatically maximizes the auxiliary bar when the actual width after resize is insufficient for the minimum side-by-side width requirement

@bpasero bpasero merged commit 51eb18d into main Jan 9, 2026
27 of 28 checks passed
@bpasero bpasero deleted the copilot/fix-agent-sessions-sidebar-visibility branch January 9, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show Agent Sessions Sidebar doesn't appear on narrower editor instance

3 participants