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
@@ -312,18 +312,6 @@ public class StreamLineFormatter
return s.Length <= max ? s : s[..max] + "…";
}
public string FormatFile(string filePath)
{
var sb = new StringBuilder();
foreach (var line in File.ReadLines(filePath))
{
var formatted = FormatLine(line);
if (formatted is not null)
sb.Append(formatted);
}
return Trim(sb.ToString());
}
public static string Trim(string text)
{
if (text.Length <= MaxLength) return text;
@@ -140,13 +140,6 @@ public sealed partial class TaskMonitorViewModel : ViewModelBase, IDisposable
_worker.TaskQuestionResolvedEvent += _onTaskQuestionResolved;
}
// Surface a pending question (used by live event + re-attach hydration).
public void SetPendingQuestion(string questionId, string question)
{
PendingQuestionId = questionId;
PendingQuestion = question;
}
private void ClearPendingQuestion()
{
PendingQuestionId = null;
@@ -100,10 +100,4 @@ public sealed partial class PrimeClaudeTabViewModel : ViewModelBase
Rows.Remove(row);
}
public void ApplyFiredEvent(PrimeFiredEvent evt)
{
var row = Rows.FirstOrDefault(r => r.Id == evt.ScheduleId);
if (row is null) return;
if (evt.Success) row.LastRunAt = evt.FiredAt;
}
}