Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Adds an opt-in Lite mode (Settings > Appearance) that stops the app's continuous repaints: artwork washes and blur, artwork-accent crossfade, marquee and smooth-scroll animations, and per-frame progress updates all go quiet, so a machine whose GPU is busy elsewhere can hold a smooth frame. A companion Linux-only switch arms it automatically while any GPU is pegged (15 s /sys gpu_busy_percent poll, 85%/45 s arm, 40%/2 min disarm, runtime-only state); LIMUSIC_FORCE_GPU_BUSY overrides the readings for testing. Playback and audio are untouched.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(ui): lite mode for GPU-starved machines, armed by GPU load
Closes #549
Why
The app repaints continuously in several places even when nothing is happening: the marquee
loop, the artwork wash and its blur, the artwork-accent crossfade, smooth-scroll lyrics, and
the per-frame progress bar. On a machine with GPU headroom that is invisible. On a machine
where the GPU is busy with something else, it is the difference between a smooth UI and a
stuttery one.
My machine is the extreme version of that: two Radeon R9700s pinned at 100% by local
inference all day, and a 5120×2880@120 display driven by the CPU's 2-CU iGPU. The iGPU has no
bandwidth left to give, so scrolling the library and the queue felt choppy while the desktop
itself was fine. This is the same class of machine as #311 and #302 (UHD 620 / integrated
graphics reports), and the same territory
docs/UI-PERFORMANCE.mdalready works in — thosefixes help every machine, this adds a switch for the ones that need more.
What
Lite mode (Settings → Appearance). When on, the constant repainters go quiet:
gradients drop to the flat surfaces that already exist
.literoot class zeroes CSS animations and transitions as a backstopNothing is relayouted and no colours are redefined — the same theme, just not animating.
Arm automatically when a GPU is busy (same settings section, Linux only). Turns lite mode
on by itself while a GPU is pegged and back off once it settles, so you don't have to think
about it:
/sys/class/drm/card*/device/gpu_busy_percent(std-only, no newdependencies; the pure read takes a base path so the tests feed it a fake sysfs tree)
40% for eight samples (~2 min), with dwell on both sides so a bursty GPU can't flap it
LIMUSIC_FORCE_GPU_BUSY=<0-100>overrides the reading, so the behaviour is testable withoutloading a GPU
Not touched
crates/(player, innertube, listen-protocol),tauri.conf.json,Cargo.toml/Cargo.lock,player_configs.json, the updater and.github/are all at zero diff — this is additive UIstate plus one read-only Linux command. Playback and audio quality are completely
untouched; the mode changes what is painted, never what is decoded. Lite mode is off by
default and the normal rendering path is byte-for-byte unchanged when it is off.
What I tested
cargo fmt --all --checkcleancargo test --allgreen — including three new unit tests: parses real readings and paddedzeros, skips connector dirs and non-numeric counters,
[]on an unreadable base instead ofpanicking, and the force-seam override
cargo clippy --all-targets: no new findings (the existing ones inlyrics.rs,state.rs,discord.rs,crates/are pre-existing and untouched)pnpm check: 0 errors, 0 warnings ·pnpm test: 22/22 self-checks ·pnpm build: cleanthe library and queue goes away; playback, gapless transitions and lyrics sync unchanged.
The auto-arm seam was verified with
LIMUSIC_FORCE_GPU_BUSY=95(arms within ~45 s, washflattens without any saved setting changing) and
=0(disarms within ~2 min).Generated with AI
Per CONTRIBUTING: this code was written by a locally-hosted Qwen3.8-27B model, driven from
a written plan by its operator (me), with every gate re-run independently by me after the run
and the deviations recorded. I've read the diff and take responsibility for it.
Opened as a draft pending agreement on scope in #549 (their CONTRIBUTING asks for that first).