Skip to content

[M8] Frontend: note signal evidence block in insight cards #202

@Sturmi77

Description

@Sturmi77

Context

Part of the Notes in Analysis Epic. This issue adds the visual evidence block to insight cards, making note-derived signals visible and transparent for the user.

Depends on: #201 (signal extraction), #198 (marker-aware insights)

Spec Reference

docs/features/notes-in-analysis.md — Section: Insights — Evidence Block

Evidence Block Design

┌──────────────────────────────────────────────────┐
│ 💡 An Tagen mit Marker "Stress" lag dein Mood    │
│    im Schnitt 1.4 Punkte unter deinem Mittelwert │
│                                                  │
│    Basis: 14 Tage · Konfidenz: 0.82              │
│    Beispiele: 12. März, 3. April, 9. Mai         │
└──────────────────────────────────────────────────┘

Tasks

  • Render evidence block on insight cards when sample_size >= 20
  • Show: signal/marker name, avg_delta, sample_size, time_window, confidence, up to 3 example dates
  • Soft prompt when sample_size < 20: “Füge Notizen hinzu, um Zusammenhänge besser zu verstehen.”
  • Insight card hidden (not error) when below threshold
  • Confidence displayed as percentage or label (e.g. “Mittel” / “Hoch”), not raw decimal
  • Example dates are clickable and open the entry drawer from [Retroactive M2] Frontend: note visibility in timeline, calendar, and analysis drilldown #196
  • Mobile layout tested at 375px
  • No medical/causal copy — copy review required before merge

Acceptance Criteria

  • Evidence block rendered correctly at sample_size >= 20
  • Below-threshold prompt shown and styled correctly
  • Example date links open correct entry drawer
  • Copy reviewed — no causal or diagnostic language
  • Mobile layout correct at 375px

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions