Skip to content

chat: support queue priority context actions for pending requests (#305683)#319164

Open
Neizan93 wants to merge 3 commits into
microsoft:mainfrom
Neizan93:feature/chat-queue-priority-305683
Open

chat: support queue priority context actions for pending requests (#305683)#319164
Neizan93 wants to merge 3 commits into
microsoft:mainfrom
Neizan93:feature/chat-queue-priority-305683

Conversation

@Neizan93
Copy link
Copy Markdown

@Neizan93 Neizan93 commented May 30, 2026

Fixes #305683

Description

This PR implements context menu options to manage queue priority for pending/queued chat requests in the VS Code Chat interface.

Users can now right-click a queued/pending request and choose:

  • Move to Top (moves the request to the front of the queue)
  • Move Up (shifts the request up by one slot)
  • Move Down (shifts the request down by one slot)
  • Move to Bottom (moves the request to the end of the queue)

Proposed Changes

  • Context Keys: Registered chatRequestIsFirstPending and chatRequestIsLastPending in chatContextKeys.ts.
  • Context Menu Context Overlay: Modified handleContextMenu in chatListWidget.ts to dynamically calculate the request's position in the queue of pending requests, overlaying position keys on the context key service.
  • Actions Registration: Created and registered the four re-ordering action classes (ChatMovePendingRequestUpAction, etc.) in chatQueueActions.ts under the 'queue_priority' menu group for MenuId.ChatContext.
  • Visibility Rules: Applied when clauses so actions only appear on pending request items and respect queue limits (e.g. "Move Up" and "Move to Top" are hidden on the first queued request, and "Move Down" and "Move to Bottom" are hidden on the last one).
  • Unit Tests: Added comprehensive unit tests in chatQueueActions.test.ts verifying correct order manipulation under mock widgets/services. Used ensureNoDisposablesAreLeakedInTestSuite() to guarantee no memory leak introduction.

Copilot AI review requested due to automatic review settings May 30, 2026 20:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds UI affordances and implementation to reprioritize pending chat requests from the chat context menu, and improves notification toast dismissal UX with a fade-out transition.

Changes:

  • Added chat context keys and menu actions to move pending requests up/down/top/bottom in the queue
  • Extended chat list context-menu overlay to expose “first/last pending request” state
  • Implemented fade-out removal for notification toasts (with reduced-motion handling)

Reviewed changes

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

Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts Adds 4 new queue reordering actions and registers them.
src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts Computes first/last pending request and exposes new context keys for menus.
src/vs/workbench/contrib/chat/common/actions/chatContextKeys.ts Introduces new context keys for first/last pending request.
src/vs/workbench/contrib/chat/test/browser/actions/chatQueueActions.test.ts Adds execution tests for the new queue reordering actions.
src/vs/workbench/browser/parts/notifications/notificationsToasts.ts Adds fade-out removal flow and guards against duplicate removals.
src/vs/workbench/browser/parts/notifications/media/notificationsToasts.css Adds CSS for the fade-out transition (and reduce-motion override).

Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts Outdated
Comment thread src/vs/workbench/browser/parts/notifications/notificationsToasts.ts Outdated
Comment thread src/vs/workbench/contrib/chat/test/browser/actions/chatQueueActions.test.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts Outdated
@Neizan93 Neizan93 force-pushed the feature/chat-queue-priority-305683 branch from 9718c8b to e260798 Compare May 30, 2026 20:30
@Neizan93 Neizan93 requested a review from Copilot May 30, 2026 20:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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

Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
@Neizan93 Neizan93 force-pushed the feature/chat-queue-priority-305683 branch from e260798 to 0e3602d Compare May 30, 2026 20:51
@Neizan93 Neizan93 requested a review from Copilot May 30, 2026 20:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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

Comment thread src/vs/workbench/contrib/chat/browser/widget/chatListWidget.ts
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
@Neizan93 Neizan93 force-pushed the feature/chat-queue-priority-305683 branch from 0e3602d to eb136d1 Compare May 30, 2026 21:09
@Neizan93 Neizan93 requested a review from Copilot May 30, 2026 21:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts Outdated
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
Comment thread src/vs/workbench/contrib/chat/browser/actions/chatQueueActions.ts
@Neizan93 Neizan93 changed the title chat: support queue priority context actions for pending requests chat: support queue priority context actions for pending requests (#305683) May 31, 2026
@benibenj benibenj assigned justschen and unassigned benibenj May 31, 2026
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.

Feature Request: Context menu for priority management in GitHub Copilot queued items

5 participants