Skip to content

inlineChat: fix model picker overflow when selecting Auto#309427

Merged
jrieken merged 1 commit intomainfrom
joh/fix-inline-chat-model-picker-overflow
Apr 13, 2026
Merged

inlineChat: fix model picker overflow when selecting Auto#309427
jrieken merged 1 commit intomainfrom
joh/fix-inline-chat-model-picker-overflow

Conversation

@jrieken
Copy link
Copy Markdown
Member

@jrieken jrieken commented Apr 13, 2026

Summary

Fixes #309424

When selecting the "Auto" model in the inline chat model picker, the picker would collapse into the toolbar overflow menu ("..."). This happened because the toolbar element lacked a fixed width - its width was content-based and shrank when switching to a shorter label like "Auto", causing the responsive overflow logic to hide it.

Session Context

Key decisions from the development session:

  • Root cause: When renderInputToolbarBelowInput is true (inline chat v2), the toolbar is placed in .chat-attachments-container instead of .chat-input-toolbars. The CSS rule .chat-input-toolbars > .chat-input-toolbar { width: 100% } doesn't match because the parent element is different. Without width: 100%, the toolbar width is content-based and shrinks when the model label changes. The ResizeObserver on the toolbar fires with the smaller width, and the responsive overflow logic in toolbar.ts#updateActions() decides items need to be hidden.
  • Fix approach: Add width: 100% to the existing .chat-attachments-container > .chat-input-toolbar rule in the inline chat v2 CSS block, matching the behavior of the normal chat layout.
  • Why only "Auto": "Auto" has a short label. The toolbar shrinks enough that minimumWidth > containerWidth, triggering overflow. Longer model names keep the toolbar wide enough to avoid this threshold.

Changes

  • Added width: 100% to .chat-attachments-container > .chat-input-toolbar in the inline chat v2 CSS block so the toolbar takes the full container width regardless of label content length.

Copilot AI review requested due to automatic review settings April 13, 2026 09:46
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

Fixes an inline chat (v2) layout regression where selecting the short “Auto” label caused the model picker to be pushed into the toolbar overflow menu by ensuring the input toolbar has a stable, container-based width in the chat-attachments-container layout.

Changes:

  • Set width: 100% on .chat-attachments-container > .chat-input-toolbar in inline chat v2 styling to prevent content-based shrinking that triggers responsive overflow.
Show a summary per file
File Description
src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css Ensures the inline chat v2 input toolbar takes the full available width to avoid model picker collapsing into overflow when label text becomes shorter.

Copilot's findings

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

@jrieken jrieken merged commit 2a60ba4 into main Apr 13, 2026
30 checks passed
@jrieken jrieken deleted the joh/fix-inline-chat-model-picker-overflow branch April 13, 2026 14:02
@jrieken jrieken added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Apr 13, 2026
@vs-code-engineering vs-code-engineering Bot added this to the 1.115.0 milestone Apr 13, 2026
@vs-code-engineering vs-code-engineering Bot added release-cherry-pick Automated cherry-pick between release and main branches and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-cherry-pick Automated cherry-pick between release and main branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline chat zone widget hides model picker

3 participants