Skip to content

Comments

fix(diagnostics): use useDocumentText to reliably trigger diagnostics on content changes#44

Merged
9romise merged 1 commit intomainfrom
fix/regression
Feb 16, 2026
Merged

fix(diagnostics): use useDocumentText to reliably trigger diagnostics on content changes#44
9romise merged 1 commit intomainfrom
fix/regression

Conversation

@9romise
Copy link
Member

@9romise 9romise commented Feb 16, 2026

#43 introduced a regression by replacing useDocumentText with activeDocument + activeDocumentVersion computed refs as the watch source, which caused diagnostics to not refresh when editing a file without switching tabs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The change modifies the diagnostic collection mechanism in src/providers/diagnostics/index.ts by replacing computed properties for tracking the active document (activeDocument and activeDocumentVersion) with a useDocumentText hook imported from reactive-vscode. The trigger for collecting diagnostics now watches activeDocumentText and enabledRules as dependencies instead of the previous computed values. This adjustment removes the reliance on document.version for detecting document changes. The modification spans 3 additions and 4 deletions with no changes to public exports.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly explains the regression introduced in PR #43 and how this change fixes it by restoring useDocumentText.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/regression

Comment @coderabbitai help to get the list of available commands and usage tips.

@9romise 9romise merged commit e8220cf into main Feb 16, 2026
9 checks passed
@9romise 9romise deleted the fix/regression branch February 16, 2026 08:03
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.

1 participant