Skip to content

Serialize LSP stop, clean up Git listeners, and miscellaneous robustness fixes#241

Merged
AhmmedSamier merged 1 commit intomasterfrom
codex/review-vscode-extension-code-for-issues
Mar 1, 2026
Merged

Serialize LSP stop, clean up Git listeners, and miscellaneous robustness fixes#241
AhmmedSamier merged 1 commit intomasterfrom
codex/review-vscode-extension-code-for-issues

Conversation

@AhmmedSamier
Copy link
Owner

Motivation

  • Prevent race conditions and resource leaks when starting/stopping the language server client.
  • Ensure repository state listeners are tracked and disposed to avoid memory leaks and noisy logs.
  • Improve robustness of symbol handling and search-related code and add a latency benchmark for searches.

Description

  • Serialize DeepLensLspClient.stop() with a new stopPromise and ensure it waits for any pending start to complete, disposes tracked disposables, and cleans up event emitters exactly once.
  • Refactor stop logic with stopClientInstance() and adjust waitForStartCompletion() null checks to avoid start/stop races.
  • Track and dispose repository state listeners in GitService, improve HEAD-change logging to show the previous HEAD, and fix debounce logging to reference the previous head correctly.
  • Add a helper isSymbolInformationArray() and use it in reference-code-lens.ts, simplify the label typing in search-provider.ts, remove a redundant disposal registration in extension.ts, and extend the benchmark tests with a Search Request Latency case.

Testing

  • Executed the extension benchmark test suite (extension.bench.test.ts) including the new Search Request Latency benchmark as an automated test; the tests completed successfully.

Codex Task

@AhmmedSamier AhmmedSamier merged commit 3bfa0dd into master Mar 1, 2026
1 check passed
@AhmmedSamier AhmmedSamier deleted the codex/review-vscode-extension-code-for-issues branch March 1, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant