Skip to content

sticky scroll in chat - #296433

Merged
Justin Chen (justschen) merged 25 commits into
mainfrom
justin/scolipede
Aug 20, 2026
Merged

Justin Chen (justschen) merged 25 commits into
mainfrom
justin/scolipede

Conversation

@justschen

@justschen Justin Chen (justschen) commented Feb 20, 2026 •

Copy link
Copy Markdown
Collaborator

adds sticky scroll for requests in chat.

  • clicking on the request title will scroll to that title
  • click again to edit
  • restore and forking buttons work as normal

Copilot AI review requested due to automatic review settings February 20, 2026 03:14

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.

Pull request overview

This PR implements sticky scroll functionality for the chat interface, allowing request messages to remain visible at the top of the viewport while scrolling through their responses.

Changes:

  • Restructured chat list to use tree hierarchy with requests as parents and responses as children to enable sticky scroll
  • Simplified request rendering from markdown to plain text with decorations for better sticky scroll compatibility
  • Added dynamic height measurement for sticky scroll rows to handle variable chat message heights
  • Implemented click handling to redirect sticky row interactions to real rows for editing functionality

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts Added listShadow style configuration for sticky scroll shadow effect
src/vs/workbench/contrib/chat/browser/widget/media/chat.css Added styles for sticky scroll rows (hide twisties, remove hover background) and line-clamping for request text (4 lines)
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts Added optional listShadow to IChatInputStyles interface
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts Implemented click interception for sticky scroll rows to redirect editing to real rows
src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts Restructured chat items as tree (requests with response children), enabled sticky scroll, changed getListLength to count all items recursively
src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts Switched request rendering from markdown to plain text, prevented sticky templates from updating heights/template maps, disabled editing on sticky rows
src/vs/base/browser/ui/tree/abstractTree.ts Added dynamic height probing for sticky scroll, changed height calculations to use measured heights from view instead of delegate estimates
src/vs/base/browser/ui/list/listWidget.ts Exposed getElementHeight method for height queries

@justschen
Justin Chen (justschen) marked this pull request as ready for review March 13, 2026 05:50
@justschen
Justin Chen (justschen) marked this pull request as draft March 13, 2026 05:50

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.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 2

@justschen

Copy link
Copy Markdown
Collaborator Author

Copilot resolve the merge conflicts in this pull request

# Conflicts:
#	src/vs/workbench/contrib/chat/browser/chat.contribution.ts

Co-authored-by: justschen <[email protected]>

Copilot AI commented May 19, 2026

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

Merged origin/main into the branch in e8316d1. The conflict was in chat.contribution.ts, which has been gutted on main (most configuration moved to chat.shared.contribution.ts). I took main's version of that file and re-registered the chat.experimental.stickyScroll.enabled configuration in chat.shared.contribution.ts alongside the other chat settings.

@justschen

Copy link
Copy Markdown
Collaborator Author

Copilot resolve the merge conflicts in this pull request. Additionally, there have been new settings/experiments around a different sticky scroll widget currently in main - create a new experimental setting that enables this version of sticky scroll in chat vs. what we currently have today via chat.stickyScroll.enabled

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request. Additionally, there have been new settings/experiments around a different sticky scroll widget currently in main - create a n...

Resolved the latest main conflicts and added chat.experimental.stickyScroll.enabled to select the tree-based variant while keeping chat.stickyScroll.enabled as the master control. Addressed in 4aabfe3 with follow-up fixes in 7e83d3e.

# Conflicts:
#	src/vs/workbench/contrib/chat/browser/promptTimeline/promptTimelineWidgetContrib.ts
#	src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts
#	src/vs/workbench/contrib/chat/common/constants.ts
@justschen
Justin Chen (justschen) marked this pull request as ready for review August 20, 2026 01:02
@justschen
Justin Chen (justschen) enabled auto-merge (squash) August 20, 2026 01:02
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/base/browser/ui/list/listWidget.ts
  • src/vs/base/browser/ui/tree/abstractTree.ts
  • src/vs/base/browser/ui/tree/objectTree.ts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants