Run prettier on backlog folder

This commit is contained in:
Claudio Ortolina
2026-05-04 21:22:27 +01:00
parent 7bf89d9a1d
commit dc3b31378d
177 changed files with 2594 additions and 936 deletions
@@ -1,20 +1,21 @@
---
id: ML-1
title: 'Add default :limit to Maintenance orphan queries'
title: "Add default :limit to Maintenance orphan queries"
status: To Do
assignee: []
created_date: '2026-04-20 08:44'
updated_date: '2026-04-24 06:59'
created_date: "2026-04-20 08:44"
updated_date: "2026-04-24 06:59"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/183'
- "https://github.com/cloud8421/music_library/issues/183"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-16 · updated 2026-04-16_
## Summary
@@ -38,10 +39,13 @@ def get_artists_missing_musicbrainz_id(opts \\ []) do
# ...
end
```
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Both functions apply a default limit when none is supplied
- [ ] #2 Existing callers continue to override when they need a different value
<!-- AC:END -->
@@ -49,6 +53,7 @@ end
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Closed as not-planned (YAGNI).
The proposed fix was to add a default `:limit` (e.g. 1000) to `get_artists_missing_musicbrainz_id/1` and `get_albums_missing_musicbrainz_id/1` in `lib/music_library/maintenance.ex` to defend against future unbounded call sites.
@@ -56,4 +61,5 @@ The proposed fix was to add a default `:limit` (e.g. 1000) to `get_artists_missi
Assessment: the dataset ceiling is <5,000 records and <1,000 artists for the next 2-3 years. An unbounded scan of the `tracks` table grouped by artist/album JSON fields is well within acceptable cost for this size. Adding a default limit would silently cap results on a dataset that should never need capping, and the only current callers (`lib/mix/tasks/scrobble/audit.ex:127,149`) already invoke without `:limit` on purpose.
A follow-up could remove the `:limit` option entirely to simplify the API — not tracked here; revisit if the option starts causing confusion.
<!-- SECTION:FINAL_SUMMARY:END -->
@@ -3,16 +3,18 @@ id: ML-123
title: Hide collected release input and details for wishlisted records
status: To Do
assignee: []
created_date: '2026-04-20 08:59'
created_date: "2026-04-20 08:59"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/40'
- "https://github.com/cloud8421/music_library/issues/40"
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2025-05-07 · updated 2025-05-08 · closed 2025-05-08 · not planned_
<!-- SECTION:DESCRIPTION:END -->
@@ -3,7 +3,7 @@ id: ML-142.1
title: Port Finished at picker and selection bar to ScrobbleLive.Show
status: To Do
assignee: []
created_date: '2026-04-22 16:30'
created_date: "2026-04-22 16:30"
labels:
- ui
- scrobble
@@ -19,6 +19,7 @@ priority: medium
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Bring the `/scrobble/:release_id` page (`MusicLibraryWeb.ScrobbleLive.Show`) up to ML-142 parity for the two affordances that affect scrobbling outcomes: the `Finished at` date/time picker and the pinned selection-bar footer.
Today the page imports `medium/1` and `scrobble_button_label/1` from `MusicLibraryWeb.Components.Release` — so the per-medium UI stays visually consistent — but reimplements its own `scrobble_release`, `scrobble_medium`, and `scrobble_selected_tracks` handlers, each hard-coding `DateTime.utc_now/0`. There is no picker (users cannot back-date or forward-date a scrobble) and no selection bar (when tracks are selected, the user sees no count/duration summary and the only scrobble affordance is an icon-only header button whose behaviour depends on hidden selection state via `scrobble_button_label/1`).
@@ -42,7 +43,9 @@ Today the page imports `medium/1` and `scrobble_button_label/1` from `MusicLibra
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 The page renders a `Finished at` date/time picker in the tracks section header when Last.fm is connected, initialised to the current time at mount
- [ ] #2 The picker has a `Now` reset affordance that resets the value back to the current time
- [ ] #3 `Scrobble release` uses the picker value; no longer calls `DateTime.utc_now/0` directly inside the handler
@@ -3,26 +3,31 @@ id: ML-159
title: Replicate CI pipeline on tangled.org
status: Done
assignee: []
created_date: '2026-05-03 16:54'
updated_date: '2026-05-03 19:46'
created_date: "2026-05-03 16:54"
updated_date: "2026-05-03 19:46"
labels: []
dependencies: []
documentation:
- 'doc-4 - CI Pipeline Porting Analysis: GitHub Actions → Tangled Spindles'
- "doc-4 - CI Pipeline Porting Analysis: GitHub Actions → Tangled Spindles"
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Port the entire GitHub CI pipeline (lint, test, deploy) to tangled.org. The current pipeline includes: linting (format, gettext, credo, sobelow, mix_audit, shellcheck, Docker image validation, asset build), testing (partitioned tests with coverage ≥75%), deployment (Coolify API trigger via hurl, health check, post-deploy verification), dependency submission reporting, and a manual verification workflow. The goal is to replicate this functionality on tangled.org as the CI provider.
<!-- SECTION:DESCRIPTION:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Cancelled. Two reasons:
1. **Dev/CI parity loss** — moving from mise (used in both local dev and GitHub Actions) to Nix-based tooling would create a divergence between how developers install tools and how CI does. Mise reads `mise.toml` directly; Spindle would require either mise-as-nixpkgs-dep (adding download latency) or custom Nix derivations (adding maintenance burden).
2. **No build artifact caching** — Spindle has no `actions/cache` equivalent. `mix deps`, `_build`, `node_modules`, and asset builds would recompile from scratch every run. With Elixir 1.20.0-rc.4 not in nixpkgs, even the toolchain download is uncached. Cold runs estimate 10-20 min vs ~5 min cached on GitHub Actions.
Future direction: evaluate Buildkite (free solo tier, can wire production server as runner) or similar provider that supports caching and keeps mise-based tooling.
<!-- SECTION:FINAL_SUMMARY:END -->
@@ -3,17 +3,18 @@ id: ML-16
title: Inconsistent HTTP timeout configuration across API clients
status: To Do
assignee: []
created_date: '2026-04-20 08:50'
created_date: "2026-04-20 08:50"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/163'
- "https://github.com/cloud8421/music_library/issues/163"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-05 · updated 2026-04-09 · closed 2026-04-08 · not planned_
## Summary
@@ -40,7 +41,9 @@ HTTP timeout configuration varies significantly across API integrations with no
3. Consider making timeouts configurable via each API's Config module
## Acceptance Criteria
<!-- AC:BEGIN -->
- All API clients have explicit, intentional timeout configuration
- Timeout choices are documented (e.g., in Config module comments)
<!-- SECTION:DESCRIPTION:END -->
@@ -3,22 +3,24 @@ id: ML-18
title: Three representations of artists without clear canonical source
status: To Do
assignee: []
created_date: '2026-04-20 08:50'
created_date: "2026-04-20 08:50"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/161'
- "https://github.com/cloud8421/music_library/issues/161"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-05 · updated 2026-04-09 · closed 2026-04-08 · not planned_
## Summary
Artist data exists in three different forms with no clear canonical source:
1. `Record` embeds `:artists` (embedded schema in record)
2. `ArtistRecord` — separate lookup table/view
3. `ArtistInfo` — external metadata store
@@ -40,7 +42,9 @@ Artist data exists in three different forms with no clear canonical source:
Document the purpose and canonical use case for each representation. Consider whether `ArtistRecord` (DB view) can be simplified or whether the embedded artists on Record should be the single source for record-artist relationships.
## Acceptance Criteria
<!-- AC:BEGIN -->
- Clear documentation of each representation's purpose
- Reduced confusion about which to use in new features
<!-- SECTION:DESCRIPTION:END -->
@@ -3,17 +3,18 @@ id: ML-19
title: Circular dependency between Records and Collection/Wishlist
status: To Do
assignee: []
created_date: '2026-04-20 08:50'
created_date: "2026-04-20 08:50"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/160'
- "https://github.com/cloud8421/music_library/issues/160"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-05 · updated 2026-04-09 · closed 2026-04-06 · not planned_
## Summary
@@ -37,7 +38,9 @@ _GitHub: created 2026-04-05 · updated 2026-04-09 · closed 2026-04-06 · not pl
Make Collection and Wishlist sub-modules of Records (`Records.Collection`, `Records.Wishlist`) or simple functions within Records that accept a filter parameter.
## Acceptance Criteria
<!-- AC:BEGIN -->
- No circular dependency between context modules
- Collection/Wishlist filtering remains functional
<!-- SECTION:DESCRIPTION:END -->
@@ -3,17 +3,18 @@ id: ML-20
title: Missing indexes on JSON extraction queries in ListeningStats
status: To Do
assignee: []
created_date: '2026-04-20 08:50'
created_date: "2026-04-20 08:50"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/159'
- "https://github.com/cloud8421/music_library/issues/159"
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-05 · updated 2026-04-12 · closed 2026-04-12 · not planned_
## Summary
@@ -38,7 +39,9 @@ CREATE INDEX idx_tracks_album_mbid ON tracks(json_extract(album, '$.musicbrainz_
Profile queries before and after to confirm impact.
## Acceptance Criteria
<!-- AC:BEGIN -->
- Expression-based indexes exist for hot JSON extraction paths
- Query plans show index usage for filtered ListeningStats queries
<!-- SECTION:DESCRIPTION:END -->
@@ -3,17 +3,18 @@ id: ML-23
title: StatsLive.Index runs 4+ sequential queries in mount
status: To Do
assignee: []
created_date: '2026-04-20 08:51'
created_date: "2026-04-20 08:51"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/156'
- "https://github.com/cloud8421/music_library/issues/156"
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-05 · updated 2026-04-09 · closed 2026-04-09 · not planned_
## Summary
@@ -35,7 +36,9 @@ _GitHub: created 2026-04-05 · updated 2026-04-09 · closed 2026-04-09 · not pl
Use `start_async` or `assign_async` to load stats data concurrently after mount, showing placeholder/loading states for each section.
## Acceptance Criteria
<!-- AC:BEGIN -->
- Stats page initial render is faster
- Data loads concurrently where possible
- Loading states are shown while data is fetched
@@ -3,17 +3,18 @@ id: ML-26
title: No retry/backoff strategy for non-Last.fm APIs
status: To Do
assignee: []
created_date: '2026-04-20 08:51'
created_date: "2026-04-20 08:51"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/153'
- "https://github.com/cloud8421/music_library/issues/153"
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-05 · updated 2026-04-09 · closed 2026-04-08 · not planned_
## Summary
@@ -39,7 +40,9 @@ Only the Last.fm integration has structured error responses with retry classific
3. Classify rate-limit responses separately from transient errors
## Acceptance Criteria
<!-- AC:BEGIN -->
- API-specific workers handle rate-limit responses with appropriate snooze durations
- Transient errors use exponential backoff rather than immediate retry
<!-- SECTION:DESCRIPTION:END -->
@@ -3,17 +3,18 @@ id: ML-27
title: 11 copy-pasted Oban workers for refresh operations
status: To Do
assignee: []
created_date: '2026-04-20 08:51'
created_date: "2026-04-20 08:51"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/152'
- "https://github.com/cloud8421/music_library/issues/152"
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-05 · updated 2026-04-12 · closed 2026-04-12 · not planned_
## Summary
@@ -31,7 +32,9 @@ Batch (5): `ArtistRefreshAllDiscogsData`, `ArtistRefreshAllMusicBrainzData`, `Ar
Consider a generic worker pattern or macro that accepts the delegated function as a parameter, reducing boilerplate while keeping each worker as a distinct module for queue routing.
## Acceptance Criteria
<!-- AC:BEGIN -->
- Boilerplate is reduced
- Each worker remains individually identifiable for Oban queue routing and monitoring
- No change in worker behaviour
@@ -3,17 +3,18 @@ id: ML-28
title: Records context has 8+ responsibilities
status: To Do
assignee: []
created_date: '2026-04-20 08:51'
created_date: "2026-04-20 08:51"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/151'
- "https://github.com/cloud8421/music_library/issues/151"
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-05 · updated 2026-04-11 · closed 2026-04-11 · not planned_
## Summary
@@ -33,6 +34,7 @@ The `Records` context module handles search, genre management, cover art operati
## Suggested Fix
Extract into focused sub-modules:
- `Records.Search` — search operations
- `Records.Metadata` — MusicBrainz sync, genre population
- `Records.Assets` — covers, colors
@@ -41,7 +43,9 @@ Extract into focused sub-modules:
Keep the `Records` module as the public API that delegates to sub-modules.
## Acceptance Criteria
<!-- AC:BEGIN -->
- Each sub-module has a single clear responsibility
- Public API remains unchanged for callers
- No regression in functionality
@@ -3,18 +3,19 @@ id: ML-3
title: Document intentional async-only coupling from Records to Artists
status: To Do
assignee: []
created_date: '2026-04-20 08:44'
updated_date: '2026-04-20 08:44'
created_date: "2026-04-20 08:44"
updated_date: "2026-04-20 08:44"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/181'
- "https://github.com/cloud8421/music_library/issues/181"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-04-16 · updated 2026-04-19 · closed 2026-04-19 · not planned_
## Summary
@@ -37,10 +38,13 @@ Add a short inline comment above each call site explaining:
# Records.create/delete -> Artists.refresh/prune (sync) -> Records (embedding regeneration)
Artists.refresh_artist_info_async(artist)
```
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 Inline comments added at records.ex:385 and :415
- [ ] #2 Comments explain the runtime-cycle motivation, not just "it's async"
<!-- AC:END -->
@@ -3,29 +3,30 @@ id: ML-66
title: Large modules unchanged since last audit
status: To Do
assignee: []
created_date: '2026-04-20 08:55'
created_date: "2026-04-20 08:55"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/109'
- "https://github.com/cloud8421/music_library/issues/109"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-03-12 · updated 2026-04-09 · closed 2026-03-16 · not planned_
## Description
The four modules flagged in #99 remain at the same size:
| File | LOC |
|------|-----|
| `lib/music_library_web/live/artist_live/show.ex` | 804 |
| File | LOC |
| ------------------------------------------------------- | --- |
| `lib/music_library_web/live/artist_live/show.ex` | 804 |
| `lib/music_library_web/components/record_components.ex` | 761 |
| `lib/music_library_web/components/record_form.ex` | 652 |
| `lib/music_brainz/api.ex` | 564 |
| `lib/music_library_web/components/record_form.ex` | 652 |
| `lib/music_brainz/api.ex` | 564 |
Not urgent — only refactor when new feature work naturally touches these files.
@@ -36,4 +37,5 @@ Monitor and consider extraction when adding new features to these modules.
## Source
From technical debt audit (2026-03-12). Continuation of #99.
<!-- SECTION:DESCRIPTION:END -->
@@ -3,17 +3,18 @@ id: ML-68
title: Random data in test fixtures
status: To Do
assignee: []
created_date: '2026-04-20 08:55'
created_date: "2026-04-20 08:55"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/107'
- "https://github.com/cloud8421/music_library/issues/107"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-03-12 · updated 2026-04-09 · closed 2026-03-16 · not planned_
## Description
@@ -36,4 +37,5 @@ Use deterministic sequences (e.g., based on `System.unique_integer`) or seeded r
## Source
From technical debt audit (2026-03-12). Residual from #85.
<!-- SECTION:DESCRIPTION:END -->
@@ -3,17 +3,18 @@ id: ML-69
title: ArgumentError raises in ScrobbleActivity
status: To Do
assignee: []
created_date: '2026-04-20 08:55'
created_date: "2026-04-20 08:55"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/106'
- "https://github.com/cloud8421/music_library/issues/106"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-03-12 · updated 2026-04-09 · closed 2026-03-14 · not planned_
## Description
@@ -27,4 +28,5 @@ Return `{:error, :invalid_options}` (or similar) and handle upstream with a user
## Source
From technical debt audit (2026-03-12).
<!-- SECTION:DESCRIPTION:END -->
@@ -3,17 +3,18 @@ id: ML-70
title: Bare catch blocks in telemetry storage
status: To Do
assignee: []
created_date: '2026-04-20 08:55'
created_date: "2026-04-20 08:55"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/105'
- "https://github.com/cloud8421/music_library/issues/105"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-03-12 · updated 2026-04-09 · closed 2026-03-16 · not planned_
## Description
@@ -27,4 +28,5 @@ Add `Logger.debug` calls inside the catch blocks to aid troubleshooting ETS tabl
## Source
From technical debt audit (2026-03-12).
<!-- SECTION:DESCRIPTION:END -->
@@ -3,17 +3,18 @@ id: ML-76
title: Large modules approaching refactoring threshold
status: To Do
assignee: []
created_date: '2026-04-20 08:57'
created_date: "2026-04-20 08:57"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/99'
- "https://github.com/cloud8421/music_library/issues/99"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-03-05 · updated 2026-03-06 · closed 2026-03-06 · not planned_
## Priority: Low
@@ -36,4 +37,5 @@ Monitor these modules and consider extraction when adding new features touches t
## Source
From technical debt audit (2026-03-05), updated 2026-03-06.
<!-- SECTION:DESCRIPTION:END -->
@@ -3,17 +3,18 @@ id: ML-89
title: Random data in test fixtures
status: To Do
assignee: []
created_date: '2026-04-20 08:57'
created_date: "2026-04-20 08:57"
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/85'
- "https://github.com/cloud8421/music_library/issues/85"
priority: low
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-02-17 · updated 2026-03-06 · closed 2026-03-06 · not planned_
## Priority: Low
@@ -29,4 +30,5 @@ Consider using deterministic sequences or seeded randomness for reproducible tes
## Source
From technical debt audit (2026-02-17), item #12.
<!-- SECTION:DESCRIPTION:END -->