Skip to content

feat(vscode): support diagnostic pull mode#17211

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-21-feat_vscode_support_diagnostic_pull_mode
Dec 23, 2025
Merged

feat(vscode): support diagnostic pull mode#17211
graphite-app[bot] merged 1 commit intomainfrom
12-21-feat_vscode_support_diagnostic_pull_mode

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Dec 21, 2025

The editor implementation for textDocument/diagnostic.
The client auto enables this request when the server responded with the DocumentDiagnosticProvider in initialize request.
This change only aligns the new pull mode with the extension configuration.

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-enhancement Category - New feature or request labels Dec 21, 2025
Copy link
Member Author

Sysix commented Dec 21, 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.

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 adds support for diagnostic pull mode to the VSCode extension, migrating from a custom string-based trigger type to the standardized DiagnosticPullMode enum from vscode-languageclient. This enables proper control over when diagnostics are requested (onChange, onSave, onTabs) through the language server protocol's diagnostic pull model.

Key Changes

  • Replaced custom Trigger type with DiagnosticPullMode enum from vscode-languageclient
  • Added diagnosticPullOptions configuration to the language client with filtering logic
  • Introduced shouldRequestDiagnostics methods to determine when to request diagnostics based on workspace configuration

Reviewed changes

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

File Description
editors/vscode/tests/WorkspaceConfig.spec.ts Updated test cases to use DiagnosticPullMode.onSave enum instead of string literal
editors/vscode/client/tools/linter.ts Added diagnosticPullOptions configuration with onChange/onSave flags and filtering logic
editors/vscode/client/WorkspaceConfig.ts Replaced Trigger type with DiagnosticPullMode, updated property types and added shouldRequestDiagnostics method
editors/vscode/client/ConfigService.ts Added shouldRequestDiagnostics method to check if diagnostics should be requested for a given document URI and mode

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

@Sysix Sysix force-pushed the 12-21-feat_oxlint_lsp_support_textdocument_diagnostic_ branch from 0d09adf to fc9d078 Compare December 21, 2025 17:39
@Sysix Sysix force-pushed the 12-21-feat_vscode_support_diagnostic_pull_mode branch from cf709f0 to 33189e4 Compare December 21, 2025 17:39
@Sysix Sysix marked this pull request as ready for review December 21, 2025 17:40
@Sysix Sysix requested a review from camc314 as a code owner December 21, 2025 17:40
@camc314 camc314 self-assigned this Dec 23, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 23, 2025
Copy link
Contributor

camc314 commented Dec 23, 2025

Merge activity

The editor implementation for `textDocument/diagnostic`.
The client auto enables this request when the server responded with the `DocumentDiagnosticProvider` in `initialize` request.
This change only aligns the new pull mode with the extension configuration.
@graphite-app graphite-app bot force-pushed the 12-21-feat_oxlint_lsp_support_textdocument_diagnostic_ branch from fc9d078 to 220e8e8 Compare December 23, 2025 17:52
@graphite-app graphite-app bot force-pushed the 12-21-feat_vscode_support_diagnostic_pull_mode branch from 33189e4 to d9aa426 Compare December 23, 2025 17:53
Base automatically changed from 12-21-feat_oxlint_lsp_support_textdocument_diagnostic_ to main December 23, 2025 17:57
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 23, 2025
@graphite-app graphite-app bot merged commit d9aa426 into main Dec 23, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 12-21-feat_vscode_support_diagnostic_pull_mode branch December 23, 2025 17:58
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-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants