Skip to content

feat(diagnostic): clear pull state on close#5453

Merged
fannheyward merged 1 commit intomasterfrom
feat/diagnostic-clear-pull-state
Oct 21, 2025
Merged

feat(diagnostic): clear pull state on close#5453
fannheyward merged 1 commit intomasterfrom
feat/diagnostic-clear-pull-state

Conversation

@fannheyward
Copy link
Member

@fannheyward fannheyward requested a review from Copilot October 21, 2025 01:42
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 workspace pull state cleanup when documents are closed to prevent stale diagnostic information from persisting. The change ensures that when a document is closed, both document and workspace diagnostic pull states are cleared, preventing scenarios where old workspace diagnostic resultIds could reference diagnostics that no longer exist.

Key Changes:

  • Added workspace pull state cleanup on document close in the diagnostic feature
  • Increased test timeouts for several flaky completion tests from default to 10000ms

Reviewed Changes

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

File Description
src/language-client/diagnostic.ts Added forget() call to clear workspace pull state when documents close, preventing stale diagnostic references
src/tests/completion/basic.test.ts Increased timeout values for four completion tests to address test reliability

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.96%. Comparing base (54079c0) to head (90354d1).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/language-client/diagnostic.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5453      +/-   ##
==========================================
- Coverage   97.98%   97.96%   -0.02%     
==========================================
  Files         280      280              
  Lines       27866    27867       +1     
  Branches     5770     5770              
==========================================
- Hits        27304    27301       -3     
- Misses        105      106       +1     
- Partials      457      460       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fannheyward fannheyward merged commit 0b91e7a into master Oct 21, 2025
3 of 4 checks passed
@fannheyward fannheyward deleted the feat/diagnostic-clear-pull-state branch October 21, 2025 02:04
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.

2 participants