refactor(lib_commands): drop super::* + glob re-export in ui + cache

Hotspot G first slice — replace the cascade-import pattern in
lib_commands/ui/ and lib_commands/cache/ with explicit per-symbol
imports + per-command re-exports.

ui/mod.rs no longer reaches `pub(crate) use mini::*; pub(crate) use
bandsintown::*;` — instead it explicitly re-exports the 8 mini-player
Tauri commands + the 3 internal helpers consumed by lib.rs +
sync/tray.rs (PAUSE_RENDERING_JS, RESUME_RENDERING_JS,
persist_mini_pos_throttled), and fetch_bandsintown_events.

cache/mod.rs likewise lists each Tauri command from offline / hot /
downloads explicitly. The only cross-crate "internal" re-export is
`enqueue_analysis_seed` which analysis_runtime depends on.

Inside the .rs files: every `use super::*` is replaced with the
specific imports actually needed (super::offline::..., crate::audio,
crate::analysis_runtime::..., tauri::Manager, etc.).

Behaviour-preserving — no Tauri command name changed, no runtime
behaviour shift. Just removes the leak-everything-everywhere import
graph that cucadmuh's policy doc forbids.
This commit is contained in:
Psychotoxical
2026-05-08 16:18:51 +02:00
parent f43ab94cc1
commit 409d8fa964
6 changed files with 41 additions and 13 deletions
+6 -1
View File
@@ -1,4 +1,9 @@
use super::*;
use crate::audio;
use crate::subsonic_wire_user_agent;
use super::super::file_transfer::stream_to_file;
use super::downloads::{resolve_hot_cache_root, HotCacheDownloadResult};
use super::offline::{enqueue_analysis_seed, enqueue_analysis_seed_from_file};
#[tauri::command]
pub(crate) async fn download_track_hot_cache(