debt - cleanup from sidebar support in modal editors#306141
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Removes leftover modal-editor sidebar/min-width configurability plumbing and centralizes “changes list” rendering/styling so the same list can be used in the modal editor sidebar.
Changes:
- Removed
workbench.editor.modalMinWidthconfiguration and simplified modal min-width handling. - Refactored
ChangesViewPaneto reuse a shared tree-creation helper for both the main Changes view and the modal sidebar list; adjusted CSS scoping accordingly. - Added a new unit test suite intended to validate modal sidebar behaviors.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/test/browser/parts/editor/modalEditorSidebar.test.ts | Adds a new test harness + tests for modal sidebar width/content behaviors. |
| src/vs/workbench/browser/workbench.contribution.ts | Removes the workbench.editor.modalMinWidth setting contribution. |
| src/vs/workbench/browser/parts/editor/modalEditorPart.ts | Simplifies effective min-width calculation and removes sidebar dynamic update wiring. |
| src/vs/workbench/browser/parts/editor/media/modalEditorPart.css | Removes modal-editor sidebar styling that was specific to changes-list badges/stats. |
| src/vs/sessions/contrib/configuration/browser/configuration.contribution.ts | Removes sessions default override for workbench.editor.modalMinWidth. |
| src/vs/sessions/contrib/changes/browser/media/changesView.css | Broadens selectors to style .chat-editing-session-list outside .changes-view-body. |
| src/vs/sessions/contrib/changes/browser/changesView.ts | Extracts createChangesTree and reuses it for the modal editor sidebar list. |
| src/vs/platform/editor/common/editor.ts | Updates sidebar option documentation to reflect reduced dynamic behavior. |
Comments suppressed due to low confidence (2)
src/vs/sessions/contrib/changes/browser/changesView.ts:1258
createChangesTreehard-codes the tree id as'ChangesViewTree'. This method is now used to create both the main Changes tree and the modal editor sidebar tree, so the ids will collide if both exist (state/telemetry/context can become ambiguous). Consider accepting the id as a parameter (e.g.'ChangesViewTree'vs'ModalEditorSidebar').
return disposables.add(this.instantiationService.createInstance(
WorkbenchCompressibleObjectTree<ChangesTreeElement>,
'ChangesViewTree',
container,
src/vs/sessions/contrib/changes/browser/changesView.ts:1266
createChangesTreeuses a widget aria label of “Changes Tree” for all instances. This regresses the modal sidebar list accessibility label (previously “Files”). Consider parameterizing the aria label (and related sidebar-specific options likemultipleSelectionSupport,compressionEnabled, anddnd) so the sidebar tree can keep an appropriate, context-specific label.
accessibilityProvider: {
getAriaLabel: (element: ChangesTreeElement) => isChangesFileItem(element) ? basename(element.uri.path) : element.name,
getWidgetAriaLabel: () => localize('changesViewTree', "Changes Tree")
},
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/7e47c5a7-9a3f-4353-975d-ab48a16bdc86 Co-authored-by: bpasero <900690+bpasero@users.noreply.github.com>
roblourens
approved these changes
Mar 29, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Removes leftover modal-editor sidebar/min-width configurability plumbing and centralizes "changes list" rendering/styling so the same list can be used in the modal editor sidebar.
Changes Made
workbench.editor.modalMinWidthconfiguration and simplified modal min-width handling.ChangesViewPaneto reuse a sharedcreateChangesTreehelper for both the main Changes view and the modal sidebar list; adjusted CSS scoping accordingly.createChangesTreewith an optionalgetSelectioncallback so theChangesViewActionRunnerfor the sidebar tree reads from the sidebar tree's own selection instead of the main view's selection.IModalEditorPartOptions.sidebarto accurately describe that the sidebar cannot be added, removed, or updated after the modal editor is opened.Testing
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.