junction/.paul/STATE.md
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

3 KiB

Project State

Project Reference

See: .paul/PROJECT.md (updated 2026-07-21)

Core value: Operators see live state of every configured machine across heterogeneous protocols in one place, adding machines/protocols without code. Current focus: v0.3 Phase 3 (item selection) shipped → PAUSED. Next: Phase 3.1 theming/UX.

Current Position

Milestone: v0.3 Data-Item Selection + UX Phase: 3 (item selection) ✓ SHIPPED — Phase 3.1 (theming/UX) NOT started Plan: v0.3-backend ✓, v0.3-appui ✓ Status: PAUSED (user requested). Build 0/0, 138 tests + 2 docker-skip. Last activity: 2026-07-22 — v0.3 item selection: Machine.MonitoredItemIds (opt-in), IProtocolDriver.ProbeAsync, MTConnect probe+filter, Persistence col+migration, monitor.ProbeAsync, config probe→checklist UI (47 items live), detail empty-state.

Progress:

  • v0.3: Phase 3 done, Phase 3.1 (theming) pending

Loop Position

PLAN ──▶ APPLY ──▶ UNIFY
  ✓        ✓        ✓     [Phase 3 complete → PAUSED; next PLAN Phase 3.1 theming]

NEXT (on resume)

Phase 3.1 theming/UX (task #34): Fluent light/dark + accent, per-protocol icons (mtconnect/opc/fanuc), curated layout across dashboard/detail/config. App-only. Then v0.4 OPC UA plugin.

Standing Authorization

Auto-commit + push GREEN chunks (build 0-err + tests pass) to origin/main WITHOUT asking (user-granted 2026-07-22). Never commit red; no force-push; artifact leak-check each time.

Accumulated Context

Decisions

Decision Phase Impact
net48 mandatory (Win7/8 fleet) 1 Constrains all deps; Avalonia 11.3.x, Dapper not EF Core
App multi-target net48;net8.0 (no DevHead) 1 Dev on Linux net8.0, ship net48
Dynamic plugins Assembly.LoadFrom 1 Add protocols without touching core
Monitor dynamic API (AddOrUpdate/Remove) 2 Config changes take effect live, no restart

Deferred Issues

Issue Origin Effort Revisit
HttpClient created per driver in MTConnect factory 1 S If drivers recreated frequently (socket exhaustion)
Robust disconnection UX (state flip nuances) 2 S After config CRUD lands

Blockers/Concerns

None.

Boundaries (Active)

  • M2-C touches: src/Junction.App/* (config VM/View, nav, dashboard/detail buttons, Bootstrapper) + src/Junction.Core (AvailableProtocols only) + tests.
  • Do NOT touch Domain/Persistence/Protocols in M2-C.

Session Continuity

Last session: 2026-07-21 Stopped at: M2 complete — 3 screens (dashboard/detail/config), offline detection, dynamic monitor reload. Build 0/0, 125 tests + 2 docker-skip. NOT yet committed. Next action: commit + push v0.2 (code + .paul/) when user authorizes → then plan v0.3 OPC UA (/paul:plan). Note: OPC UA research Likely (SDK on net48). Resume context: Manager mode (dotnet-manager), all code delegated to subagents. Full detail in ~/.claude memory/junction-project.md. v0.1 committed 507753f on origin/main; v0.2 uncommitted.


STATE.md — Updated after every significant action