Skip to content

chat: make askQuestions carousel more compact - #336712

Open
jipeng (guhou-hvi) wants to merge 2 commits into
microsoft:mainfrom
guhou-hvi:feat/question-carousel-compact
Open

jipeng (guhou-hvi) wants to merge 2 commits into
microsoft:mainfrom
guhou-hvi:feat/question-carousel-compact

Conversation

@guhou-hvi

@guhou-hvi jipeng (guhou-hvi) commented Sep 18, 2026 •

Copy link
Copy Markdown

Problem

The vscode/askQuestions tool renders a question carousel above the chat input. When options have descriptions (the common "clarifying questions with recommended defaults" pattern), each option row expands to two lines — the option title plus its explanation — and the card's outer max-height is 45vh. The result: the card occupies most of the chat area, hiding the agent's prior output the user is still reading.

CLI agents like Codex present the same information more efficiently: the option list shows only the short titles, and the description appears as a hover tooltip on the row the user is actually looking at.

Change

src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css — two lines:

  1. Hide the option-description span (.chat-question-list-label-desc { display: none; }).
  2. Reduce the carousel container max-height from min(420px, 45vh) to min(300px, 35vh).

That's the entire diff. The hover tooltip is already in place: renderSingleSelect/renderMultiSelect call _hoverService.setupDelayedHover(listItem, { content: option.label, position: HoverPosition.BELOW }), and option.label carries the full "Title - Description" string that the carousel splits into two DOM spans. So hiding the second span removes the inline duplication while preserving the complete text on hover.

Accessibility

The description must stay reachable without a mouse:

  • Screen readers: unaffected — each row's accessible name is already the full "Option N: Title - Description" set via aria-label on the list item, independent of the visual span.
  • Keyboard-only sighted users: the description of the active row is revealed via CSS on .selected (single-select sets it on the keyboard-active row through ChatCardListbox.setActive) and on :focus/:focus-within (multi-select moves real DOM focus to the row). So the row you are navigating to shows its description inline, matching what a mouse hover reveals.

Behavior / Risk

  • Option rows: title only (single line). Hover to see the description.
  • Card max-height: ~300px / 35vh (was ~420px / 45vh). The content already scrolls inside the container, so no clipping is introduced — only the outer footprint is smaller.
  • No changes to AskQuestionsTool, the data model, keyboard navigation, selection, submit, or draft persistence.
  • Summary (post-submit) rendering is unchanged — it uses a different DOM tree (renderSummary / renderConversationSummary).

Files

  • src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css

Tests

N/A (CSS-only UI change).

Fixes #336708

Copilot AI balanced review requested due to automatic review settings September 18, 2026 07:30

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

Hidden descriptions currently lack equivalent visible access for keyboard-only users.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Compacts the chat question carousel to preserve conversation context.

Changes:

  • Reduces the carousel’s maximum height.
  • Hides inline option descriptions while retaining hover text.
File summaries
File Description
chatQuestionCarousel.css Compacts carousel height and option rows.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

}

.chat-question-list-label-desc {
display: none;
@guhou-hvi

Copy link
Copy Markdown
Author

Addressed the keyboard-only access concern in \1357953: the description is now revealed via CSS on .selected\ (single-select keyboard-active row) and :focus/:focus-within\ (multi-select focused row), so navigating with the keyboard shows the description inline the same way a mouse hover does. Screen-reader access was already preserved because each row's \�ria-label\ carries the full 'Option N: Title - Description' text independent of the visual span.

This branch has not been deployed

No deployments
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.

chat: askQuestions option descriptions take too much vertical space in the question carousel

3 participants