Skip to content

chat: show long agent questions in one scroll area and improve answers - #346600

Merged
Connor Peet (connor4312) merged 5 commits into
mainfrom
connor4312/346327
Nov 6, 2026
Merged

Connor Peet (connor4312) merged 5 commits into
mainfrom
connor4312/346327

Conversation

@connor4312

Copy link
Copy Markdown
Member

Changes the question carousel so that users can read a long question and its
answers in one place, and answer free-text and yes/no questions more easily.

  • Keeps only the title row pinned. The message, description, details, and
    answers now scroll together in one native scroll area, which replaces the
    split-height layout.
  • Adds a Maximize toggle that shows only when the content overflows. It raises
    the card height to min(650px, 70vh), and Escape restores it.
  • Shows an arrow button in place of Next or Submit while the answers are below
    the fold. The button scrolls to the answers and changes back to Next or Submit
    with a short animation. Reduced motion skips the animation.
  • Shows boolean questions (true/false options) as No and Yes footer buttons
    that answer and advance. When a custom answer is allowed, a "Something else"
    field is always present, and typing in it replaces No and Yes with Submit.
  • Uses a Monaco editor for free-text and custom answers. The editor wraps,
    grows with its content, and gets agent host completions (for example @ and /)
    for the session of the question.
  • Keeps the body scrolled to the bottom when an answer editor grows.
  • Escapes a leading list or heading marker in titles, so "6. Timeframe" does
    not render as an indented list.
  • Always hides a detailed message that is the same as the title, and removes
    the hideDuplicateDetailedMessage option.
  • Adds component fixtures for boolean, multi-step, and long-context questions,
    and updates the unit tests.

Fixes #346327
Fixes #343293
Fixes #345574
Fixes #329379

(Commit message generated by Copilot)

Validation

Run before merging origin/main:

  • tsc --project ./src/tsconfig.json --noEmit --skipLibCheck: passed
  • node build/eslint.ts <changed files>: passed
  • node build/stylelint.ts: passed
  • ./scripts/test.sh --run chatQuestionCarouselPart.test.ts --run chatListRenderer.test.ts --run inboxNotificationsView.test.ts --run chatHarnessSwitchFeedbackSurveyService.test.ts --run chatInputCompletions.test.ts: 1359 passing

After merging origin/main, type-check passed again. The merge only conflicted on imports in inboxNotificationsView.test.ts. I could not rebuild against the dependency changes from main locally, because the npm registry was unreachable, so CI is the source of truth for the merged tree.

To test manually: in the Agents window, ask an agent to call askQuestions with a long multi-paragraph question, several steps, a yes/no question that allows a custom answer, and a free-text question. Check the scroll-to-answers arrow, Maximize, the No/Yes buttons, "Something else", and @ or / completions in the answer editors.

Changes the question carousel so that users can read a long question and its
answers in one place, and answer free-text and yes/no questions more easily.

- Keeps only the title row pinned. The message, description, details, and
  answers now scroll together in one native scroll area, which replaces the
  split-height layout.
- Adds a Maximize toggle that shows only when the content overflows. It raises
  the card height to min(650px, 70vh), and Escape restores it.
- Shows an arrow button in place of Next or Submit while the answers are below
  the fold. The button scrolls to the answers and changes back to Next or Submit
  with a short animation. Reduced motion skips the animation.
- Shows boolean questions (true/false options) as No and Yes footer buttons
  that answer and advance. When a custom answer is allowed, a "Something else"
  field is always present, and typing in it replaces No and Yes with Submit.
- Uses a Monaco editor for free-text and custom answers. The editor wraps,
  grows with its content, and gets agent host completions (for example @ and /)
  for the session of the question.
- Keeps the body scrolled to the bottom when an answer editor grows.
- Escapes a leading list or heading marker in titles, so "6. Timeframe" does
  not render as an indented list.
- Always hides a detailed message that is the same as the title, and removes
  the hideDuplicateDetailedMessage option.
- Adds component fixtures for boolean, multi-step, and long-context questions,
  and updates the unit tests.

Fixes #346327
Fixes #343293
Fixes #345574
Fixes #329379

(Commit message generated by Copilot)
# Conflicts:
#	src/vs/sessions/contrib/inboxOne/test/browser/inboxNotificationsView.test.ts
Copilot AI balanced review requested due to automatic review settings November 6, 2026 17:25
@connor4312
Connor Peet (connor4312) enabled auto-merge (squash) November 6, 2026 17:25
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 169a1c16 Current: 66e2815f

Changed (18)

sessions/inbox/inboxNotificationsView/Questions/Light
Before After
before after
sessions/inbox/inboxNotificationsView/Narrow/Light
Before After
before after
sessions/inbox/inboxNotificationsView/LongTitle/Light
Before After
before after
sessions/inbox/inboxNotificationsView/TextQuestion/Light
Before After
before after
sessions/inbox/inboxNotificationsView/Evidence/Light
Before After
before after
sessions/inbox/inboxNotificationsView/EvidenceNarrow/Light
Before After
before after
sessions/sessionChatInputToolbar/SessionChatView_StackedInputSurfaces/Light
Before After
before after
chat/chatQuestionCarousel/SingleTextQuestion/Light
Before After
before after
chat/chatQuestionCarousel/SingleSelectQuestion/Light
Before After
before after
chat/chatQuestionCarousel/MultiSelectQuestion/Light
Before After
before after
chat/chatQuestionCarousel/MultipleQuestions/Light
Before After
before after
chat/chatQuestionCarousel/CarouselMessageOverflow/Light
Before After
before after
chat/chatQuestionCarousel/AnswersBorrowUnusedHeight/Light
Before After
before after
chat/chatQuestionCarousel/CompactQuestion/Light
Before After
before after
chat/chatQuestionCarousel/ValidationError/Light
Before After
before after
chat/chatQuestionCarousel/HarnessSwitchSurveyReason/Light
Before After
before after
chat/chatQuestionCarousel/NoSkip/Light
Before After
before after
chat/chatQuestionCarousel/MarkdownLinks/Light
Before After
before after

