Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b459741
feat: run cs-ide as a persistent JSON-RPC server
martinsafsten-codescene Sep 16, 2026
c562ef6
fix buildtools version
martinsafsten-codescene Sep 16, 2026
58c3abe
fix: show CLI logs and clear monitor on solution switch
martinsafsten-codescene Sep 16, 2026
8b3c24a
chore: allow oversized persistent CLI migration
martinsafsten-codescene Sep 16, 2026
dff4238
fix: pass repository root to persistent CLI reviews
martinsafsten-codescene Sep 16, 2026
abde6d4
fix: preserve non-repository review working paths
martinsafsten-codescene Sep 16, 2026
68a8185
feat: sync persistent CLI behavior with the VS Code extension
martinsafsten-codescene Oct 2, 2026
27549b6
chore: add make updatecwf for a local cs-webview build
martinsafsten-codescene Oct 2, 2026
5f06dd2
fix: start folder watches and keep queue progress updating
martinsafsten-codescene Oct 2, 2026
7cffb38
fix: avoid UI deadlocks when opening the monitor and a solution
martinsafsten-codescene Oct 2, 2026
8a890da
feat: replace the terms banner with a default-on telemetry setting
martinsafsten-codescene Oct 2, 2026
d78a711
feat: drop start and stop automatic analysis from the extension menu
martinsafsten-codescene Oct 2, 2026
27269b6
fix: keep solution switches from reviewing the folder that just closed
martinsafsten-codescene Oct 2, 2026
2a67221
chore: pin the published IDE-1.0.70 cs-ide binary
martinsafsten-codescene Oct 2, 2026
e81edee
feat: drive the monitor from CLI review progress
martinsafsten-codescene Oct 6, 2026
aafe1b2
Merge main into feature/persistent-cli-jsonrpc
martinsafsten-codescene Oct 6, 2026
174535b
Merge branch 'main' into feature/persistent-cli-jsonrpc
martinsafsten-codescene Oct 12, 2026
e58b8ce
chore: bump NuGet dependencies and require VS 2022 17.14+
martinsafsten-codescene Oct 12, 2026
f3d605a
fix(cli): align persistent CLI behavior with recent VS Code fixes
martinsafsten-codescene Oct 12, 2026
3eb4701
Merge branch 'chore/nuget-dependency-bump' into feature/persistent-cl…
martinsafsten-codescene Oct 12, 2026
26dfa6e
fix(monitor): refresh view on inventory prune and restore monitor tel…
martinsafsten-codescene Oct 12, 2026
9fe3665
fix(monitor): wire monitor updates at package startup
martinsafsten-codescene Oct 12, 2026
d88c385
fix(monitor): keep progress total stable across CLI re-queues
martinsafsten-codescene Oct 12, 2026
9a2de86
fix(webview): push full monitor state on init
martinsafsten-codescene Oct 12, 2026
20da277
refactor: remove code health issues in CLI notification handling
martinsafsten-codescene Oct 12, 2026
60c83a0
refactor: remove cs-ide migration dead code and local review RPC
martinsafsten-codescene Oct 12, 2026
013dbb2
test: raise changed-code coverage for persistent CLI paths
martinsafsten-codescene Oct 12, 2026
99d4387
test: cover CodeReviewer, pipeline notifications, and watch admission
martinsafsten-codescene Oct 12, 2026
b2fa8ce
test: close remaining coverage gaps on watch and RpcPath
martinsafsten-codescene Oct 12, 2026
690f1ba
test: push changed-code coverage over 95% threshold
martinsafsten-codescene Oct 12, 2026
4832f38
Add tests for watch cache eviction and RpcPath cache hit.
martinsafsten-codescene Oct 12, 2026
61d68f4
Merge branch 'main' into feature/persistent-cli-jsonrpc
martinsafsten-codescene Oct 12, 2026
2490b0b
Add tests to clear 95% changed-code coverage gate.
martinsafsten-codescene Oct 12, 2026
b558a44
Bump VSIX version to 0.9.0 for test release.
martinsafsten-codescene Oct 13, 2026
c44263b
Pin Newtonsoft.Json to 13.0.3 so telemetry uses the API Visual Studio…
martinsafsten-codescene Oct 16, 2026
646f742
docs: document CLI baseline resolution since 0.9.0
martinsafsten-codescene Oct 19, 2026
cf1b4f6
fix(webview): recreate WebView2 when the host dies in tool windows
martinsafsten-codescene Oct 20, 2026
6b7a828
fix(pipeline): keep monitor in sync for open files with a BOM
martinsafsten-codescene Oct 20, 2026
d553961
Merge remote-tracking branch 'origin/main' into feature/persistent-cl…
martinsafsten-codescene Oct 20, 2026
4030131
fix(watch): watch a repository nested one level under the opened folder
martinsafsten-codescene Oct 21, 2026
015c6a0
test(watch): cover nested repository scan edge cases
martinsafsten-codescene Oct 21, 2026
8118756
fix(margin): refresh the editor score when a delta arrives
martinsafsten-codescene Oct 22, 2026
e7668d3
fix(monitor): keep gitignored open files off the Code Health monitor
martinsafsten-codescene Oct 23, 2026
c4d280e
Merge remote-tracking branch 'origin/main' into feature/persistent-cl…
martinsafsten-codescene Oct 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/coverage-mine.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ $totalLines = 0
$coveredLines = 0

