Repository navigation
sessions: remove unused mobile changes list view - #350868
Draft
Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
Draft
Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
Conversation
Removes the `MobileChangesView` changes list and the code that only existed to support it. The phone layout opens the multi-file diff overlay (`MobileMultiDiffView`) instead, which only needs `toRow` and `rowToDiffData` from `mobileChangesView.ts`. - `MobileChangesView`, `MobileChangesOpenHandler` and their helpers - the "Changes list" rules in `mobileOverlayViews.css` - the `agentsMobileDiff.modifiedForeground` color and its stylelint known-variables entry Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the cleanup of the unused mobile Changes overlay.
No open issues 🎉
What changed in this PR
Removes the unused mobile Changes list overlay from the Agents window after #318081 replaced its caller with the multi-file diff view. The cleanup preserves helpers and styles used by the active diff views, with no intended behavior change.
Changes:
- Removes the obsolete view, event handling, and list-only row fields.
- Deletes unused list styles and the modified-file theme color.
- Updates comments to describe the remaining diff overlay.
No actionable findings remain. The PR reports existing baseline type-check errors and two test timeouts; validation was not rerun here.
| File | Description |
|---|---|
src/vs/sessions/browser/parts/mobile/contributions/mobileDiffView.ts |
Rewords a comment about counter colors; no functional change. |
src/vs/sessions/browser/parts/mobile/contributions/mobileDiffColors.ts |
Removes the unused modified-file color and updates comments. |
src/vs/sessions/browser/parts/mobile/contributions/mobileChangesView.ts |
Removes the obsolete list view while retaining the command ID and diff-data helpers. |
src/vs/sessions/browser/parts/mobile/contributions/media/mobileOverlayViews.css |
Deletes list-only styles and preserves added/removed counter colors. |
build/lib/stylelint/vscode-known-variables.json |
Removes the deleted theme color’s CSS variable entry. |
Review effort: Balanced
This branch has not been deployed
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 about 430 lines of dead code (+18/−450 across 5 files): the full-screen "Changes" list overlay of the Agents window's mobile layout, whose only caller was replaced by the multi-file diff overlay in #318081. Code that was only referenced from the removed view (its styles and one theme color) counts as dead and is removed with it. There is no behavior change.
What is removed
MobileChangesView, theMobileChangesOpenHandlertype,openMobileChangesView,compareRowsand the change-type glyph, icon and label helpers inmobileChangesView.ts, together with thedisplayUriandchangeTypefields of the row type that only the list used.mobileOverlayViews.css:.mobile-overlay-empty-state,.mobile-changes-listand the.mobile-changes-row*parts, pill and counts rules.agentsMobileDiff.modifiedForegroundcolor inmobileDiffColors.tsand its entry invscode-known-variables.json. Only the removed row icon and pill styles used it.mobileDiffColors.tsandmobileDiffView.tsthat described the removed list are reworded.Evidence that they were dead
mobileOverlayContribution.tsused to hold aMobileChangesViewopened withopenMobileChangesView. Add mobile multi-diff view #318081 switched it toMobileMultiDiffView, which left both without a caller.git grep(excluding the vendoredextensions/copilot) finds no reference to any removed symbol, CSS class or color id.mobileChangesView.tsaremobileTitlebarPart.ts,mobileTitlebarPart.test.tsandmobileOverlayContribution.ts, and they use only the exports listed below.What stays, because other code still uses it
MOBILE_OPEN_CHANGES_VIEW_COMMAND_ID,toRowandrowToDiffDatainmobileChangesView.ts: used by the titlebar and bymobileOverlayContribution.tsto build the liveMobileMultiDiffView..mobile-changes-row-addedand.mobile-changes-row-removed: used bymobileDiffView.ts.agentsMobileDiff.addedForegroundandagentsMobileDiff.deletedForegroundcolors..mobile-changes-pill*titlebar classes.How to test
The change deletes code that nothing calls and I did not launch the app. Checks that I ran locally:
pnpm run oxlint src/vs/sessions/browser/parts/mobile/contributions/mobileChangesView.ts src/vs/sessions/browser/parts/mobile/contributions/mobileDiffColors.ts src/vs/sessions/browser/parts/mobile/contributions/mobileDiffView.ts: passed.pnpm run stylelint: passed.pnpm run transpile-client: passed.pnpm run typecheck-client: reports 26 errors, all insrc/vs/platform/agentHostand none in a file touched here.mainreports the same 26 errors in my checkout, which has an outdated@microsoft/copilot-sdkinstall.$env:VSCODE_SKIP_PRELAUNCH='1'; .\scripts\test.bat --reporter spec --run src/vs/sessions/test/browser/mobileTitlebarPart.test.ts --run src/vs/sessions/test/browser/mobileMultiDiffView.test.ts --run src/vs/sessions/test/browser/mobileDiffView.test.ts --run src/vs/sessions/contrib/mobile/test/browser/mobilePresentation.test.ts: 37 passing and 2 failing. In my local run the two failures areMobileMultiDiffViewtests that time out after 5000 ms ("loads visible files incrementally instead of batching the initial viewport" and "starts loading the newly visible file while an older load is pending").maingives the same result locally: 37 passing and 2 failing.I did not run
pnpm run valid-layers-check, because the change only deletes code and adds no imports.