Added (4)

chat/chatQuestionCarousel/BooleanQuestion/Light

current

chat/chatQuestionCarousel/MultiStepWithBoolean/Light

current

chat/chatQuestionCarousel/LongContext/Light

current

chat/chatQuestionCarousel/LongBodyOverflow/Light

current

Removed (4)

chat/chatQuestionCarousel/AnswersExceed55Percent/Light

baseline

chat/chatQuestionCarousel/AnswersFitWithin55Percent/Light

baseline

chat/chatQuestionCarousel/DetailsBorrowUnusedHeight/Light

baseline

chat/chatQuestionCarousel/EqualHeightOverflow/Light

baseline

(Commit message generated by Copilot)

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

An unanswered boolean question loses its explicit default, causing required submissions to be rejected and optional defaults to be omitted, alongside unresolved scrolling, completion, and keyboard-accessibility issues.

8 open issues
What changed in this PR

This PR updates chat question carousels to make long prompts easier to read and free-text and boolean questions easier to answer, addressing the linked scrolling and resizing issues.

Changes:

  • Combines question details and answers into one scroll area, with Maximize and scroll-to-answers controls.
  • Adds No/Yes actions and auto-growing Monaco answer editors with session-aware agent-host completions.
  • Simplifies duplicate-message suppression and updates fixtures and tests for the new interactions.
File Description
src/​vs/​workbench/​test/​browser/​componentFixtures/​chat/​chatQuestionCarousel.fixture.ts Adds boolean and long-context fixtures; updates layout expectations.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatContentParts/​chatQuestionCarouselPart.test.ts Updates editor, scrolling, navigation, and boolean-answer tests.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​editor/​agentHostQuestionAnswerCompletions.ts Routes answer-editor completions to the owning agent-host session.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​chatInputPart.ts Supplies the overflow host for answer-editor widgets.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​media/​chatQuestionCarousel.css Styles the shared scroll body, maximized card, and footer controls.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​media/​chatQuestionAnswerEditor.css Adds answer-editor styling and idle-state transitions.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatQuestionCarouselPart.ts Implements the revised layout, answer controls, and navigation behavior.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatContentParts/​chatQuestionAnswerEditor.ts Introduces the wrapping, auto-growing Monaco answer editor.
src/​vs/​workbench/​contrib/​chat/​browser/​chat.shared.contribution.ts Registers answer-editor completion support.
src/​vs/​sessions/​contrib/​inboxOne/​test/​browser/​inboxNotificationsView.test.ts Adapts Inbox tests to editor dependencies and automatic deduplication.
src/​vs/​sessions/​contrib/​inboxOne/​browser/​inboxNotificationsView.ts Removes the obsolete duplicate-message option.

Review effort: Balanced

- Uses the default of an unanswered yes/no question as its answer.
- Restores a maximized card on Escape from any control in the card.
- Pins only the short title. The full message scrolls with the body, and
  text that is already shown is not repeated.
- Lets the arrow, Page Up/Down, Home, and End keys scroll the question body.
- Keeps keyboard focus in the footer when it is rendered again.
- Allows a custom yes/no answer unless allowFreeformInput is false.
- Passes the session to inbox question cards, so completions work there.
- Updates the question carousel accessibility help.

(Commit message generated by Copilot)
(Commit message generated by Copilot)
@connor4312
Connor Peet (connor4312) merged commit 83b2d78 into main Nov 6, 2026
51 checks passed
@connor4312
Connor Peet (connor4312) deleted the connor4312/346327 branch November 6, 2026 18:18
@vs-code-engineering vs-code-engineering Bot added this to the 1.146.0 milestone Nov 6, 2026
Bryan Chen (bryanchen-d) added a commit that referenced this pull request Nov 6, 2026
Tests that create several carousels removed only the last one in teardown, so the others stayed in the page. Since #346600 they add about 130px above every later fixture, which broke the drag-buffer tests of Sessions - Headers and the compact menu direction tests of Workbench - Titlebar Part on main.

Co-authored-by: Copilot <[email protected]>
Bryan Chen (bryanchen-d) added a commit that referenced this pull request Nov 6, 2026
Tests that create several carousels removed only the last one in teardown, so the others stayed in the page. Since #346600 they add about 130px above every later fixture, which broke the drag-buffer tests of Sessions - Headers and the compact menu direction tests of Workbench - Titlebar Part on main.

Co-authored-by: Copilot <[email protected]>
Bryan Chen (bryanchen-d) added a commit that referenced this pull request Nov 6, 2026
…nd leaked question carousels (#346643)

* sessions: stub onDidChangeProviders in chat window test doubles

#346419 made sessionAgentMerge observe ISessionsProvidersService.onDidChangeProviders. The chat window test doubles only stubbed getProvider, so binding session action context keys threw 'this.event is not a function' whenever agentMergeActions was loaded in the same renderer.

Co-authored-by: Copilot <[email protected]>

* chat: remove every question carousel the tests create

Tests that create several carousels removed only the last one in teardown, so the others stayed in the page. Since #346600 they add about 130px above every later fixture, which broke the drag-buffer tests of Sessions - Headers and the compact menu direction tests of Workbench - Titlebar Part on main.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants