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:
@@ -84,7 +84,7 @@ new editor boilerplate there rather than copying it a third time.
|
||||
|
||||
## Services
|
||||
|
||||
- **WorkerClient / IWorkerClient** — SignalR client on `http://127.0.0.1:47821/hub`, auto-reconnect with exponential backoff. The surface **tracks `WorkerHub`** — treat `src/ClaudeDo.Worker/Hub/WorkerHub.cs` as the canonical method list rather than duplicating it here. Events mirror `HubBroadcaster`. Lifecycle (`StartAsync`/`StopAsync`) and a few admin methods live only on the concrete `WorkerClient`.
|
||||
- **WorkerClient / IWorkerClient** — SignalR client on `http://127.0.0.1:47821/hub`, auto-reconnect with exponential backoff. The surface **tracks `WorkerHub`** — treat `src/ClaudeDo.Worker/Hub/WorkerHub.cs` as the canonical method list rather than duplicating it here. The wire DTOs are **not** declared here: they live once in `ClaudeDo.Data/Wire.cs` and reach both sides via a `<Using Include="ClaudeDo.Data.Wire" />` item in the csproj (Ui, Worker, and both test projects), so a hub signature change is a compile error instead of a silently dropped JSON field. Add new ones there, never a local copy. Events mirror `HubBroadcaster`. Lifecycle (`StartAsync`/`StopAsync`) and a few admin methods live only on the concrete `WorkerClient`.
|
||||
- **INotesApi / WorkerNotesApi** — daily-note CRUD; UI DTO `DailyNoteDto(Id, Date, Text, SortOrder)`.
|
||||
- **IPrimeScheduleApi** — prime-schedule CRUD.
|
||||
- **UpdateCheckService** — polls releases; `LastCheckStatus`/`LatestVersion`/`CheckNowAsync` feed the shell's update banner.
|
||||
@@ -95,8 +95,11 @@ new editor boilerplate there rather than copying it a third time.
|
||||
## Converters
|
||||
|
||||
In `Converters/` — grep rather than list: log-level brush, dot brush,
|
||||
status equality, icon key, strike/italic/opacity toggles, null→bool,
|
||||
uppercase.
|
||||
status equality, icon key, `KeepLastNumber`. The one-expression ones
|
||||
(strike/italic/opacity toggles, uppercase, not-a-header-row) share
|
||||
`SimpleConverters.cs`; put new trivial ones there instead of a new file.
|
||||
There is no null→bool converter — bind
|
||||
`Converter={x:Static conv:ObjectConverters.IsNotNull}` (Avalonia ships it).
|
||||
|
||||
## Dialog Pattern
|
||||
|
||||
|
||||
Reference in New Issue
Block a user