Skip to content

sessions: remove unused mobile changes list view - #350868

Draft
Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
mainfrom
agents/remove-dead-code-sessions-mobile-changes-view
Draft

Dmitriy Vasyura (dmitrivMS) wants to merge 1 commit into
mainfrom
agents/remove-dead-code-sessions-mobile-changes-view

Conversation

@dmitrivMS

@dmitrivMS Dmitriy Vasyura (dmitrivMS) commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

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, the MobileChangesOpenHandler type, openMobileChangesView, compareRows and the change-type glyph, icon and label helpers in mobileChangesView.ts, together with the displayUri and changeType fields of the row type that only the list used.
  • The "Changes list" rules in mobileOverlayViews.css: .mobile-overlay-empty-state, .mobile-changes-list and the .mobile-changes-row* parts, pill and counts rules.
  • The agentsMobileDiff.modifiedForeground color in mobileDiffColors.ts and its entry in vscode-known-variables.json. Only the removed row icon and pill styles used it.
  • Two comments in mobileDiffColors.ts and mobileDiffView.ts that described the removed list are reworded.

Evidence that they were dead

  • mobileOverlayContribution.ts used to hold a MobileChangesView opened with openMobileChangesView. Add mobile multi-diff view #318081 switched it to MobileMultiDiffView, which left both without a caller.
  • A repository-wide git grep (excluding the vendored extensions/copilot) finds no reference to any removed symbol, CSS class or color id.
  • The only importers of mobileChangesView.ts are mobileTitlebarPart.ts, mobileTitlebarPart.test.ts and mobileOverlayContribution.ts, and they use only the exports listed below.

What stays, because other code still uses it

  • MOBILE_OPEN_CHANGES_VIEW_COMMAND_ID, toRow and rowToDiffData in mobileChangesView.ts: used by the titlebar and by mobileOverlayContribution.ts to build the live MobileMultiDiffView.
  • .mobile-changes-row-added and .mobile-changes-row-removed: used by mobileDiffView.ts.
  • The agentsMobileDiff.addedForeground and agentsMobileDiff.deletedForeground colors.
  • The unrelated .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 in src/vs/platform/agentHost and none in a file touched here. main reports the same 26 errors in my checkout, which has an outdated @microsoft/copilot-sdk install.
  • $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 are MobileMultiDiffView tests 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"). main gives 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.

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>
Copilot AI balanced review requested due to automatic review settings November 28, 2026 17:09
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added debt Code quality issues agents-mobile Issues related to Agent Host web/mobile client labels Nov 28, 2026

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.

🟢 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents-mobile Issues related to Agent Host web/mobile client debt Code quality issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants