Commit Graph

2946 Commits

Author SHA1 Message Date
Claudio Ortolina cd0101ba4a Make page_title/2 private in all LiveViews
The Index modules were calling Show.page_title/2 for modal edit
routes. Inlined the logic as private functions in each Index
module and removed the now-unused Show aliases.

Closes #104
2026-03-12 07:44:39 +00:00
Claudio Ortolina 8d9bf78974 Extract shared TopByPeriod LiveComponent
Closes #103
2026-03-12 07:38:58 +00:00
Claudio Ortolina f0151de808 Force Node.js 24 on test/deploy CI
Following a deprecation from GitHub:
> ! Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: erlef/setup-beam@v1. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
2026-03-11 15:59:32 +00:00
Claudio Ortolina a1b56673e4 Remove unused copilot instructions 2026-03-11 15:48:19 +00:00
Claudio Ortolina f42c449213 Update two frontend asset directives to conform with Phoenix 1.8.5 2026-03-11 15:43:37 +00:00
Claudio Ortolina c4bbd7a0f6 Add counter for errored requests 2026-03-11 11:33:11 +00:00
Claudio Ortolina 5ddc9ae466 Add metrics for requests by status code 2026-03-11 11:14:07 +00:00
Claudio Ortolina b4ef1df96a Allow running head 2026-03-11 10:53:35 +00:00
Claudio Ortolina 420614c490 Update architecture and project conventions docs 2026-03-11 10:49:41 +00:00
Claudio Ortolina 1583db581c Add update-documentation skill 2026-03-11 10:44:56 +00:00
Claudio Ortolina 159d5ad695 Include more maintenance tasks
- Asset tasks
- Records on this day email
2026-03-11 09:31:59 +00:00
Claudio Ortolina 97e9cdf6c4 Spell out Purchased on label in records email 2026-03-11 08:40:42 +00:00
Claudio Ortolina d516c6a815 Improve tests for scrobble show page 2026-03-10 21:04:19 +00:00
Claudio Ortolina 20b497bbb8 Don't track route not found errors 2026-03-10 20:05:27 +00:00
Claudio Ortolina fa535393e0 Fix toggling/scrobbling event handlers in scrobble anything show view 2026-03-10 20:04:39 +00:00
Claudio Ortolina a6727d5a16 Update dependencies
igniter: 0.7.3 → 0.7.4
phoenix_live_view: 1.1.26 → 1.1.27
2026-03-10 17:02:14 +00:00
Claudio Ortolina 829d49fcf7 Fix deployment test script 2026-03-10 16:15:22 +00:00
Claudio Ortolina 59ac2a503f Space out lines a bit more 2026-03-10 15:13:28 +00:00
Claudio Ortolina 43dc81d051 Assert that generated PDF file always has one page 2026-03-10 15:09:33 +00:00
Claudio Ortolina 95302e069b Improve column detection heuristics 2026-03-10 14:56:25 +00:00
Claudio Ortolina 47ff505fa9 Refactor pdf rendering to use page-level columns 2026-03-10 14:22:11 +00:00
Claudio Ortolina 04955bff84 Fix notification skipping 2026-03-10 08:44:27 +00:00
Claudio Ortolina 8347bd04e8 Skip notifications for muted errors 2026-03-10 08:22:21 +00:00
Claudio Ortolina f86800368d Streamline test suite
record_set_live/index_test.exs — Removed 3 describe blocks ("Delete set", "Remove record from set", "Drag-and-drop reorder") that were duplicated in ShowTest. Removed 3 tests.

record_set_live/show_test.exs — Replaced context-level assertion in "Remove record" with UI assertion (refute has_element?). Removed redundant assert_raise from "Delete set" (kept assert_redirect).

scrobble_rules_live/index_test.exs — Removed "Form validation" describe block (2 tests duplicated in "saves new scrobble_rule" and changeset tests). Kept the "updates form labels" test, moved into "Index"
  block. Replaced ScrobbleRules.get_scrobble_rule! assertions in toggle test with UI assertions checking button text.
online_store_template_live/index_test.exs — Replaced context-level assertions with UI assertions in Create, Edit, Delete, and Toggle tests. Removed OnlineStoreTemplates alias.

