refactor: delete unreachable members and redundant package refs

Eight public members had no caller anywhere in src: GitService.GetFileDiffAsync,
SubtaskRepository.DeleteByTaskIdAsync, TaskRepository.GetByListAsync (a
backwards-compat alias for GetByListIdAsync) and .GetByCreatorAsync,
WorktreeRepository.GetByStatesAsync, TaskMonitorViewModel.SetPendingQuestion
(a duplicate of the live-event lambda), PrimeClaudeTabViewModel.ApplyFiredEvent,
and StreamLineFormatter.FormatFile. TaskAttachmentRepository.DeleteAllForTaskAsync
was reachable only from its own test; the ON DELETE CASCADE on task_attachments
already covers it. Tests for the deleted members go with them.

Dropped two package refs the platform already provides: EntityFrameworkCore.Design
in Worker (the design-time factory and the migrations live in Data, which has its
own ref) and System.IO.FileSystem.AccessControl in Installer.Tests (net8.0-windows
ships the ACL APIs in the shared framework).
This commit is contained in:
mika kuns
2026-08-26 10:11:46 +02:00
parent a1d74ab45d
commit 81994aadca
13 changed files with 3 additions and 130 deletions
@@ -91,48 +91,5 @@ public class StreamLineFormatterTests
Assert.Null(_formatter.FormatLine(delta));
}
// --- FormatFile and Trim ---
[Fact]
public void FormatFile_ParsesAllLinesAndReturnsFormattedText()
{
var lines = new[]
{
"""{"type":"assistant","message":{"content":[{"type":"text","text":"Hello"}]}}""",
"""{"type":"assistant","message":{"content":[{"type":"tool_use","id":"x","name":"Bash","input":{"command":"ls"}}]}}""",
"""{"type":"result","result":"Done."}""",
};
var file = Path.GetTempFileName();
try
{
File.WriteAllLines(file, lines);
var result = _formatter.FormatFile(file);
Assert.Contains("Hello", result);
Assert.Contains("[Bash]", result);
Assert.Contains("Done.", result);
}
finally
{
File.Delete(file);
}
}
[Fact]
public void FormatFile_TrimsLargeContent()
{
var chunk = new string('x', 1000);
var line = "{\"type\":\"assistant\",\"message\":{\"content\":[{\"type\":\"text\",\"text\":\"" + chunk + "\"}]}}";
var lines = Enumerable.Repeat(line, 65).ToArray();
var file = Path.GetTempFileName();
try
{
File.WriteAllLines(file, lines);
var result = _formatter.FormatFile(file);
Assert.True(result.Length <= 50_200, $"Expected <= 50200 but got {result.Length}");
}
finally
{
File.Delete(file);
}
}
// --- Trim ---
}