Skip to content

Browser: Fix delayed Agents window pane resizing - #345336

Merged
Joaquín Ruales (jruales) merged 3 commits into
mainfrom
jruales-canvas-panel-resizing
Oct 31, 2026
Merged

Joaquín Ruales (jruales) merged 3 commits into
mainfrom
jruales-canvas-panel-resizing

Conversation

@jruales

@jruales Joaquín Ruales (jruales) commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #344364

Exposes the editor part's existing aggregated focus event through IEditorPart and uses it to restore a minimized Editor pane as soon as the main editor part receives focus, including native WebContentsView focus from Integrated Browser and Canvas. The editor subsystem continues to own group and pane lifecycle, while Sessions retains the minimized-pane layout policy and its DOM focus/mousedown fallbacks.

CC: Kyle Cutler (@kycutler)

Validation

  • npm run build-fast -- --client-only — passed
  • npm run typecheck-client — passed
  • npm run eslint -- src/vs/workbench/services/editor/common/editorGroupsService.ts src/vs/workbench/test/browser/workbenchTestServices.ts src/vs/sessions/browser/workbench.ts src/vs/sessions/test/browser/workbench.test.ts — passed
  • npm run test-browser-no-install -- --run src/vs/sessions/test/browser/workbench.test.ts --browser chromium — passed, 141 tests
  • ./scripts/test.sh --run src/vs/sessions/test/browser/workbench.test.ts --grep "restores a minimized Editor" — passed
  • Code OSS real-UI validation with Integrated Browser — from Chat focus and a 300 px Browser pane, a native click in the page expanded it to 958 px; a real Chat click returned it to 300 px and it stayed stable beyond two seconds
  • Code OSS real-UI validation with Justin's copilot-chat-progress canvas — from Chat focus and a 300 px Canvas pane, a native click in the canvas expanded it to 958 px; a real Chat click returned it to 300 px and it stayed stable beyond two seconds

🤖 Written by GitHub Copilot on behalf of Joaquín Ruales (@jruales).

Restore minimized editor panes from focused main-group activation, including native Browser and Canvas WebContentsViews.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 31, 2026 04:44
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Base: 949cc93e Current: cf47e024

No screenshot changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The focus guard still accepts modal groups and stale document focus, allowing unintended resizing of the main Editor/Chat split.

2 open issues
What changed in this PR

Addresses delayed pane resizing in the Agents window by restoring a minimized Editor pane on focused editor-group activation, including native Integrated Browser and Canvas focus.

Changes:

  • Adds an activation listener with window and focus guards.
  • Adds regression coverage for DOM focus, native focus, other-window activation, and listener disposal.
File Description
src/​vs/​sessions/​test/​browser/​workbench.test.ts Tests focus guards and activation-listener disposal.
src/​vs/​sessions/​browser/​workbench.ts Registers focused editor-group activation to restore the minimized Editor pane.

Review effort: Balanced

Comment thread src/vs/sessions/browser/workbench.ts Resolved
Comment thread src/vs/sessions/browser/workbench.ts Resolved
Track focus on every main editor pane so modal, auxiliary, and programmatic group activations cannot resize the Sessions split.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jruales Joaquín Ruales (jruales) changed the title Fix delayed Agents window pane resizing Browser: Fix delayed Agents window pane resizing Oct 31, 2026
Expose the existing editor part focus event and let Sessions consume the platform-owned aggregation instead of mirroring group and pane lifecycle.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the Editor pane focus-restoration change.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@jruales
Joaquín Ruales (jruales) merged commit 97d0192 into main Oct 31, 2026
56 checks passed
@jruales
Joaquín Ruales (jruales) deleted the jruales-canvas-panel-resizing branch October 31, 2026 07:16
@vs-code-engineering vs-code-engineering Bot added this to the 1.145.0 milestone Oct 31, 2026
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.

canvases: agents window - clicking between side panels and main chat jumps around

3 participants