Chat: align scroll-to-latest with the session activity bar by mrleemurray · Pull Request #343220 · microsoft/vscode · GitHub
Skip to content

Chat: align scroll-to-latest with the session activity bar - #343220

Open
Lee Murray (mrleemurray) wants to merge 3 commits into
mainfrom
mrleemurray/agents/update-scroll-to-bottom-control
Open

Lee Murray (mrleemurray) wants to merge 3 commits into
mainfrom
mrleemurray/agents/update-scroll-to-bottom-control

Conversation

@mrleemurray

@mrleemurray Lee Murray (mrleemurray) commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replace the circular chat scroll-to-bottom control with an icon-only rounded-square arrow using the session activity bar's background, border, icon color, corners, and shadow.
  • In the Agents window, align the control in the right gutter, clear of conversation text. Preserve scroll-lock behavior, visibility, and mouse/Enter/Space activation.
  • Avoid the draggable activity bar: prefer the space above it, falling back below or beside it when the transcript is too short.

Issues addressed

Severity Issue Resolution
Medium The prompt timeline could intercept clicks on the gutter arrow. Keep the arrow above the ruler's hit surface; add a pointer hit-testing regression.
Medium Moving the arrow above the activity bar could clip it out of a short transcript. Bound placement to the transcript and add below/beside fallbacks, with resize and hit-testing coverage.

Validation

All commands below passed against the final source changes. Existing successful results were reused where their inputs were unchanged.

Command Result
npm run build-fast -- --client-only Passed; client output current.
./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/widget/chatListWidget.test.ts --run src/vs/sessions/test/browser/chatGroupsView.test.ts --run src/vs/sessions/contrib/chat/test/browser/chatView.test.ts --run src/vs/sessions/test/browser/sessionActivityBar.test.ts --run src/vs/sessions/test/browser/sessionView.test.ts --reporter dot 393 passing.
npm run typecheck-client Passed.
npm run eslint -- src/vs/sessions/browser/parts/chatGroupView.ts src/vs/sessions/browser/parts/chatView.ts src/vs/sessions/browser/parts/sessionActivityBar.ts src/vs/sessions/browser/parts/sessionView.ts src/vs/sessions/contrib/chat/browser/chatView.ts src/vs/sessions/contrib/chat/test/browser/chatView.test.ts src/vs/sessions/contrib/chat/test/browser/sessionActivityBar.fixture.ts src/vs/sessions/test/browser/chatGroupsView.test.ts src/vs/sessions/test/browser/sessionActivityBar.test.ts src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts src/vs/workbench/contrib/chat/test/browser/widget/chatListWidget.test.ts src/vs/workbench/test/browser/componentFixtures/chat/chatWidget.fixture.ts Passed; 13 TypeScript files.
npm run stylelint -- src/vs/sessions/browser/parts/media/chatGroupsView.css src/vs/sessions/contrib/chat/browser/media/chatView.css src/vs/workbench/contrib/chat/browser/widget/media/chat.css Passed; 3 CSS files.
npm run valid-layers-check Passed.
git diff --check Passed.
git commit (pre-commit hygiene hook) Passed; 16 files checked.
gh pr checks 343220 --repo microsoft/vscode Passed; 49 successful checks, 9 skipped, no failed or pending checks.

Manual checks

  • Verified light, dark, and both high-contrast themes in Component Explorer.
  • Verified the arrow remains above the dragged activity bar and aligned with its action targets.
  • To exercise: open an overflowing chat and scroll upward; activate the arrow by mouse, Enter, or Space. In the Agents window, enable the ruler prompt timeline, move the activity bar down, and shrink the transcript or expand the composer. The arrow should remain visible and clickable.
  • Full integration/smoke suites were not run.

Visual evidence

Manual attachment pending: the author requested one combined image to upload manually: scroll-control-before-after.png. No hosted image is attached yet.

The image contains comparable before/after captures in dark and light themes: the same WorkspaceChat fixture, 640 x 500 surface, seed conversation, and scroll position (100). Component Explorer rendered both fixtures successfully on the detached merge base 2deba53c562 and this branch. The temporary baseline worktree was removed after capture.

Review status

  • Unresolved actionable findings: None.
  • Residual risks: None identified in the reviewed code. CI is green; manual screenshot attachment is pending. No linked issue was supplied.

Match the floating control to the activity bar and align it in the chat gutter. Keep it clickable above the prompt timeline and avoid clipping or overlap as the activity bar moves or the transcript shrinks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 13:33
@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/sessions/browser/parts/chatGroupView.ts
  • src/vs/sessions/browser/parts/chatView.ts
  • src/vs/sessions/browser/parts/media/chatGroupsView.css
  • src/vs/sessions/browser/parts/sessionActivityBar.ts
  • src/vs/sessions/browser/parts/sessionView.ts

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

6 open issues
What changed in this PR

Updates the chat “scroll-to-latest” control to visually align with the session activity bar and ensures it remains visible/clickable around overlapping UI (activity bar + prompt timeline), with added regression tests.

Changes:

  • Restyles the scroll-to-latest button (rounded-square, new colors/shadow, hover behavior) and updates labeling/icon usage.
  • Exposes the scroll-down button DOM node through widget/view layers so the session activity bar can reposition it when overlapping.
  • Adds browser tests covering activation (click/keyboard), overlap avoidance, resize fallbacks, and hit-testing.
