Commit Graph

288 Commits

Author SHA1 Message Date
Claudio Ortolina 2983313426 ML-192: add high value missing tests
- Record editing + cover search
- Barcode scan errors + cart editing
- Notes
- Scrobble rules application over set of tracks
- Image conversion
2026-05-21 06:38:02 +01:00
Claudio Ortolina 23960b5b23 ML-169.10.1: Add delete coverage
Cover current delete behavior across LiveView index and show paths, and strengthen existing delete tests with persistence assertions.\n\nValidation: mise run dev:precommit
2026-05-20 18:04:29 +01:00
Claudio Ortolina 73046bb0f5 ML-190: fix record subscription lifecycle 2026-05-19 12:10:34 +01:00
Claudio Ortolina e204e555bd ML-188: guard PubSub record updates during edit mode
Add live_action guard to handle_info({:update, record}) in both
CollectionLive.Show and WishlistLive.Show. When the user is editing,
background worker updates are skipped and a warning toast is shown
instead of overwriting the socket. Normal show-mode updates and
mismatched-ID no-ops are unchanged.

6 tests added covering all three code paths.
2026-05-19 11:38:42 +01:00
Claudio Ortolina 4ae55ea0ad Use negative assertion to debug CI failures 2026-05-17 21:34:00 +01:00
Claudio Ortolina 122c07836b ML-182.5: migrate blocked LiveView tests
Replace direct LiveView PID and isolated component test patterns with PhoenixTest-backed page flows while keeping narrow unwrap bridges where PhoenixTest cannot express the component interaction.

Precommit: mise run dev:precommit
2026-05-17 21:24:29 +01:00
Claudio Ortolina a630c58578 Once again, increase timeout due to CI performance 2026-05-16 22:41:50 +01:00
Claudio Ortolina 90ac4fa23a Extract LiveView async test helper 2026-05-16 22:27:46 +01:00
Claudio Ortolina 4fa05d6ad1 Make test wait longer due to CI performance 2026-05-16 22:16:09 +01:00
Claudio Ortolina 5212b8607e Reduce api medium cover size to 400px 2026-05-16 17:46:47 +01:00
Claudio Ortolina 9f5a26198f ML-182.4: convert tests to phoenix_test 2026-05-16 16:30:42 +01:00
Claudio Ortolina 07d65fe78f ML-182.3: finish wave-3 of conversion LiveViewTest to PhoenixTest 2026-05-16 15:23:53 +01:00
Claudio Ortolina b4710e10c8 ML-185.1: expose named cover sizes in collection API 2026-05-15 22:49:06 +01:00
Claudio Ortolina 8391cf275a ML-180: remove backup download feature
Delete ArchiveController, its routes, the maintenance UI backup
button, and the test file. Management scripts and Litestream
supersede this functionality.
2026-05-15 07:13:33 +01:00
Claudio Ortolina 73c469e83d ML-182.3: migrate scrobble rules tests to PhoenixTest 2026-05-15 07:00:15 +01:00
Claudio Ortolina 9eda49ed46 ML-182.3: migrate record_set/show tests to PhoenixTest 2026-05-15 06:47:25 +01:00
Claudio Ortolina bd09840443 ML-182.3: convert record_set_live/index_test to PhoenixTest 2026-05-15 06:31:50 +01:00
Claudio Ortolina 2237c7db20 ML-182.3: partial progress in conversion 2026-05-14 23:23:15 +01:00
Claudio Ortolina dda700ad96 ML-182: convert 4 test files to PhoenixTest only
Waves 1-2: scrobble_live/index, scrobbled_tracks_live/index, release_group_show, release_show. Dropped unwrap/2 bridges and page_title/1 usage. Search form tests use visit with query params. page_title tests use assert_has("title", ...).
2026-05-14 23:22:02 +01:00
Claudio Ortolina a59dd22a18 ML-168: broadcast index_changed event after background import
Import workers now broadcast :records_index_changed on
"records:index_changed" after successful import via
Records.broadcast_index_changed/0.

CollectionLive.Index and WishlistLive.Index subscribe to the
topic in mount/3 and reload their record streams on receipt,
with a live_action guard to skip reloads when the grid is
hidden behind a modal (:import, :barcode_scan).

IndexActions.handle_index_changed/1 refreshes total_entries
before reloading to keep the pagination bar accurate.
2026-05-14 17:15:06 +01:00
Claudio Ortolina ba62d54cc5 ML-177: implementation 2026-05-10 20:39:18 +01:00
Claudio Ortolina a3bc6d7cf3 ML-176.1: support search in collection api controller 2026-05-10 14:52:01 +01:00
Claudio Ortolina 621b35d824 Open universal search modal instantly via client-side JS
Replace phx-click server event with Fluxon.open_dialog for zero-latency
modal opening. The modal DOM is now always present (no :if conditional) so
it can be shown instantly; the server syncs state in the background.

Fix test selectors that now match the always-present modal form by scoping
to forms without phx-target (which the modal form always has).
2026-05-07 20:43:15 +01:00
Claudio Ortolina 0a9fafd35e Add micro_cover_url 2026-05-05 23:22:37 +01:00
Claudio Ortolina be76d0f214 Provide mini covers (150px) 2026-05-05 16:33:43 +01:00
Claudio Ortolina cccd28a9f9 ML-165: implementation 2026-05-05 13:43:18 +01:00
Claudio Ortolina 1ddef07bcc fix(api): handle non-integer error ids, clamp negative pagination params
- show/2: use case instead of bare Integer.parse match so
  /api/v1/errors/not-an-id returns 404 instead of crashing
- index/2: clamp limit to >= 1 and offset to >= 0 to prevent
  SQLite from treating negative values as unlimited
- Add 3 tests: non-integer id 404, negative limit/offset clamping
2026-05-04 14:17:45 +01:00
Claudio Ortolina 51bd24d5b4 ML-162: enable /api/v1/errors endpoint 2026-05-04 13:14:40 +01:00
Claudio Ortolina c489fde1cc ML-152: add /api/v1/ version prefix to all API routes 2026-04-30 11:57:43 +01:00
Claudio Ortolina f2839dfaf1 Test needs to be sync 2026-04-29 22:50:29 +01:00
Claudio Ortolina 252caf31ce ML-11: Improve performance of Telemetry.Storage with in-memory buffer 2026-04-24 10:30:28 +01:00
Claudio Ortolina 0784fc5e0c Fix page title for scrobble anything release page 2026-04-23 21:06:32 +01:00
Claudio Ortolina 1bd5707cb4 Fix page title for scrobble anything index and release group route 2026-04-23 21:06:12 +01:00
Claudio Ortolina 8911afad94 Add tests for Top Albums component 2026-04-23 16:41:44 +01:00
Claudio Ortolina c7c7e1fe4e Navigate from scrobble search to release-group page 2026-04-23 14:47:50 +01:00
Claudio Ortolina 0dcd6eab83 Replace /scrobble/:release_id with nested route 2026-04-23 14:39:26 +01:00
Claudio Ortolina d8041dc0dd Add /scrobble/:rg_id release-group page 2026-04-23 14:35:58 +01:00
Claudio Ortolina 4c48bda7b2 Refactor Release component to take release_id 2026-04-23 14:19:11 +01:00
Claudio Ortolina f7f38d580e Enable unaliased modules ex_slop check 2026-04-22 20:37:09 +01:00
Claudio Ortolina 0776700170 ML-142: Improve scrobble UI in the release component
- Sticky bar for easier track-based scrobbling
- Support setting custom finish time
2026-04-22 17:19:35 +01:00
Claudio Ortolina 9851a5c6bf Use cart with barcode scanner 2026-04-20 15:46:40 +01:00
Claudio Ortolina eaece07193 Count formats in results 2026-04-20 15:15:29 +01:00
Claudio Ortolina c4ebe636ff Fix ML-143 review: security, worker, and test improvements
Closes ML-143 review findings:
- cast_id/1 uses Integer.parse instead of String.to_integer
- add_to_cart validates against server-side release_groups
- JS.push payload trimmed to {id, format} only
- Oban.insert_all result checked for partial failures
- handle_async success resets @importing? to false
- ImportFromMusicbrainzReleaseGroup gets unique constraint
- Record.parse_datetime/1 made public with safe match
- Workers delegate to Record.parse_datetime/1
- Test coverage: change_format, clear_cart, wishlist single import
2026-04-20 15:15:29 +01:00
Claudio Ortolina 3f5ce060b1 Implement ML-143: Cart-style multi record import
Closes ML-143.
2026-04-20 15:15:29 +01:00
Claudio Ortolina a6319d55df Pin artist_live/show image_data_hash assertions
Refs #176
2026-04-20 06:50:04 +01:00
Claudio Ortolina 0dcfecf741 Increase render_async timeout to cater for slower CI 2026-04-19 09:29:04 +01:00
Claudio Ortolina f4db063298 Test artist edit form and record set picker flows
Closes #180
2026-04-19 09:00:06 +01:00
Claudio Ortolina 22a47f4ca9 Add tests for previously uncovered modules 2026-04-19 07:47:20 +01:00
Claudio Ortolina 94143010c0 Fix doubly-wrapped safe tuple in artist bio render 2026-04-17 16:00:22 +01:00
Claudio Ortolina 90838d1a3f Add tests for RecordActions and Chat component
Covers all action handlers on LiveHelpers.RecordActions and all
update/event clauses on Components.Chat — including streaming
chunk/done/error transitions and the retry re-send path.

Closes #179
2026-04-17 07:01:07 +01:00