1.4 KiB
1.4 KiB
id, title, status, assignee, created_date, labels, dependencies, references, priority
| id | title | status | assignee | created_date | labels | dependencies | references | priority | |
|---|---|---|---|---|---|---|---|---|---|
| ML-12 | Use Notes.change_note/2 instead of Note.changeset/2 in notes component | Done | 2026-04-20 08:49 |
|
low |
Description
GitHub: created 2026-04-16 · updated 2026-04-17 · closed 2026-04-17
Summary
lib/music_library_web/components/notes.ex calls Note.changeset/2 directly at three sites, bypassing the context helper MusicLibrary.Notes.change_note/2 (which already exists and is used at line 97 of the same component).
Evidence
lib/music_library_web/components/notes.ex:15lib/music_library_web/components/notes.ex:121lib/music_library_web/components/notes.ex:138
All three could call Notes.change_note(note, %{}) instead.
Why It Matters
The "LiveViews / LiveComponents call the context, not schema modules" boundary is load-bearing in this project. The component already honours it at line 97 — these three spots are the outliers.
Fix
Mechanical find-and-replace. Three one-line edits.
Acceptance Criteria
- Tests still pass
- No direct
Note.changesetreferences inlib/music_library_web/components/notes.ex
- #1 Tests still pass
- #2 No direct
Note.changesetreferences inlib/music_library_web/components/notes.ex