reclaim/app/lib
flemming-it dff5685686 feat(hub): implement HubRepository.list() — flow.completed → Evaluation
Replaces the Phase-0 placeholder (returns const []) with a real
event-log reader. When the app starts in hub mode and the hub
is healthy, list() now:

  1. Calls HubClient.eventLog(types: ['flow.completed']) over
     gRPC (up to 200 most recent events).
  2. Decodes each event's detail JSON as the Recl∆Im output bag
     produced by flows/durchstich-gewo-14.yaml — keys: norm,
     skm, benefit, frust, cohort, duties.
  3. Skips events from other flows (detected by absence of
     norm + skm keys). One hub can serve many flows; only
     Recl∆Im-shaped runs surface here.
  4. Sorts by skmEurPerYear DESC, matching MockRepository's
     'most-harmful first' ordering — UI behaves identically
     across the mock-vs-live switch.

Field mapping (tolerant on absence, defaults documented):

  norm.eli / title / jurabk / paragraph / paragraphs[]
                                          -> Norm
  skm.total_eur_per_year, skm.tier_lowest -> skmEurPerYear, tier
  benefit.total                           -> benefitScore
  frust.composite_frust                   -> frustScore
  cohort.count                            -> affectedCount
  cohort.source + .tier                   -> first Source entry
  duties.duties[]                         -> List<Duty>
  event.eventId                           -> auditEventId
  event.timestamp                         -> norm.standDate

byEli() walks the same list once; for small per-norm caches we
defer batching to Phase 2.

Empty list = honest state: 'hub connected, no Recl∆Im flow
runs yet'. Caller decides how to render that (HeatmapPage
currently shows an empty grid; a clearer 'chain run flows/'-
hint lands in the same pass as the demo-banner reorganisation).

Signed-off-by: flemming-it <sf@flemming.it>
2026-06-18 14:18:10 +02:00
..
data feat(hub): implement HubRepository.list() — flow.completed → Evaluation 2026-06-18 14:18:10 +02:00
pages docs(legal): fill Impressum + Datenschutz from authoritative fai_web data 2026-06-18 13:58:29 +02:00
theme feat(brand): rename product to Recl∆Im (Reclaim) across app, bundle, docs 2026-06-18 13:42:55 +02:00
widgets feat(legal): add Recht page (disclaimer, AI Act, UrhG, GDPR, Impressum, OSS) 2026-06-18 13:52:45 +02:00
main.dart feat(brand): rename product to Recl∆Im (Reclaim) across app, bundle, docs 2026-06-18 13:42:55 +02:00