scrobbled_tracks_live/index_test.exs — Collapsed 3 search tests into 1. Removed 2 tests.
2026-03-09 18:55:07 +00:00
Claudio Ortolina 3ddb287187 Fix csp directives for online store template logos 2026-03-09 18:30:29 +00:00
Claudio Ortolina 93aed6c310 Update npm dependencies
barcode-detector 3.1.0 => 3.1.1
2026-03-09 17:12:17 +00:00
Claudio Ortolina c352ad4809 Can print an individual medium tracklist 2026-03-09 14:52:26 +00:00
Claudio Ortolina 4c6baa6e13 Improve printout PDF layout
Support multiple columns in case the tracklist is long, or there's
multiple media.
2026-03-09 14:44:28 +00:00
Claudio Ortolina 347b80fe59 Update dependencies
usage_rules 1.2.4 => 1.2.5
2026-03-09 13:43:09 +00:00
Claudio Ortolina 4569c6727e Add function to download a record's tracklist for printing 2026-03-09 13:39:12 +00:00
Claudio Ortolina 1bc01a2346 Fix flaky collection live index test 2026-03-09 13:38:24 +00:00
Claudio Ortolina 7e515f61a7 Update dependencies
telemetry 1.4.0 → 1.4.1
2026-03-09 10:01:07 +00:00
Claudio Ortolina cca32b51ee Remove stray file 2026-03-09 08:16:14 +00:00
Claudio Ortolina f9845e8b7c Dry up CSP policies 2026-03-08 19:56:05 +00:00
Claudio Ortolina 77c45bddc6 Update CSP policies for musicbrainz covers + fallbacks 2026-03-08 19:54:00 +00:00
Claudio Ortolina 27519fca29 Fix CSP for images from brave 2026-03-08 19:47:43 +00:00
Claudio Ortolina 59616e58b5 Allow LiveDebugger origins in dev 2026-03-08 19:44:41 +00:00
Claudio Ortolina 4f8e2dc6e2 Update architecture docs 2026-03-08 14:04:23 +00:00
Claudio Ortolina b30f0fa1ee Add metrics around image resize/convert/dominant color extration 2026-03-08 13:56:31 +00:00
Claudio Ortolina 4584b7bcb8 Remove drop down from record set items
Have just a bin icon, and rely on drag and drop.

This solves a massive performance issue with the page, which is
traceable to the Fluxon dropdowns, particularly the Class.merge logic
used to merge Tailwind classes
2026-03-08 13:21:33 +00:00
Claudio Ortolina d76471b03e Use MDEx to consolidate Markdown handling 2026-03-08 09:31:09 +00:00
Claudio Ortolina ea8318c5fc Add update-dependencies skll 2026-03-08 09:09:33 +00:00
Claudio Ortolina 9433419576 Update mise run dev:outdated with instructional output 2026-03-08 08:57:36 +00:00
Claudio Ortolina fd9f3e7c0c WIP 2026-03-08 08:51:54 +00:00
Claudio Ortolina e4d03a19e4 Compute in advance all needed assigns in record_set_card
Theory is that this makes change tracking easier, and therefore
rendering more performant.
2026-03-07 23:52:32 +00:00
Claudio Ortolina 1bfe501b3d Split strings for readability 2026-03-07 23:44:00 +00:00
Claudio Ortolina 05354b9f78 Explain the CSP policies 2026-03-07 23:40:40 +00:00
Claudio Ortolina 46da8eea38 EXP: fix CSP issues for /dev routes 2026-03-07 21:07:24 +00:00
Claudio Ortolina 41480316c2 Fix CSP settings
⏺ Here's a breakdown of each directive:

  ┌─────────────────┬────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
  │    Directive    │                     Value                      │                                                         Purpose                                                         │
  ├─────────────────┼────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ default-src     │ 'self'                                         │ Fallback for any resource type not explicitly listed — only allow from the app's own origin                             │
  ├─────────────────┼────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ script-src      │ 'self'                                         │ JavaScript can only be loaded from the app's origin (no external scripts, no inline)                                    │
  ├─────────────────┼────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ style-src       │ 'self' 'unsafe-inline' https://rsms.me         │ Stylesheets from the app's origin, inline styles (needed by LiveView), and the https://rsms.me/inter/ hosted on rsms.me │
  ├─────────────────┼────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ font-src        │ 'self' https://rsms.me                         │ Font files from the app's origin and rsms.me (Inter font)                                                               │
  ├─────────────────┼────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ img-src         │ 'self' data: https://lastfm.freetls.fastly.net │ Images from the app's origin, data: URIs (inline base64 images), and Last.fm's CDN for album/artist artwork             │
  ├─────────────────┼────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ connect-src     │ 'self'                                         │ XHR/fetch/WebSocket connections only to the app's origin (covers LiveView's WebSocket)                                  │
  ├─────────────────┼────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ frame-ancestors │ 'self'                                         │ The app can only be embedded in iframes by itself (clickjacking protection)                                             │
  ├─────────────────┼────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
  │ base-uri        │ 'self'                                         │ Restricts <base> tag to the app's origin (prevents base tag injection attacks)                                          │
  └─────────────────┴────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

  Notable things not allowed by this policy:
  - No inline <script> tags or eval()
  - No external JavaScript from CDNs
  - No embedding in third-party iframes
  - No connections to external APIs from the browser (all external API calls go through the server)
2026-03-07 19:13:48 +00:00
Claudio Ortolina 3938cbaf54 Run sobelow on CI 2026-03-07 19:09:02 +00:00