File Description
src/​vs/​workbench/​test/​browser/​componentFixtures/​chat/​chatWidget.fixture.ts Expands fixture theme coverage for the scroll-to-latest control.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​chatListWidget.test.ts Adds activation + styling assertions for the scroll-to-latest button.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​media/​chat.css Restyles the scroll-to-latest button dimensions, radius, and hover visuals.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatWidget.ts Exposes scroll-down button DOM node from ChatWidget.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​chatListWidget.ts Updates button label/icon/theme styles and exposes the underlying DOM node.
src/​vs/​sessions/​test/​browser/​sessionActivityBar.test.ts Adds tests for overlap avoidance, fallback placement, and pointer hit-testing.
src/​vs/​sessions/​test/​browser/​chatGroupsView.test.ts Updates test expectations around transcript alignment (removes scroll-down positioning assertion).
src/​vs/​sessions/​contrib/​chat/​test/​browser/​sessionActivityBar.fixture.ts Wires the list widget’s scroll-down node into the activity bar fixture.
src/​vs/​sessions/​contrib/​chat/​test/​browser/​chatView.test.ts Adds hit-testing test vs prompt timeline rail + alignment tests vs activity bar gutter.
src/​vs/​sessions/​contrib/​chat/​browser/​media/​chatView.css Aligns scroll-down button inset to activity bar and raises z-index above the timeline rail.
src/​vs/​sessions/​contrib/​chat/​browser/​chatView.ts Exposes scroll-down button DOM node from ChatView.
src/​vs/​sessions/​browser/​parts/​sessionView.ts Passes the visible view’s scroll-down button to the standalone activity bar during layout.
src/​vs/​sessions/​browser/​parts/​sessionActivityBar.ts Adds observers + translate-based repositioning to avoid overlap with the activity bar.
src/​vs/​sessions/​browser/​parts/​media/​chatGroupsView.css Removes older split-chat scroll-down positioning rule (now handled elsewhere).
src/​vs/​sessions/​browser/​parts/​chatView.ts Adds a default scrollDownButtonDomNode getter to the abstract view.
src/​vs/​sessions/​browser/​parts/​chatGroupView.ts Passes current view’s scroll-down button to the session activity bar during layout.

Review effort: Lite

Comment thread src/vs/sessions/browser/parts/sessionActivityBar.ts
Comment thread src/vs/sessions/browser/parts/sessionActivityBar.ts Outdated
Comment thread src/vs/sessions/browser/parts/sessionActivityBar.ts Outdated
Comment thread src/vs/sessions/test/browser/sessionActivityBar.test.ts
Comment thread src/vs/sessions/test/browser/sessionActivityBar.test.ts Outdated
Skip geometry reads for hidden or detached controls and batch observer notifications with the shared animation-frame scheduler. Name the collision gap and stabilize gap and computed-style coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mrleemurray
Lee Murray (mrleemurray) requested a balanced review from Copilot October 21, 2026 14:05
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 12cd3379 Current: b98437ba

Changed (33)

sessions/chat/view/chatView/StickyBackgroundContinuity/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/Narrow/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/WorkspaceChat/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/NearlyWide/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/Wide/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/NarrowActivityBarDisabled/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/WideActivityBarDisabled/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/SplitGroup/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/RulerTimeline/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/RulerTimelineWide/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/ExternalSessionBanner/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/ExternalSessionBannerWide/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/ChatWithoutWorkspace/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/WithoutLayoutActions/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/Moved/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/AtBottom/Light
Before After
before after
sessions/sessionActivityBar/sessionActivityBar/SubmenuOpen/Light
Before After
before after
sessions/chatCompositeBar/StickyMessageFrame/Light
Before After
before after
sessions/chatCompositeBar/StickyMessageFrameNarrow/Light
Before After
before after
sessions/sessionChatInputToolbar/SessionChatView_ArtifactPillAndPermission/Light
Before After
before after
chat/generatedImages/chatGeneratedImages/LoadingLifecycle/Light
Before After
before after
chat/chatRendering/CompletedSummaryNarrow/Light
Before After
before after
chat/chatRendering/NativeShellOutputExpanded/Light
Before After
before after
chat/chatRendering/NativeShellOutputExpandedNarrow/Light
Before After
before after
chat/chatRendering/CappedToolGroupsExpanded/Light
Before After
before after
chat/scrollAnchoring/chatScrollAnchoring/StreamingVisibleHeader/Light
Before After
before after
chat/scrollAnchoring/chatScrollAnchoring/StreamingOffscreenHeader/Light
Before After
before after
chat/scrollAnchoring/chatScrollAnchoring/CompletedVisibleHeader/Light
Before After
before after
chat/scrollAnchoring/chatScrollAnchoring/CompletedOffscreenHeader/Light
Before After
before after
chat/widget/chatWidget/ToolIconExamples/Standalone/Light
Before After
before after
chat/widget/chatWidget/ScrollToBottomAction/Light
Before After
before after
chat/widget/chatWidget/CodeBlockInList/Light
Before After
before after
chat/widget/chatWidget/MultiTurn/Light
Before After
before after

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

6 open issues
6 resolved since last review

Review effort: Lite

Comment thread src/vs/sessions/browser/parts/sessionActivityBar.ts Outdated
Comment thread src/vs/sessions/browser/parts/sessionActivityBar.ts Outdated
Comment thread src/vs/sessions/browser/parts/sessionActivityBar.ts
Comment thread src/vs/sessions/browser/parts/sessionActivityBar.ts
Comment thread src/vs/workbench/contrib/chat/test/browser/widget/chatListWidget.test.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts Outdated
Use the per-button animation-frame scheduler for attachment, layout and drag collision updates. Verify coalescing across every update source, synthesize keyboard events without relying on legacy constructor fields, and align the icon constant name with scroll-to-latest semantics.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants