Skip to content

Render chat turn changes as a checkpoint-style summary - #324929

Merged
benibenj merged 2 commits into
mainfrom
agents/chat-turn-pills-to-checkpoint-style
Jul 8, 2026
Merged

Render chat turn changes as a checkpoint-style summary#324929
benibenj merged 2 commits into
mainfrom
agents/chat-turn-pills-to-checkpoint-style

Conversation

@benibenj

@benibenj benibenj commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Restyles the chat turn pills part so it no longer looks like floating pills and instead matches the checkpoint file changes summary.

What changed

  • Checkpoint-style turn summary: The turn changes part now renders a N files changed +ins -del header with a View All File Changes action, an optional inline preview action for the first previewable (Markdown/HTML) file the turn produced, and an expandable list of changed files. Reuses the checkpoint summary's structure/classes so the two look identical.
  • Shared file list: Extracted the collapsible file-list rendering into a shared renderChangesSummaryFileList helper used by both the checkpoint summary and the turn summary.
  • Per-row Preview action: Each Markdown/HTML row in the expanded file list gets a right-aligned action bar with a labelless Preview action that opens the file in the Markdown preview or the integrated browser.
  • Fixtures: Added component fixtures for the part in all its states, plus two entire chat fixtures rendering the summary in-situ via the real chat list renderer.

Validation

  • typecheck-client, ESLint, and repo stylelint all pass on the changed files.
  • Local pre-commit hygiene hook could not run in this environment (missing gulp build deps / npm auth); relying on CI hygiene. Committed with --no-verify per author approval.

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

Restyle the chat turn pills part to match the checkpoint file changes summary: a 'N files changed +ins -del' header with a View All File Changes action, an optional inline 'preview <file>' action for the first previewable file, and an expandable list of changed files. Each markdown/HTML row in the list gets a labelless 'Preview' action that opens the file in the Markdown preview or the integrated browser.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 13:30
@benibenj
benibenj enabled auto-merge (squash) July 8, 2026 13:30
lszomoru
lszomoru previously approved these changes Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: dee4b701 Current: 07f81e70

Added (22)

chat/chatTurnPills/part/ChangesOnly_SingleFile/Dark

current

chat/chatTurnPills/part/ChangesOnly_SingleFile/Light

current

chat/chatTurnPills/part/ChangesOnly_MultipleFiles/Dark

current

chat/chatTurnPills/part/ChangesOnly_MultipleFiles/Light

current

chat/chatTurnPills/part/ChangesOnly_Expanded/Dark

current

chat/chatTurnPills/part/ChangesOnly_Expanded/Light

current

chat/chatTurnPills/part/ChangesAndPreview_Markdown/Dark

current

chat/chatTurnPills/part/ChangesAndPreview_Markdown/Light

current

chat/chatTurnPills/part/ChangesAndPreview_Expanded/Dark

current

chat/chatTurnPills/part/ChangesAndPreview_Expanded/Light

current

chat/chatTurnPills/part/ChangesAndPreview_Html/Dark

current

chat/chatTurnPills/part/ChangesAndPreview_Html/Light

current

chat/chatTurnPills/part/ChangesAndPreview_MultiplePreviewable/Dark

current

chat/chatTurnPills/part/ChangesAndPreview_MultiplePreviewable/Light

current

chat/chatTurnPills/part/PreviewOnly/Dark

current

chat/chatTurnPills/part/PreviewOnly/Light

current

chat/chatTurnPills/part/NoChanges_Hidden/Dark

current

chat/chatTurnPills/part/NoChanges_Hidden/Light

current

chat/chatTurnPills/inChat/Changes/Dark

current

chat/chatTurnPills/inChat/Changes/Light

current

chat/chatTurnPills/inChat/ChangesAndPreview/Dark

current

chat/chatTurnPills/inChat/ChangesAndPreview/Light

current

Removed (10)

chat/chatTurnPills/ChangesSingleFile/Dark

baseline

chat/chatTurnPills/ChangesSingleFile/Light

baseline

chat/chatTurnPills/ChangesMultipleFiles/Dark

baseline

chat/chatTurnPills/ChangesMultipleFiles/Light

baseline

chat/chatTurnPills/PreviewMarkdown/Dark

baseline

chat/chatTurnPills/PreviewMarkdown/Light

baseline

chat/chatTurnPills/PreviewMultiple/Dark

baseline

chat/chatTurnPills/PreviewMultiple/Light

baseline

chat/chatTurnPills/NoChanges_Hidden/Dark

baseline

chat/chatTurnPills/NoChanges_Hidden/Light

baseline

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.

Pull request overview

This PR restyles the per-turn “changes/preview” area in Chat to match the checkpoint-style file changes summary, and extracts shared rendering so both summaries use the same structure and file list.

Changes:

  • Reworked ChatTurnPillsContentPart to render a checkpoint-style header + optional preview action + expandable changed-files list with per-row preview actions.
  • Extracted the collapsible changed-files list into a shared renderChangesSummaryFileList helper, reused by both checkpoint summaries and turn summaries.
  • Expanded component fixtures to cover the new standalone and in-chat states for the turn changes summary.
Show a summary per file
File Description
src/vs/workbench/test/browser/componentFixtures/chat/chatWidget.fixture.ts Adds fixture plumbing for per-turn file diffs and enables turn-status-pill rendering in full chat fixtures.
src/vs/workbench/test/browser/componentFixtures/chat/chatTurnPills.fixture.ts Adds standalone + in-chat fixtures for the new checkpoint-style turn summary across multiple states.
src/vs/workbench/contrib/chat/browser/widget/media/chat.css Adds styling for the new turn-summary header preview action and per-row action bar in the file list.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTurnPillsPart.ts Replaces “floating pills” with checkpoint-style summary markup, integrates preview + per-row preview actions, and reuses shared file list rendering.
src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.ts Extracts shared renderChangesSummaryFileList and adds optional per-row actions via an ActionBar.

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Low

Comment thread src/vs/workbench/test/browser/componentFixtures/chat/chatWidget.fixture.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/widget/media/chat.css
- Stub IAgentHostService.getSubscription in chat fixtures so agent-host chat widgets (turn changes summary) render without crashing (the generic config chips lane opens a session subscription). - Use the canonical agent-host session scheme for the in-chat fixtures. - Reference CHANGES_SUMMARY_ELEMENT_HEIGHT from the list delegate. - Hide the preview separator in preview-only mode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@benibenj
benibenj merged commit 1ed41b0 into main Jul 8, 2026
29 checks passed
@benibenj
benibenj deleted the agents/chat-turn-pills-to-checkpoint-style branch July 8, 2026 14:42
@vs-code-engineering vs-code-engineering Bot added this to the 1.129.0 milestone Jul 8, 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.

4 participants