Skip to content

Hide Pin/Unpin actions on archived sessions#302752

Merged
bpasero merged 1 commit intomainfrom
copilot/round-heron
Mar 18, 2026
Merged

Hide Pin/Unpin actions on archived sessions#302752
bpasero merged 1 commit intomainfrom
copilot/round-heron

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Mar 18, 2026

Adds ChatContextKeys.isArchivedAgentSession.negate() to the when clauses of UnpinAgentSessionAction, hiding the Unpin button on archived sessions in both the item toolbar and context menu.

The Pin action already had this guard; this makes Unpin consistent.

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

Copilot AI review requested due to automatic review settings March 18, 2026 10:28
@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 18, 2026
Copy link
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

This PR aligns the Unpin action’s visibility rules with the existing Pin action behavior by hiding Unpin on archived agent sessions, preventing pin/unpin controls from appearing on archived items in the sessions UI.

Changes:

  • Added ChatContextKeys.isArchivedAgentSession.negate() to the when clauses for UnpinAgentSessionAction.
  • Applied the guard consistently to both the item toolbar and the context menu entries.

@bpasero bpasero merged commit 29b2353 into main Mar 18, 2026
24 checks passed
@bpasero bpasero deleted the copilot/round-heron branch March 18, 2026 10:59
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.

3 participants