Commit graph

3 commits

Author SHA1 Message Date
dtrentin
cf394bab31 refactor: v0.2.1 refinements — HttpClient lifetime, disconnection UX, DataGrid
Post-v0.2 polish (no behavior regressions; 127 tests + 2 docker integration green).

- MTConnect: shared static HttpClient (Timeout=Infinite) + per-request timeout
  via linked CancellationTokenSource. Fixes socket-exhaustion risk from
  new-HttpClient-per-driver on config edits / dynamic monitor reload.
- Disconnection UX: dashboard + detail show connection state with color
  (green/red/grey dot + badge) via StatusKindToBrush converter; LastSeen
  timestamp preserved across disconnects. VMs stay framework-agnostic.
- Delete confirm: VM-driven overlay naming the machine (replaces two-state
  button) to prevent accidental deletion.
- Dashboard table: switched to DataGrid — aligned columns + Details gets its
  own column (fixes row misalignment). Adds Avalonia.Controls.DataGrid 11.3.10.

PAUL: roadmap re-sequenced — v0.3 Data-Item Selection + UX, OPC UA → v0.4,
Fanuc → v0.5, History → v0.6.

Touches: Junction.Protocols.MTConnect, Junction.App, tests, .paul/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 00:09:48 +02:00
dtrentin
6f75f7feb1 feat: machine management UX + PAUL init (v0.2)
M2 "Machine Management UX": full N-machine management from UI plus
runtime resilience. All 3 screens now live (dashboard, detail, config).

Core:
- PollingEngine offline detection: consecutive-fail threshold emits a
  synthetic Disconnected snapshot (no-spam, resets on recovery).
- MachineMonitor dynamic API: AddOrUpdateMachineAsync / RemoveMachineAsync
  start/restart/stop a machine's polling live (no app restart); idempotent.
- MachineMonitor.AvailableProtocols exposes loaded protocol ids.

App:
- Machine detail screen: full current snapshot, reachable from dashboard
  row, live-refreshing, Back nav.
- Config screen: add / edit / delete machines with validation; Save upserts
  + reloads monitor live; Delete two-state confirm + stops polling.
- Dashboard: "Add machine" button, per-row Details, reload after mutation.

Repo hygiene:
- Untrack stray src/Junction.App/plugins/ build artifact (real output goes
  to bin/*/plugins via build target); add to .gitignore.

PAUL: initialized .paul/ (PROJECT/ROADMAP/STATE + paul.json) as cross-session
system-of-record. v0.1 shipped, v0.2 complete, v0.3 OPC UA next.

Build 0 warn/0 err (net48 + net8.0). Tests: 125 unit + 2 docker integration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 23:55:10 +02:00
dtrentin
507753f82e init: scaffold Junction multi-protocol machine monitor (M1 walking skeleton)
Greenfield C# app reading industrial machine data over pluggable protocols.
M1 walking skeleton: MTConnect plugin polls a machine, Avalonia dashboard
shows live last datum. Build 0 warn/0 err on net48 + net8.0 (Linux),
115 unit tests + 2 docker-gated integration tests.

Projects:
- Junction.Domain (netstandard2.0): Result<T>, models, IProtocolDriver,
  IMachineRepository, plugin manifest. Zero package deps.
- Junction.Core (netstandard2.0): PollingEngine, PluginLoader
  (Assembly.LoadFrom), MachineMonitor, DI extensions.
- Junction.Persistence (netstandard2.0): SqliteMachineRepository (Dapper),
  schema, connection factory. Provider-swap seam to SQL Server.
- Junction.Protocols.MTConnect (netstandard2.0): HTTP driver + namespace-
  version-agnostic parser (MTConnect 1.7 + 2.0). Runtime plugin.
- Junction.App (net48;net8.0): Avalonia MVVM, live dashboard, NLog, DI root.
- Junction.Tests (net8.0): xUnit + Moq, 117 tests.
- mock/: docker-compose MTConnect agent (ladder99/agent).

Target net48 for Windows 7/8 fleet compatibility. Avalonia pinned 11.3.x.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 23:32:56 +02:00