Skip to content

Add best practices instructions file - #321160

Merged
Benjamin Christopher Simmonds (benibenj) merged 2 commits into
mainfrom
agents/next-to-the-coding-guidelines-file-in-the-39ccf7d1
Jun 12, 2026
Merged

Benjamin Christopher Simmonds (benibenj) merged 2 commits into
mainfrom
agents/next-to-the-coding-guidelines-file-in-the-39ccf7d1

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

Adds a new best practices instructions file next to the coding guidelines file in .github/instructions. It documents conventions for reusing common UI primitives and patterns:

  • Buttons & Actions: reuse Button and Action types, render via toolbars (MenuWorkbenchToolBar / WorkbenchToolBar), use Separator.
  • Editor/Session Actions: don't assume the active editor/session, resolve context via resolveCommandsContext, support multi-selection.
  • URI: use Schemas constants and resources.ts comparison utilities instead of hardcoded scheme strings or string comparison.

Co-authored-by: Copilot [email protected]

Copilot AI review requested due to automatic review settings June 12, 2026 14:39

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

Adds a new GitHub instructions document under .github/instructions (scoped to src/vs/**) that captures best-practice guidance for reusing existing VS Code UI primitives/patterns, resolving editor/session action context correctly, and comparing/handling URIs using shared utilities.

Changes:

  • Add guidance to reuse shared Button/Action primitives and render actions via the standard toolbar components.
  • Document how editor/session-related actions should resolve invocation context (including multi-selection) via resolveCommandsContext.
  • Document URI best practices (use Schemas and resources.ts comparison helpers instead of hardcoded schemes / string comparisons).
Show a summary per file
File Description
.github/instructions/best-practices.instructions.md New best-practices instructions covering UI actions/toolbars, editor/session action context, and URI scheme/comparison conventions.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@benibenj
Benjamin Christopher Simmonds (benibenj) merged commit ab7eee2 into main Jun 12, 2026
25 checks passed
@benibenj
Benjamin Christopher Simmonds (benibenj) deleted the agents/next-to-the-coding-guidelines-file-in-the-39ccf7d1 branch June 12, 2026 15:34
@vs-code-engineering vs-code-engineering Bot added this to the 1.125.0 milestone Jun 12, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Jul 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants