refactor(ipc): declare the SignalR wire DTOs once in ClaudeDo.Data
WorkerHub and IWorkerClient each carried their own copy of every record and had already drifted — MergePreviewDto lost its verify fields on the client side, two records disagreed on their name. They now live in Data/Wire.cs and reach both sides via a <Using> item, so a hub signature change is a compile error instead of a silently dropped JSON field.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Using Include="Xunit" />
|
||||
<Using Include="ClaudeDo.Data.Wire" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="12.0.4" />
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract class StubWorkerClient : IWorkerClient
|
||||
public int ClearMyDayCalls { get; private set; }
|
||||
public int RunDailyPrepNowCalls { get; private set; }
|
||||
|
||||
public virtual IReadOnlyList<ActiveTask> GetActiveTasks() => System.Array.Empty<ActiveTask>();
|
||||
public virtual IReadOnlyList<ActiveTaskDto> GetActiveTasks() => System.Array.Empty<ActiveTaskDto>();
|
||||
|
||||
public void RaiseTaskStarted(string slot, string taskId, DateTime startedAt) => TaskStartedEvent?.Invoke(slot, taskId, startedAt);
|
||||
public void RaiseTaskFinished(string slot, string taskId, string status, DateTime finishedAt) => TaskFinishedEvent?.Invoke(slot, taskId, status, finishedAt);
|
||||
|
||||
@@ -94,8 +94,8 @@ public class MissionControlViewModelTests : IDisposable
|
||||
|
||||
private sealed class SeededFakeWorker : StubWorkerClient
|
||||
{
|
||||
public override IReadOnlyList<ActiveTask> GetActiveTasks()
|
||||
=> new[] { new ActiveTask("slot-1", "seed1", DateTime.UtcNow) };
|
||||
public override IReadOnlyList<ActiveTaskDto> GetActiveTasks()
|
||||
=> new[] { new ActiveTaskDto("slot-1", "seed1", DateTime.UtcNow) };
|
||||
}
|
||||
|
||||
// ── acceptance criterion (b): RefreshQueueAsync returns Running rows first ─
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="Xunit" />
|
||||
<Using Include="ClaudeDo.Data.Wire" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -163,7 +163,7 @@ sealed class FakeWorkerClient : IWorkerClient
|
||||
public Task SetOnlineInboxConfigAsync(OnlineInboxConfigInputDto input) => Task.CompletedTask;
|
||||
public Task SetOnlineInboxAuthAsync(string refreshToken) => Task.CompletedTask;
|
||||
public Task ClearOnlineInboxAuthAsync() => Task.CompletedTask;
|
||||
public IReadOnlyList<ActiveTask> GetActiveTasks() => System.Array.Empty<ActiveTask>();
|
||||
public IReadOnlyList<ActiveTaskDto> GetActiveTasks() => System.Array.Empty<ActiveTaskDto>();
|
||||
|
||||
public Task<UsageSnapshotDto?> GetUsageSnapshotAsync() => Task.FromResult<UsageSnapshotDto?>(null);
|
||||
public Task<UsageSnapshotDto?> RefreshUsageAsync() => Task.FromResult<UsageSnapshotDto?>(null);
|
||||
|
||||
Reference in New Issue
Block a user