-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Overview
Add a personal notes field to the profile detail view where users can record grind settings, dialling notes, and other observations. Rendered as markdown. Stored in MeticAI history — not exported with the profile, not visible to others.
Background
The Meticulous profile JSON already contains a notes field set by the profile author (e.g., recommended parameters). This feature is distinct: it's your own private notes, independent of the profile's built-in metadata. Think: a sticky note you attach to a profile card.
Features
1. User Notes Field
Displayed in the profile detail view, below the AI description / profile breakdown:
- Empty state: "Add your notes" placeholder tap-target
- View state: notes rendered via
MarkdownText(already exists) - Edit state:
MarkdownEditorcomponent (built in Shot annotations: markdown comments, star rating, and persistent metadata #179) with 2000-char limit - Edit/Preview tabs in the editor (
MarkdownEditoris the shared component) - Auto-save on blur or explicit Save tap
- Character counter near limit
2. Storage
Stored as user_notes on the MeticAI history entry — separate from ProfileData.notes (the author's built-in profile notes).
Backend: add user_notes: Optional[str] to the history entry schema in history_service.py and persist in profile_history.json.
No separate file — notes are part of the history entry to keep reads cheap.
3. Not Exported
User notes are not included in profile JSON exports or PNG exports. They live only in MeticAI history. If a profile is deleted from MeticAI history, notes are deleted with it.
4. AI Description Toggle on Import
When a profile is imported (manually or during sync from #182), offer an opt-in toggle:
"Generate AI summary for this profile"
- Default: off
- When on: calls existing Gemini analysis endpoint, stores result as profile description
- Shows token cost warning (same copy as existing
advanced.detailedKnowledgeWarning) - This toggle also appears on the profile detail view for profiles that have only a static description ("generated without AI assistance") — a "Generate AI Summary" button that triggers on demand
This toggle is surfaced here (not as a separate issue) because it's the natural complement to the notes feature: both are about enriching a profile's metadata as a user.
API Changes
| Method | Endpoint | Purpose |
|---|---|---|
PUT |
/api/history/{history_id}/notes |
Save or clear user notes |
GET |
/api/history/{history_id} |
Already returns notes once user_notes field added |
Shared Component: MarkdownEditor (from #179)
MarkdownEditor is built first in #179. This issue consumes it:
<MarkdownEditor
value={userNotes}
onChange={setUserNotes}
onSave={saveNotes}
placeholder="Grind: 11 clicks. Dose: 18g. Pull time: 28s…"
maxLength={2000}
label="Your notes"
/>#179 must be completed (at least the MarkdownEditor component) before UI work on this issue begins.
Notes vs Profile Author Notes
| Field | Source | Who sets it | Exported | Stored |
|---|---|---|---|---|
ProfileData.notes |
Profile JSON | Profile author | ✅ Yes | On machine |
user_notes |
MeticAI history | You | ❌ No | MeticAI only |
Both can coexist in the detail view. Display the author's ProfileData.notes (if non-empty) in a clearly labelled read-only block above the editable "Your notes" section.
Acceptance Criteria
-
user_notesfield added to history entry schema and persisted -
PUT /api/history/{id}/notesendpoint implemented - Editable notes section in profile detail view
- Notes render via
MarkdownText, edit viaMarkdownEditor - Empty-state placeholder shown when no notes exist
- Character limit enforced (2000) with counter
- Notes not included in profile JSON or PNG export
- Profile author's
ProfileData.notesshown separately (read-only) if present - "Generate AI Summary" button shown for profiles with static-only descriptions
-
MarkdownEditorfrom Shot annotations: markdown comments, star rating, and persistent metadata #179 is used (not reimplemented)