Skip to content

Add prompt markers to chat transcript scrollbar#326137

Open
matthewcorven wants to merge 3 commits into
microsoft:mainfrom
matthewcorven:agents/chat-scrollbar-markers-impl
Open

Add prompt markers to chat transcript scrollbar#326137
matthewcorven wants to merge 3 commits into
microsoft:mainfrom
matthewcorven:agents/chat-scrollbar-markers-impl

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 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 introduces an experimental “prompt markers” overlay for the Chat View transcript scrollbar to make long conversations easier to scan and navigate. The work adds the marker controller/UI styling, integrates enablement via configuration, and updates prompt-navigation helpers plus targeted tests/fixtures.

Changes:

  • Add a scrollbar overlay controller that renders per-prompt markers (with hover preview + click-to-reveal/focus behavior) and integrates it into ChatListWidget/ChatWidget.
  • Introduce experimental settings for enablement, marker downsampling cap, and click behavior; update accessibility help text accordingly.
  • Add targeted unit tests and component fixtures for the new marker behavior and visuals.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/vs/workbench/test/browser/componentFixtures/chat/chatWidget.fixture.ts Adds chat widget fixtures to showcase prompt markers and capped marker behavior.
src/vs/workbench/test/browser/componentFixtures/chat/chatScrollbarPromptMarkers.fixture.ts New screenshot fixtures for the marker overlay (LTR/RTL + hovered states).
src/vs/workbench/contrib/chat/test/browser/widget/chatScrollbarPromptMarkerController.test.ts Comprehensive unit coverage for marker controller layout/interaction/lifecycle.
src/vs/workbench/contrib/chat/test/browser/actions/chatPromptNavigationActions.test.ts Tests for prompt-marker descriptor generation, dedupe, downsampling, and click behavior helper.
src/vs/workbench/contrib/chat/common/model/chatViewModel.ts Adds editedFileEvents to IChatRequestViewModel and ChatRequestViewModel.
src/vs/workbench/contrib/chat/common/constants.ts Adds configuration keys and click-behavior enum/constants for prompt markers.
src/vs/workbench/contrib/chat/browser/widget/media/chat.css Adds styling for marker overlay + hover preview, including HC variants.
src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts Wires enablement via configuration changes and passes initial enablement into the list widget.
src/vs/workbench/contrib/chat/browser/widget/chatScrollbarPromptMarkerController.ts New controller implementing the marker overlay (layout, hover preview, pointer/click handling).
src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts Hosts the controller, refreshes on relevant list events, and exposes host methods used by the controller.
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts Registers the three experimental settings in the configuration registry.
src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.ts Refactors prompt navigation helpers and adds marker descriptor generation/downsampling utilities.
src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts Documents the marker feature in chat accessibility help (mouse-only markers guidance).
build/lib/stylelint/vscode-known-variables.json Adds the CSS custom properties used by the new marker styling to the allowlist.

Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts
Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts
@matthewcorven matthewcorven force-pushed the agents/chat-scrollbar-markers-impl branch from 14b670e to be8eae9 Compare July 16, 2026 11:15
@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

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

2 participants