Skip to content

Add prompt markers to chat transcript scrollbar#326088

Closed
matthewcorven wants to merge 1 commit into
microsoft:mainfrom
matthewcorven:agents/chat-scrollbar-markers-clean
Closed

Add prompt markers to chat transcript scrollbar#326088
matthewcorven wants to merge 1 commit into
microsoft:mainfrom
matthewcorven:agents/chat-scrollbar-markers-clean

Conversation

@matthewcorven

@matthewcorven matthewcorven commented Jul 16, 2026

Copy link
Copy Markdown

Closes #326087

This PR adds experimental user prompt markers to the Chat View transcript scrollbar to make long chat sessions easier to scan and navigate.

image

What changed

  • add a scrollbar overlay that renders markers for user-authored prompts in Chat View
  • keep the marker set focused by excluding system-initiated turns and deduplicating retries to the latest prompt attempt
  • downsample dense marker sets to a configurable cap
  • support configurable click behavior: reveal only, or reveal and focus
  • add hover previews showing prompt text and timestamp
  • wire the same prompt-only model into prompt navigation behavior and related accessibility guidance

Settings

This PR introduces three experimental chat settings:

  • chat.scrollbarPromptMarkers.enabled
    • default: false
    • controls whether prompt markers are shown in the Chat View transcript scrollbar
  • chat.scrollbarPromptMarkers.maximumMarkers
    • default: 30
    • minimum: 2
    • controls the configured cap used when downsampling prompt markers
  • chat.scrollbarPromptMarkers.clickBehavior
    • default: revealAndFocus
    • values: revealAndFocus, reveal
    • controls whether clicking a marker only reveals the prompt or also moves keyboard focus to it

How to test

  • enable chat.scrollbarPromptMarkers.enabled
  • open a long Chat View conversation with multiple user prompts
  • verify prompt markers appear in the transcript scrollbar
  • verify hovering a marker shows the prompt text and timestamp
  • verify clicking a marker reveals the corresponding prompt
  • verify chat.scrollbarPromptMarkers.clickBehavior changes click behavior as expected
  • verify dense transcripts are downsampled according to chat.scrollbarPromptMarkers.maximumMarkers
  • verify the feature does not appear in inline chat or quick chat

Validation

  • npm run transpile-client
  • focused prompt-marker unit tests
    • src/vs/workbench/contrib/chat/test/browser/actions/chatPromptNavigationActions.test.ts
    • src/vs/workbench/contrib/chat/test/browser/widget/chatScrollbarPromptMarkerController.test.ts

Notes

  • the public setting key remains chat.scrollbarPromptMarkers.maximumMarkers
  • internal naming was clarified so the configured max-count setting and its minimum allowed value are easier to distinguish in code

Copilot AI review requested due to automatic review settings July 16, 2026 01:44
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

@benibenj

Matched files:

  • src/vs/base/browser/ui/list/listView.ts
  • src/vs/base/browser/ui/list/listWidget.ts
  • src/vs/base/browser/ui/tree/abstractTree.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.

Pull request overview

This PR aims to add an experimental prompt-only marker rail to the Chat View transcript scrollbar (fixes #326087), letting users scan/navigate long sessions by their own prompts. It introduces a new ChatScrollbarPromptMarkerController, three experimental settings (chat.scrollbarPromptMarkers.enabled / .maximumMarkers / .clickBehavior), prompt-marker descriptor/downsampling logic shared with prompt navigation, plus component fixtures and unit tests.

Unfortunately, the branch appears to be built on a stale base: alongside the feature, the diff reverts a substantial amount of unrelated, recently-merged chat work. Several of these removals delete view-model members and widget methods that unchanged files still reference, so the branch will not compile as-is.

Changes:

  • Adds the prompt-marker controller, settings, descriptor/downsampling logic, fixtures, and tests for the new feature.
  • Reverts unrelated recent work (e.g. isTerminalCommand, getElementTop, UserToggleResize scroll-anchoring, getSelectedModelRequestOptions, turn-status-pills fixtures, chatEditingSession/checkpoint-timeline changes, and a large block of CSS), which breaks compilation of unchanged consumers.
  • A new fixture host omits a required getVisiblePromptRowId override, causing a runtime crash when rendered.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
chat/browser/widget/chatScrollbarPromptMarkerController.ts New controller rendering the prompt-marker rail (core feature).
chat/browser/actions/chatPromptNavigationActions.ts Adds prompt-marker descriptor, downsampling, and click-behavior logic.
chat/common/constants.ts Adds the three experimental settings + click-behavior enum.
chat/common/model/chatViewModel.ts Removes isTerminalCommand/requestTimestamp — breaks unchanged consumers.
chat/browser/widget/chatListWidget.ts Wires the controller but also removes getElementTop, UserToggleResize, and getSelectedModelRequestOptions still used elsewhere.
chat/browser/widget/media/chat.css Adds marker styles; also deletes unrelated recent CSS.
test/browser/componentFixtures/chat/chatScrollbarPromptMarkers.fixture.ts New fixture; host missing getVisiblePromptRowId override → runtime crash.
test/browser/componentFixtures/chat/chatWidget.fixture.ts Adds marker fixture cases; reverts turn-status-pills fixture support.
chat/test/browser/.../chatPromptNavigationActions.test.ts, .../chatScrollbarPromptMarkerController.test.ts Unit tests for the new descriptor/controller logic.

Comment thread src/vs/workbench/contrib/chat/common/model/chatViewModel.ts
Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts
Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts
Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/widget/media/chat.css Outdated
@justschen justschen assigned osortega and unassigned justschen Jul 16, 2026
@matthewcorven matthewcorven force-pushed the agents/chat-scrollbar-markers-clean branch from ea3de40 to 26acf0b Compare July 16, 2026 03:17
@matthewcorven matthewcorven force-pushed the agents/chat-scrollbar-markers-clean branch from 26acf0b to e87eda8 Compare July 16, 2026 10:15
@matthewcorven matthewcorven deleted the agents/chat-scrollbar-markers-clean branch July 16, 2026 10:55
@matthewcorven

Copy link
Copy Markdown
Author

Superseded by #326137.

I moved the live fork branch to agents/chat-scrollbar-markers-impl and reopened the work as a new PR because GitHub closed this PR during the branch-name transition. I replied inline on the resolved review threads here with the specific fix status; ongoing review should continue on #326137.

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.

Copilot Chat: Add Prompt Markers to the Chat Scrollbar for Faster Navigation

4 participants