Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Nov 22, 2025

This PR refactors the VSCode extension's linter functionality by introducing a ToolInterface abstraction. The refactoring moves from function-based exports to a class-based architecture, preparing the codebase for supporting multiple tools (e.g., linter and formatter) with a consistent interface.

Copy link
Member Author

Sysix commented Nov 22, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sysix Sysix changed the base branch from 11-22-feat_vscode_add_quick_actions_to_status_bar_tooltip to graphite-base/15974 November 22, 2025 21:05
@Sysix Sysix force-pushed the graphite-base/15974 branch from 559d637 to 4fd88d7 Compare November 22, 2025 21:06
@Sysix Sysix force-pushed the 11-22-refactor_vscode_introduce_toolinterface_ branch from d006a1c to c4aa9fc Compare November 22, 2025 21:06
@Sysix Sysix changed the base branch from graphite-base/15974 to 11-22-feat_vscode_add_quick_actions_to_status_bar_tooltip November 22, 2025 21:06
@graphite-app graphite-app bot changed the base branch from 11-22-feat_vscode_add_quick_actions_to_status_bar_tooltip to graphite-base/15974 November 22, 2025 21:41
@graphite-app graphite-app bot force-pushed the graphite-base/15974 branch from 4fd88d7 to 3a1d4a9 Compare November 22, 2025 21:46
@graphite-app graphite-app bot force-pushed the 11-22-refactor_vscode_introduce_toolinterface_ branch from c4aa9fc to eff297e Compare November 22, 2025 21:46
@graphite-app graphite-app bot changed the base branch from graphite-base/15974 to main November 22, 2025 21:46
@graphite-app graphite-app bot force-pushed the 11-22-refactor_vscode_introduce_toolinterface_ branch 2 times, most recently from 193ae0b to 3455e6c Compare November 22, 2025 21:55
@Sysix Sysix requested a review from Copilot November 23, 2025 15:08
Copilot finished reviewing on behalf of Sysix November 23, 2025 15:11
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 refactors the VSCode extension's linter functionality by introducing a ToolInterface abstraction. The refactoring moves from function-based exports to a class-based architecture, preparing the codebase for supporting multiple tools (e.g., linter and formatter) with a consistent interface.

Key Changes:

  • Introduced ToolInterface as a generic interface for extension tools
  • Refactored procedural linter code into a LinterTool class implementing ToolInterface
  • Moved helper functions to a dedicated tools/ directory structure
  • Updated imports across the codebase to reflect the new file structure

Reviewed changes

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

Show a summary per file
File Description
editors/vscode/client/tools/ToolInterface.ts New interface defining the contract for extension tools (activate, deactivate, toggleClient, restartClient, onConfigChange)
editors/vscode/client/tools/linter.ts Refactored linter functionality from procedural functions to a LinterTool class implementing ToolInterface
editors/vscode/client/tools/lsp_helper.ts Moved LSP helper functions (runExecutable, onClientNotification) to the tools directory
editors/vscode/client/linter.ts Removed (functionality moved to tools/linter.ts)
editors/vscode/client/extension.ts Updated to instantiate and use the new LinterTool class instead of importing individual functions
editors/vscode/tests/lsp_helper.spec.ts Updated import path to reference the new location of lsp_helper

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Sysix Sysix force-pushed the 11-22-refactor_vscode_introduce_toolinterface_ branch from 3455e6c to 6792d16 Compare November 23, 2025 16:20
@Sysix Sysix marked this pull request as ready for review November 23, 2025 16:31
@Sysix Sysix requested a review from camc314 as a code owner November 23, 2025 16:31
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 24, 2025
Copy link
Contributor

camc314 commented Nov 24, 2025

Merge activity

> This PR refactors the VSCode extension's linter functionality by introducing a ToolInterface abstraction. The refactoring moves from function-based exports to a class-based architecture, preparing the codebase for supporting multiple tools (e.g., linter and formatter) with a consistent interface.
@graphite-app graphite-app bot force-pushed the 11-22-refactor_vscode_introduce_toolinterface_ branch from 6792d16 to e8aa84a Compare November 24, 2025 12:23
@graphite-app graphite-app bot merged commit e8aa84a into main Nov 24, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 11-22-refactor_vscode_introduce_toolinterface_ branch November 24, 2025 12:27
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants