chat: enhance compare block diff actions and accessibility#292005
Merged
connor4312 merged 1 commit intomainfrom Jan 31, 2026
Merged
chat: enhance compare block diff actions and accessibility#292005connor4312 merged 1 commit intomainfrom
connor4312 merged 1 commit intomainfrom
Conversation
Adds improved diff editing workflow and accessibility features to chat compare blocks: - Add toggle inline/side-by-side diff view mode action with icon - Add open in diff editor action for full editor view - Fix isCodeCompareBlockActionContext to properly check diffEditor property - Add readOnly context key checks to prevent editing read-only diffs - Adjust menu order for accept/discard actions (10, 11) and diff toggle (1) - Add toggleDiffViewMode callback to action context - Improve screen reader accessibility for compare block toolbar - Add width tracking to layout method for proper initialization - Refactor CSS for compare block header with nested selectors for better label truncation and styling Fixes #287816 (Commit message generated by Copilot)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the diff editing workflow and accessibility features for chat compare blocks to address issue #287816, where widening the chat panel made diff content harder to see.
Changes:
- Adds toggle action to switch between inline and side-by-side diff view modes with proper icon toggling
- Adds action to open compare blocks in a full diff editor
- Improves screen reader accessibility by always showing the toolbar with proper aria-labels
- Refactors CSS using nested selectors for better label truncation handling to prevent overflow issues
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| codeBlockPart.css | Refactors CSS to use nesting and adds flexbox layout for proper label truncation with ellipsis |
| codeBlockPart.ts | Adds toggleDiffViewMode callback, width tracking for layout, and screen reader toolbar configuration |
| chatCodeblockActions.ts | Fixes type guard, adds toggle diff view and open in editor actions, adds readOnly preconditions to prevent editing read-only diffs |
dmitrivMS
approved these changes
Jan 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds improved diff editing workflow and accessibility features to chat
compare blocks:
label truncation and styling
Fixes #287816
(Commit message generated by Copilot)