Skip to content

[WIP] Agents web: native scroll#316697

Draft
osortega wants to merge 1 commit into
mainfrom
osortega/mobile-web-chat-native-scroll
Draft

[WIP] Agents web: native scroll#316697
osortega wants to merge 1 commit into
mainfrom
osortega/mobile-web-chat-native-scroll

Conversation

@osortega
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 15, 2026 20:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds mobile web-specific chat behavior to use native browser touch scrolling and selection/copy affordances for chat transcripts, while plumbing native overflow scrolling support through the shared list/tree/scrollable infrastructure.

Changes:

  • Adds mobile chat contribution/bootstrap, CSS, and mobile web detection.
  • Adds chat widget lifecycle removal events and native touch scroll enablement APIs.
  • Extends list/tree/scrollable components with native overflow scroll mode.
Show a summary per file
File Description
src/vs/workbench/test/browser/workbenchTestServices.ts Updates chat widget test service for widget removal events.
src/vs/workbench/contrib/chat/test/browser/widget/mockChatWidget.ts Updates mock chat widget service for widget removal events.
src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.ts Emits widget removal lifecycle events.
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts Adds native touch scroll enablement for chat widgets.
src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts Exposes transcript list container and native overflow toggle.
src/vs/workbench/contrib/chat/browser/mobile/media/chat.mobile.css Adds mobile-scoped chat selection, toolbar, and scroll CSS.
src/vs/workbench/contrib/chat/browser/mobile/isMobileWebPhone.ts Adds mobile web phone detection helper.
src/vs/workbench/contrib/chat/browser/mobile/chatMobileBootstrap.ts Applies mobile overrides to individual chat widgets.
src/vs/workbench/contrib/chat/browser/mobile/chat.mobile.contribution.ts Registers mobile chat behavior and widget lifecycle handling.
src/vs/workbench/contrib/chat/browser/chat.ts Extends chat widget/service interfaces.
src/vs/workbench/contrib/chat/browser/chat.contribution.ts Registers the mobile chat contribution.
src/vs/platform/list/browser/listService.ts Passes native overflow option through workbench tree options.
src/vs/base/browser/ui/tree/abstractTree.ts Exposes native overflow toggle on trees.
src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts Adds native overflow scroll option types.
src/vs/base/browser/ui/scrollbar/scrollableElement.ts Implements native overflow scroll mode in scrollable elements.
src/vs/base/browser/ui/list/listWidget.ts Exposes native overflow support on lists.
src/vs/base/browser/ui/list/listView.ts Implements native overflow layout mode for virtualized lists.
src/vs/base/browser/ui/list/list.css Adds list CSS for native overflow touch behavior.

Copilot's findings

  • Files reviewed: 18/18 changed files
  • Comments generated: 3

Comment on lines +34 to +35
const mm = mainWindow.matchMedia?.('(pointer: coarse) and (hover: none)');
cached = !!mm?.matches;
const dims = this._scrollable.getScrollDimensions();
this._contentNode.style.height = `${dims.scrollHeight}px`;
if (dims.scrollWidth > dims.width) {
this._contentNode.style.width = `${dims.scrollWidth}px`;
Comment on lines +554 to +568
setUseNativeOverflowScroll(enabled: boolean): void {
if (this._useNativeOverflowScroll === enabled) {
return;
}
this._useNativeOverflowScroll = enabled;
this.domNode.classList.toggle('native-overflow-scroll', enabled);
this._applyRowsContainerTransformStyle();
this.scrollableElement.setUseNativeOverflowScroll(enabled);

// Re-render at the current scroll position so row top offsets are recomputed for
// the new (translate vs. absolute) layout, and re-emit scroll dimensions so the
// content node is sized to `scrollHeight` for native mode.
this.eventuallyUpdateScrollDimensions();
const previousRenderRange = this.getRenderRange(this.lastRenderTop, this.lastRenderHeight);
this.render(previousRenderRange, this.lastRenderTop, this.lastRenderHeight, undefined, undefined, true);
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.

2 participants