Skip to content

[Retroactive M3] Backend + Frontend: manual note markers #197

@Sturmi77

Description

@Sturmi77

Context

Part of the Notes in Analysis Epic. M3 (Insights v1) is already completed. This issue retroactively adds manual note markers — the safest bridge from raw free-text to explainable analytics, fully within the existing API-first architecture.

Depends on: #195 (backend note fields), #196 (note visibility)

Spec Reference

docs/features/notes-in-analysis.md — Sections: Marker Taxonomy v1, Frontend Components — Entry Composer

Marker Taxonomy v1

Key Display (DE/EN)
work Arbeit / Work
homeoffice Homeoffice / Remote
social Sozial / Social
movement Bewegung / Exercise
sleep_bad Schlechter Schlaf / Poor Sleep
sleep_good Guter Schlaf / Good Sleep
stress Stress
conflict Konflikt / Conflict
symptom Symptom
travel Reise / Travel
achievement Erfolg / Achievement

Custom markers: free-text, max 32 chars.

Tasks

Backend

  • POST /entries/{id}/note-markers with validation against taxonomy + custom rules
  • DELETE /entries/{id}/note-markers/{marker_id}
  • GET /users/me/note-markers/suggestions (most-used first, max 20)
  • GET /analysis/notes/marker-summary endpoint (see spec for response shape)
  • ADR-N-03: decide if custom markers are normalised server-side or stored verbatim — file ADR before implementation

Frontend

Acceptance Criteria

  • Entry Composer shows 11 predefined marker chips
  • Selected markers saved and synced correctly
  • Entries can be filtered by marker in analysis view
  • GET /analysis/notes/marker-summary returns correct avg_mood per marker
  • Suggestions endpoint returns last 20 user-defined markers
  • Mobile chip row works at 375px
  • ADR-N-03 filed before merge

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions