Skip to content

Keep active chat tab visible on resize and tab switch#312124

Merged
sandy081 merged 1 commit intomainfrom
sandy081/chat-tab-reveal-active
Apr 23, 2026
Merged

Keep active chat tab visible on resize and tab switch#312124
sandy081 merged 1 commit intomainfrom
sandy081/chat-tab-reveal-active

Conversation

@sandy081
Copy link
Copy Markdown
Member

When the chat composite bar has many tabs and is resized (or the active tab changes), the active tab could scroll out of view. This mirrors the editor tab bar behavior by:

  • Calling scrollIntoView() on the active tab element when the active tab changes
  • Adding a DisposableResizeObserver on the tabs container to scroll the active tab into view on resize

Use scrollIntoView on the active tab when it changes, and add a
ResizeObserver on the tabs container so the active tab stays visible
when the chat composite bar is resized.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 23, 2026 12:11
@sandy081 sandy081 enabled auto-merge (squash) April 23, 2026 12:11
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

This PR improves the Agents window chat composite bar UX by ensuring the active chat tab stays visible when the tab strip is resized or when the active tab changes, matching the behavior users expect from editor tabs.

Changes:

  • Scroll the active chat tab into view whenever the active tab is updated.
  • Add a DisposableResizeObserver on the tabs container to re-reveal the active tab on resize.
Show a summary per file
File Description
src/vs/sessions/browser/parts/chatCompositeBar.ts Adds active-tab scrollIntoView behavior on active changes and on tab-strip resize via DisposableResizeObserver.

Copilot's findings

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

@sandy081 sandy081 merged commit 32ca971 into main Apr 23, 2026
30 checks passed
@sandy081 sandy081 deleted the sandy081/chat-tab-reveal-active branch April 23, 2026 12:57
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 23, 2026
@sandy081 sandy081 restored the sandy081/chat-tab-reveal-active branch April 23, 2026 13:15
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