Commit graph

1 commit

Author SHA1 Message Date
dtrentin
54f8b3be25 feat: history & trends (v0.6)
Time-series history persisted + per-item trend sparklines in detail view.

Data (Domain+Persistence): HistoryPoint model; IMachineRepository +Append/
Get/Prune history; snapshot_history table (append-only) + index; DeleteAsync
cascades history. Port purity kept (Result/Cancelled, no throw).

Core: MachineMonitor.PersistAsync appends history on Connected snapshots +
throttled retention prune (7-day window, <=1/hour via Interlocked-CAS), never
blocks/undoes latest-snapshot save.

App: custom Sparkline Control (StreamGeometry polyline, min/max-scaled,
net48-safe, no charting dep); DataItemRowViewModel observable +Trend/HasTrend +
pure TryParseNumeric; MachineDetailViewModel loads per-item history (1h window,
60 pts) on load + each snapshot, parses numeric, sets Trend on UI thread;
detail view Trend column.

Projects: Domain, Persistence, Core, App, Tests (+31: 196 pass + 2 skip).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 08:57:52 +02:00