foreach ($package in $coverage.coverage.packages.package) {
$packageName = $package.name
foreach ($class in $package.classes.class) {
$filename = Join-Path $packageName $class.filename
$filename = ($class.filename -replace '/', '\')

if ($changedFilesSet.ContainsKey($filename)) {
$classLines = 0
Expand Down
40 changes: 40 additions & 0 deletions .github/cwf.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
param(
[switch]$Local
)

$localCwf = Join-Path (Get-Location) "..\cs-webview"
$localPackage = Join-Path $localCwf "package.json"

if ($Local) {
if (-not (Test-Path $localPackage)) {
Write-Error "Local CWF checkout not found at $localCwf"
exit 1
}

Write-Host "Building CWF locally from $localCwf..."
Push-Location $localCwf
try {
& npm run build
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
finally {
Pop-Location
}

$assetsPath = Join-Path $localCwf "build\assets"
if (-not (Test-Path $assetsPath)) {
Write-Error "Local CWF build did not produce build\assets."
exit 1
}

if (Test-Path cs-cwf) { Remove-Item cs-cwf -Recurse -Force }
New-Item -ItemType Directory -Path cs-cwf | Out-Null
Copy-Item (Join-Path $assetsPath "*") cs-cwf
$webDir = "Codescene.VSExtension.VS2022/Codescene.VSExtension.VS2022/ToolWindows/WebComponent"
Copy-Item cs-cwf/index.css $webDir -Force
Copy-Item cs-cwf/index.js $webDir -Force
if (Test-Path cs-cwf.zip) { Remove-Item cs-cwf.zip -Force }
Compress-Archive -Path "cs-cwf\*" -DestinationPath cs-cwf.zip
exit 0
}

$Token = $env:CODESCENE_IDE_DOCS_AND_WEBVIEW_TOKEN

$headers = @{
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,3 @@ jobs:
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@martinsafsten-codescene'

- name: Run CachingCodeReviewer benchmarks
shell: pwsh
working-directory: Codescene.VSExtension.VS2022
run: dotnet run --project Codescene.VSExtension.Core.Benchmarks/Codescene.VSExtension.Core.Benchmarks.csproj -c Release --no-build -- --filter "*CachingCodeReviewerBenchmarks*" --exporters json

- name: Store CachingCodeReviewer benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Code Review - CachingCodeReviewer
tool: 'benchmarkdotnet'
output-file-path: Codescene.VSExtension.VS2022/BenchmarkDotNet.Artifacts/results/Codescene.VSExtension.Core.Benchmarks.CachingCodeReviewerBenchmarks-report-full-compressed.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@martinsafsten-codescene'
2 changes: 1 addition & 1 deletion .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
needs: fetch-docs
# env:
# Feature flags here. Example:
# FEATURE_INITIAL_GIT_OBSERVER: true
# FEATURE_ACE: true
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
// Copyright (c) CodeScene. All rights reserved.

using System.Collections.Concurrent;
using System.Reflection;
using Codescene.VSExtension.Core.Application.Cache.Review;
using Codescene.VSExtension.Core.Application.Cli;
using Codescene.VSExtension.Core.Interfaces;
using Codescene.VSExtension.Core.Interfaces.Ace;
using Codescene.VSExtension.Core.Interfaces.Cli;
using Codescene.VSExtension.Core.Interfaces.Extension;
using Codescene.VSExtension.Core.Interfaces.Git;
using Codescene.VSExtension.Core.Models.Cache.Delta;
using Codescene.VSExtension.Core.Models.Cache.Review;
using Codescene.VSExtension.Core.Models.Cli.Refactor;
using AutoRefactorConfig = Codescene.VSExtension.Core.Models.WebComponent.Data.AutoRefactorConfig;

Expand All @@ -22,8 +16,7 @@ internal sealed class BenchmarkEnvironment : IDisposable
private readonly ICliSettingsProvider _cliSettingsProvider = new CliSettingsProvider();
private readonly ModelMapper _modelMapper = new ModelMapper();
private readonly FixedSettingsProvider _settingsProvider = new FixedSettingsProvider();
private readonly IProcessExecutor _processExecutor;
private readonly ICliCommandProvider _commandProvider;
private readonly IIdeServerClient _ideServerClient;
private readonly BenchmarkCacheStorageService _cacheStorageService;
private bool _disposed;

Expand All @@ -38,8 +31,7 @@ public BenchmarkEnvironment()
System.IO.File.WriteAllText(ExistingFilePath, BenchmarkInputs.CurrentCode);

_cacheStorageService = new BenchmarkCacheStorageService(CacheDirectory, RootDirectory);
_commandProvider = new CliCommandProvider(new CliObjectScoreCreator(_logger));
_processExecutor = CreateProcessExecutor(_cliSettingsProvider, _logger);
_ideServerClient = new IdeServerClient(_cliSettingsProvider, _logger, _settingsProvider);
}

public string RootDirectory { get; }
Expand All @@ -52,36 +44,12 @@ public CliExecutor CreateCliExecutor()
{
return new CliExecutor(
_logger,
new BenchmarkCliServices(_commandProvider, _processExecutor, _cacheStorageService),
_ideServerClient,
_cacheStorageService,
_settingsProvider,
null);
}

public CodeReviewer CreateCodeReviewer(IGitService gitService, IPreflightManager? preflightManager = null)
{
return new CodeReviewer(
_logger,
_modelMapper,
CreateCliExecutor(),
null,
gitService,
null,
preflightManager);
}

public CachingCodeReviewer CreateCachingCodeReviewer(IGitService gitService, IPreflightManager? preflightManager = null)
{
return new CachingCodeReviewer(
CreateCodeReviewer(gitService, preflightManager),
new ReviewCacheService(new ConcurrentDictionary<string, ReviewCacheItem>()),
new BaselineReviewCacheService(new ConcurrentDictionary<string, string>()),
new DeltaCacheService(new ConcurrentDictionary<string, DeltaCacheItem>()),
_logger,
gitService,
null,
null);
}

public void Dispose()
{
if (_disposed)
Expand All @@ -90,6 +58,7 @@ public void Dispose()
}

_disposed = true;
_ideServerClient.Dispose();
try
{
Directory.Delete(RootDirectory, true);
Expand All @@ -98,20 +67,6 @@ public void Dispose()
{
}
}

private static IProcessExecutor CreateProcessExecutor(ICliSettingsProvider cliSettingsProvider, ILogger logger)
{
var processExecutorType = typeof(CliSettingsProvider).Assembly.GetType(
"Codescene.VSExtension.Core.Application.Cli.ProcessExecutor",
throwOnError: true);
var processExecutor = (IProcessExecutor?)Activator.CreateInstance(
processExecutorType,
BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic,
null,
new object[] { cliSettingsProvider, logger },
null);
return processExecutor!;
}
}

internal static class BenchmarkInputs
Expand Down Expand Up @@ -153,22 +108,6 @@ public int Calculate(int a, int b, int c, int d, int e, int f, int g, int h)
}";
}

internal sealed class BenchmarkCliServices : ICliServices
{
public BenchmarkCliServices(ICliCommandProvider commandProvider, IProcessExecutor processExecutor, ICacheStorageService cacheStorage)
{
CommandProvider = commandProvider;
ProcessExecutor = processExecutor;
CacheStorage = cacheStorage;
}

public ICliCommandProvider CommandProvider { get; }

public IProcessExecutor ProcessExecutor { get; }

public ICacheStorageService CacheStorage { get; }
}

internal sealed class BenchmarkCacheStorageService : ICacheStorageService
{
public BenchmarkCacheStorageService(string cacheDirectory, string workspaceDirectory)
Expand Down Expand Up @@ -220,53 +159,12 @@ internal sealed class FixedSettingsProvider : ISettingsProvider
public bool ShowDebugLogs => false;

public string AuthToken => string.Empty;
}

internal sealed class FixedGitService : IGitService
{
private readonly string _defaultBaselineContent;
private readonly Dictionary<string, string> _pathContents = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
public int ServerWorkerThreads => 0;

public FixedGitService(string defaultBaselineContent)
{
_defaultBaselineContent = defaultBaselineContent;
}

public void SetContent(string path, string content)
{
_pathContents[path] = content;
}

public string GetBaselineCommit(string repoRootPath)
{
return string.Empty;
}

public string GetFileContentForCommit(string path)
{
return GetFileContentForCommit(path, string.Empty);
}
public bool EnableAutomaticAnalysis => true;

public string GetFileContentForCommit(string path, string baselineCommit)
{
if (path != null && _pathContents.TryGetValue(path, out var content))
{
return content;
}

return _defaultBaselineContent;
}

public bool IsFileIgnored(string filePath) => false;

public HashSet<string> FilterIgnoredFiles(IEnumerable<string> absolutePaths)
{
return new HashSet<string>(absolutePaths, StringComparer.OrdinalIgnoreCase);
}

public void Dispose()
{
}
public bool EnableTelemetry => true;
}

internal sealed class FixedPreflightManager : IPreflightManager
Expand Down

This file was deleted.

Loading
Loading