Repository navigation
feat: run cs-ide as a persistent JSON-RPC server - #325
Conversation
Keep one native server process for reviews, telemetry, and workspace watches instead of launching cs-ide.exe per command.
Route cs-ide stderr into the CodeScene output pane, and drop previous-solution reviews when the solution changes.
|
Important Review skippedToo many files! This PR contains 297 files, which is 197 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
skip-pr-size-check
Preserve cross-drive review behavior and cover persistent server notification, queue, cache, and workspace edge cases.
Use the legacy workspace and containing-directory fallbacks so persistent CLI reviews work across Windows drives.
Match the VS Code client for diagnostic logging, discarded-edit restore, watch-inventory gating, and automatic analysis controls. Keep ACE diff files on the open document's line endings so Visual Studio does not warn about mixed endings.
Build the sibling ../cs-webview checkout on demand instead of always downloading the GitHub release.
Opening a folder never reached watchFiles, and a busy review queue only painted once because progress updates waited until the queue went idle.
The tool window was created during package initialization, and solution load waited on the watch lock while that lock waited for the UI thread.
Show a one-time startup notice and stop telemetry calls when the setting is off, without waiting for the user to dismiss it.
Cover every project directory, stop the previous watch before starting the next one, and drop editor reviews while the solution or folder is closing. Pin the cs-ide version to the merged IDE-1.0.70 commit.
The Windows build for 6f48030998bf5566ec7ae4e430d2cf9b43d06744 is available, so the extension can verify that executable.
The CLI reports remaining and finished reviews on cs-ide/reviewProgress, so the monitor no longer infers the batch total from a queue on each review result.
# Conflicts: # Codescene.VSExtension.VS2022/Codescene.VSExtension.Core.Tests/CliSettingsProviderTests.cs # Codescene.VSExtension.VS2022/Codescene.VSExtension.Core/Application/Cli/CliSettingsProvider.cs # Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022.csproj
# Conflicts: # Codescene.VSExtension.VS2022/Codescene.VSExtension.Core.Tests/CliSettingsProviderTests.cs # Codescene.VSExtension.VS2022/Codescene.VSExtension.Core/Application/Cli/CliSettingsProvider.cs
- Raise minimum Visual Studio to 17.14 (17.12 LTSC is out of support) and align VS-provided packages to it: VS SDK 17.14.40265, StreamJsonRpc 2.22.11, Newtonsoft.Json 13.0.4 - Pin MessagePack to 2.5.301 to match the 2.5.x assembly VS ships while keeping NuGet audit clean - Remove unused packages: Markdig, Newtonsoft.Json.Schema, Microsoft.Extensions.DependencyInjection.Abstractions, Community.VisualStudio.Toolkit.DependencyInjection.*, and direct System.Memory/System.Threading.Tasks.Extensions - Bump Toolkit, VSCT, VSSDK.BuildTools, LibGit2Sharp, WebView2 and test packages to latest - Suppress VS platform assemblies newly pulled in by SDK 17.14 from the VSIX - Use AsyncManualResetEvent for package initialization (VSTHRD003 with Threading analyzers 17.14)
Map HTTP statuses from cs-ide RPC errors, restore the monitor when a buffer matches disk again, and match CLI repo roots across canonical Windows paths.
…emetry Pruning the delta cache after watchInventoryChanged now requests a monitor view update, so the monitor clears when switching to a branch without changes. Restore code_health_monitor file_added/file_updated/file_removed telemetry in the review pipeline and send file_removed for pruned entries.
Queue progress and view refresh were only subscribed when the code reviewer was first created, which requires an open code editor. Starting VS without one left the monitor stale while reviews kept arriving.
Cover pipeline mismatch paths, disk file access, RpcPath resolution, debounce cancel paths, and watch coordinator no-op enable.
Explain merge-base selection, baseline_branch config, and migration from the extension-side selector.
Reused documentation and ACE panes kept a dead WebView2 and queued updates forever; detect loss of CoreWebView2, rebuild the control, and handle process failures.
Watch and disk results for open, unmodified files were always dropped as stale because the expected sha was computed from the buffer text, which lacks the UTF-8 BOM the CLI hashes on disk. Compare against the disk bytes when the buffer text matches the disk. When a watch result is dropped because the open buffer is behind disk (e.g. after a branch switch before VS reloads), claim buffer ownership so the disk state is re-requested once the buffer matches disk again.
…i-jsonrpc # Conflicts: # Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/source.extension.cs # Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/source.extension.vsixmanifest
A saved edit leaves the monitor to the CLI watch. When the git root sits below the opened folder, that watch never started, so the monitor stayed empty.
The 0.9.0 coverage gate rejected the nested-repo scan at 84.6%. These tests hit a missing directory, a hidden child, and a directory that cannot be listed.
Review often finishes first, so the margin stayed on the absolute score until the next edit.
Re-check gitignore on editor edits and exclude ignored dirty buffers from watch prune, seed, and delta admission.
…i-jsonrpc # Conflicts: # Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/source.extension.cs # Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/source.extension.vsixmanifest
There was a problem hiding this comment.
Code Health Improved
(1 files improve in Code Health)
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| CodeReviewer.cs | 9.69 → 10.00 | Complex Method, Missing Arguments Abstractions, Primitive Obsession, String Heavy Function Arguments |
Absence of Expected Change Pattern
- codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core/Models/Cli/Delta/DeltaResponseModel.cs is usually changed with: codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core/Models/Cli/Delta/ChangeDetailModel.cs, codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core/Models/Cli/Delta/FunctionInfoModel.cs
- codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core.Tests/CachingCodeReviewerTests/DeltaAsync_NullFilePath_ReturnsNullTests.cs is usually changed with: codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core/Application/Cache/Review/ReviewCacheService.cs
- codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core.Tests/CachingCodeReviewerTests/ReviewWithDeltaAsync_NullRawScore_ReturnsNullDeltaTests.cs is usually changed with: codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core/Application/Cache/Review/ReviewCacheService.cs
- codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core.Tests/CachingCodeReviewerTests/GetOrComputeBaselineRawScoreAsync_BaselineCacheHit_ReturnsCachedScoreTests.cs is usually changed with: codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core/Application/Cache/Review/ReviewCacheService.cs
- codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core.Tests/CachingCodeReviewerTests/DeltaAsync_IdenticalScores_SkipsDeltaTests.cs is usually changed with: codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core/Application/Cache/Review/ReviewCacheService.cs
- codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core.Tests/SerializationTests.cs is usually changed with: codescene-vs/Codescene.VSExtension.VS2022/Codescene.VSExtension.Core.Tests/ModelMapperTests.cs
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Code Coverage Gates Passed
New & Changed Code Coverage: 95.3%
(required = 95%)
Review details by gate
- New & Changed Code Coverage
- Pass/Fail Reason:
New or changed code meets coverage goal: 95.3% covered >= threshold = 95% - Action:
You modified 114 files, and covered 2056 added/modified lines of code.
- Pass/Fail Reason:
Summary
cs-ide.exe serverprocess for reviews, telemetry, and workspace watches instead of launching the CLI per command.Test plan
cs-ideprocess[cs-ide]lines from CLI stderr show in the CodeScene output panemake iter