Skip to content

sessions: add editor part chevron to toggle the secondary side bar#319987

Merged
sandy081 merged 2 commits into
mainfrom
agents/implement-a-button-on-the-editor-part-when-ef771f24
Jun 4, 2026
Merged

sessions: add editor part chevron to toggle the secondary side bar#319987
sandy081 merged 2 commits into
mainfrom
agents/implement-a-button-on-the-editor-part-when-ef771f24

Conversation

@sandy081
Copy link
Copy Markdown
Member

@sandy081 sandy081 commented Jun 4, 2026

What

Adds a chevron toggle to the editor part title bar in the Agents window (shown when the editor is in the grid, not as a modal) that expands the editor by collapsing the auxiliary bar (secondary side bar).

  • When the auxiliary bar is visible, a chevron-right Push Editor Right hides it.
  • Once hidden, the same slot shows a chevron-left Show Secondary Side Bar that restores it.
  • The direction flip is driven by AuxiliaryBarVisibleContext.

The actions live in MenuId.EditorTitleLayout (right of the tabs) and are gated to the sessions window / main editor group. The auxiliary-bar invariant is only enforced when the editor part becomes visible, so the toggle can collapse the side part while the editor stays open.

Why

Gives users a quick way to widen the editor area by hiding the secondary side bar directly from the editor title bar.

Notes for reviewers

  • Implementation: src/vs/sessions/contrib/editor/browser/editor.contribution.ts (PushEditorRightAction / PullEditorLeftAction).
  • Spec updated in src/vs/sessions/LAYOUT.md (§5 Editor Modal).
  • Unit tests added in editor.contribution.test.ts.
  • compile-check-ts-native and valid-layers-check pass.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Add a chevron toggle to the editor part title bar (shown when the editor
is in the grid, not as a modal) that expands the editor by collapsing the
auxiliary bar (secondary side bar). When the auxiliary bar is visible a
chevron-right "Push Editor Right" hides it; once hidden the same slot shows
a chevron-left "Show Secondary Side Bar" that restores it. The flip is
driven by AuxiliaryBarVisibleContext.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 4, 2026 19:14
@sandy081 sandy081 self-assigned this Jun 4, 2026
@sandy081 sandy081 enabled auto-merge (squash) June 4, 2026 19:14
@sandy081 sandy081 requested a review from benibenj June 4, 2026 19:14
@sandy081 sandy081 disabled auto-merge June 4, 2026 19:16
Copy link
Copy Markdown
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

Adds an editor-titlebar chevron toggle in the Agents window that collapses/expands the secondary side bar (auxiliary bar) to quickly widen the editor area when the editor is shown in the grid.

Changes:

  • Register two new editor title-bar actions (chevron right/left) that hide/show the auxiliary bar, switching via AuxiliaryBarVisibleContext.
  • Document the new editor-titlebar behavior in src/vs/sessions/LAYOUT.md.
  • Add unit tests asserting the new commands call setPartHidden(..., Parts.AUXILIARYBAR_PART) as expected.
Show a summary per file
File Description
src/vs/sessions/contrib/editor/browser/editor.contribution.ts Adds PushEditorRightAction / PullEditorLeftAction to toggle auxiliary bar visibility from the editor title toolbar in the sessions window.
src/vs/sessions/contrib/editor/test/browser/editor.contribution.test.ts Adds tests that validate the new commands hide/show Parts.AUXILIARYBAR_PART.
src/vs/sessions/LAYOUT.md Updates layout spec to describe the new chevron toggle behavior and its context-driven flip.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

- Move the auxiliary bar chevron to the right of maximize/restore since it
  changes the right-hand side of the layout (order 99.5, before close).
- Restore the editor's right border and corner radii via a .noauxiliarybar
  rule so it keeps its card appearance when the auxiliary bar is hidden.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sandy081 sandy081 enabled auto-merge (squash) June 4, 2026 19:36
@sandy081 sandy081 removed the request for review from benibenj June 4, 2026 20:12
@sandy081 sandy081 added this to the 1.124.0 milestone Jun 4, 2026
@sandy081 sandy081 merged commit d96a2b2 into main Jun 4, 2026
39 of 40 checks passed
@sandy081 sandy081 deleted the agents/implement-a-button-on-the-editor-part-when-ef771f24 branch June 4, 2026 20:45
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.

3 participants