From bfebc3680103b88139aeacae71e0093ba4d9e612 Mon Sep 17 00:00:00 2001 From: JohnBaumb <80135794+JohnBaumb@users.noreply.github.com> Date: Tue, 21 Apr 2026 23:40:05 -0700 Subject: [PATCH] Split monolithic script.js (78K lines) into 17 domain modules Extracts the single 77,957-line script.js into focused modules: core.js (874) - Global state, confirm dialog, websocket, constants init.js (2358) - Initialization, personal settings, navigation media-player.js (2398) - Media player, audio, visualizer, radio settings.js (3657) - Settings page, quality profiles, API keys, auth search.js (1542) - Search functionality, page data loading sync-spotify.js (2538) - Spotify sync, YouTube backend, hero section downloads.js (6398) - Wing It, batched polling, cancel, notifications wishlist-tools.js (7234) - Wishlist, matched downloads, tools, retag sync-services.js (9076) - Tidal, Deezer, Beatport, YouTube, ListenBrainz sync artists.js (4610) - Artists page, artist downloads api-monitor.js (3798) - API rate monitor gauges library.js (6652) - Library, artist detail, enhanced management beatport-ui.js (3902) - Beatport sliders, genre browser discover.js (8920) - Discover page and all sub-sections enrichment.js (3551) - All enrichment workers, library repair stats-automations.js (7575) - Stats, automations, issues, import pages-extra.js (2874) - Playlist explorer, server playlists, active downloads Load order: core.js first (globals), init.js last (DOMContentLoaded). All other modules define functions and load in any order. No functional changes - pure extraction along existing section boundaries. --- webui/index.html | 19 +- webui/static/api-monitor.js | 3799 ++ webui/static/artists.js | 4611 ++ webui/static/beatport-ui.js | 3903 ++ webui/static/core.js | 875 + webui/static/discover.js | 8921 ++++ webui/static/downloads.js | 6399 +++ webui/static/enrichment.js | 3552 ++ webui/static/init.js | 2359 + webui/static/library.js | 6653 +++ webui/static/media-player.js | 2399 + webui/static/pages-extra.js | 2875 + webui/static/script.js | 77957 ---------------------------- webui/static/search.js | 1543 + webui/static/settings.js | 3658 ++ webui/static/stats-automations.js | 7576 +++ webui/static/sync-services.js | 9077 ++++ webui/static/sync-spotify.js | 2539 + webui/static/wishlist-tools.js | 7235 +++ 19 files changed, 77992 insertions(+), 77958 deletions(-) create mode 100644 webui/static/api-monitor.js create mode 100644 webui/static/artists.js create mode 100644 webui/static/beatport-ui.js create mode 100644 webui/static/core.js create mode 100644 webui/static/discover.js create mode 100644 webui/static/downloads.js create mode 100644 webui/static/enrichment.js create mode 100644 webui/static/init.js create mode 100644 webui/static/library.js create mode 100644 webui/static/media-player.js create mode 100644 webui/static/pages-extra.js delete mode 100644 webui/static/script.js create mode 100644 webui/static/search.js create mode 100644 webui/static/settings.js create mode 100644 webui/static/stats-automations.js create mode 100644 webui/static/sync-services.js create mode 100644 webui/static/sync-spotify.js create mode 100644 webui/static/wishlist-tools.js diff --git a/webui/index.html b/webui/index.html index 85eb9885..7d83e32d 100644 --- a/webui/index.html +++ b/webui/index.html @@ -8000,7 +8000,24 @@ -
+ !-- Split modules (was: script.js) — core.js must load first, init.js last --> + + + + + + + + + + + + + + + + +