Commit graph

14 commits

Author SHA1 Message Date
dtrentin
19fc203185 chore(paul): v0.4 + v0.6 shipped; autonomous finish run complete
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 09:00:21 +02:00
dtrentin
acd6053789 Merge branch 'v0.4-opcua' into v0.6-history 2026-07-22 08:59:03 +02:00
dtrentin
9aa31dde1f Merge branch 'v0.3.1-theming' into v0.4-opcua 2026-07-22 08:59:02 +02:00
dtrentin
d84f8a818a fix: dashboard Details button no longer clipped (v0.3.1)
Trailing DataGridTemplateColumn had Width="Auto"; against the 2* star columns
it collapsed on first layout, clipping the Details button to a sliver. Pin to
Width="120" so the button always fits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 08:58:50 +02:00
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
dtrentin
2bf108905c Merge branch 'v0.3.1-theming' into v0.4-opcua 2026-07-22 07:47:25 +02:00
dtrentin
ec6bc2f06f fix: config screen uses full window width (v0.3.1)
MachineConfigView was two left-pinned cards (MaxWidth 480/640, HAlign Left)
stacked in a DockPanel — right half of wide window empty, items list capped at
320px. Now root Grid Auto,*,Auto: header top, footer (validation + Save/Cancel)
bottom full-width, body Grid Auto,* — fixed 380px form left, data-items card
stretches to fill width + height (scrollable). Layout only; no binding/VM/command
change. Dashboard/Detail already fill correctly — untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 07:47:13 +02:00
dtrentin
88dfa74ebe feat: OPC UA protocol plugin (v0.4)
Second protocol plugin proving multi-protocol architecture. New
Junction.Protocols.OpcUa (multi-target net48;net8.0 — SDK has no ns2.0):
- OpcuaDriverFactory: config validation (EndpointUrl/SecurityMode/Policy/
  AuthMode/Username/Password/NodeIds/BrowseRoot/TimeoutSeconds), CONFIG_* codes.
- OpcuaDriver: ReadCurrentAsync (read configured nodes) + ProbeAsync (browse
  address space), linked-CTS timeout, Result mapping, opt-in FilterToMonitored
  — mirrors MtconnectDriver.
- IUaClient seam (SDK-free) injected for testability; UaClient wraps OPC UA
  Session (non-obsolete async API), Directory PKI store, anon/user-pass auth.

SDK: OPCFoundation.NetStandard.Opc.Ua.Client 1.5.378.156 (MIT), pinned exact,
transitive closure copied per-TFM into plugins/opcua/ (CopyLocalLockFileAssemblies
+ CopyOpcuaPlugin target). Host: AutoGenerateBindingRedirects. Core untouched —
protocol auto-discovered by plugin loader.

Projects: +Junction.Protocols.OpcUa, Junction.App (wiring), Junction.sln,
Junction.Tests (+23 tests: 13 factory + 10 driver via Mock<IUaClient>). 171 pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 07:44:23 +02:00
dtrentin
15fd1306c3 chore(paul): v0.3.1 shipped; v0.4 in progress; v0.5 deferred
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 07:24:31 +02:00
dtrentin
f4abdc0039 feat: themed + iconed UI polish (v0.3.1)
Fluent light/dark theme dictionaries (accent/surface/card/border/danger),
OS-following variant, App-level text/button/card styles. Per-protocol vector
icons via ProtocolIdToIconConverter (mirrors StatusKindToBrushConverter,
view-layer, safe fallback, no external assets). Curated layout across
dashboard/detail/config: consistent spacing scale, card grouping, theme brushes,
accent/danger buttons. App-only; no VM contract change, no new NuGet, no fw bump.

Projects: Junction.App (+ Junction.Tests: +10 converter tests, 148 pass).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 07:23:47 +02:00
dtrentin
53ce8ab4da feat: per-machine data-item selection (v0.3)
Users pick which data items each machine monitors. Catalog comes from the
protocol probe; selection is opt-in and filters persistence (only selected
items are read/kept/saved). Whole solution green, 138 tests + 2 docker integration.

Domain:
- Machine.MonitoredItemIds (opt-in, empty = monitor nothing); backward-compatible
  optional ctor param + With override.
- DataItemDescriptor (protocol-agnostic catalog entry).
- IProtocolDriver.ProbeAsync → full unfiltered item catalog.

MTConnect:
- MtconnectDriver.ProbeAsync (GET /probe → parser → descriptors).
- ReadCurrentAsync filters snapshot items to selected ids (ConnectionState
  preserved); factory passes selection into driver.

Persistence:
- machines.MonitoredItemIdsJson column + idempotent ALTER-if-missing migration.
- Repository maps selection (System.Text.Json); round-tripped.

Core:
- IMachineMonitor.ProbeAsync(machine) exposes catalog to the UI via the plugin
  factory.

App:
- Config: "Load items" probes the machine, shows a checklist (select all/none),
  pre-selects existing choices in edit mode, offline fallback, saves selection.
- Detail: empty-state hint when a machine has no monitored items.

PAUL: v0.3 Phase 3 shipped; Phase 3.1 (theming/UX) next.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-22 00:28:47 +02:00
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