workbench.action.chat.nextUserPrompt/previousUserPrompt reveal the target prompt at inconsistent viewport positions
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: VS Code Version: 1.128.0
- OS Version: Windows 11
Steps to Reproduce:
1. Open the Chat view with a long conversation (several requests/responses taller than the viewport).
2. Run `workbench.action.chat.nextUserPrompt` (`Ctrl+Alt+Down`) repeatedly.
3. Run `workbench.action.chat.previousUserPrompt` (`Ctrl+Alt+Up`) repeatedly.
## Current Behavior
The two commands land the target prompt at **different viewport edges depending on navigation direction**, because the reveal is minimal-scroll:
- `nextUserPrompt`: target is below the viewport -> revealed aligned to the **bottom**, with its response (the content you typically want to read next) still off-screen.
- `previousUserPrompt`: target is above the viewport -> revealed aligned to the **top**.
So the same "jump to a user prompt" gesture places the focused item in opposite screen positions, and the eye must re-locate it on every jump.
## Expected Behavior
Both commands should reveal the target prompt at a **consistent, predictable viewport position regardless of direction** - e.g., always aligned to the top (so the prompt plus its following response read naturally downward), or any fixed relative position. The specific position matters less than the consistency.
## Pointer
The asymmetry comes from calling `reveal` without a position argument:
https://github.com/microsoft/vscode/blob/479de2c703c90021e41097ba0c69db0470a0a74d/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.ts#L119
`ChatWidget.reveal(item, relativeTop)` already forwards `relativeTop` to `ListView.reveal`, which supports fixed proportional positioning (`0` = top, `1` = bottom). Passing any constant makes both directions land identically.
Contributor guide
Assessment
This issue has not been assessed yet.