Skip to content

fix(gui): retain Subsonic covers for current rows - #1165

Merged
LargeModGames merged 1 commit into
mainfrom
fix/gui-cover-references
Nov 25, 2026
Merged

LargeModGames merged 1 commit into
mainfrom
fix/gui-cover-references

Conversation

@kapok-4o

@kapok-4o kapok-4o commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Large Subsonic lists could lose their first cover references at the registry's 4096-entry limit.
Keep the covers used by the latest rows on each GUI channel. Release a cover once no current channel uses it.
An older channel revision can only reuse references that are still active.

Testing

Ran on macOS arm64 after rebasing onto upstream 536f080, with isolated app and temporary paths.

$ GUI_FEATURES=telemetry,gui,streaming,discord-rpc,self-update,scripting,mcp-server,mpris,local-files,subsonic,internet-radio,youtube,qobuz,audio-viz,audio-viz-cpal

$ cargo fmt --all --check
Exit 0. No output.

$ cargo clippy --locked --no-default-features --features telemetry,tui -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.36s

$ cargo clippy --locked -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.42s

$ cargo check --locked --no-default-features --features "$GUI_FEATURES"
Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.06s

$ cargo clippy --locked --no-default-features --features "$GUI_FEATURES" -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.02s

$ cargo test --locked --no-default-features --features "$GUI_FEATURES" gui::covers::tests::
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 2493 filtered out; finished in 0.05s

$ cargo test --locked --no-default-features --features telemetry,tui
test result: ok. 2050 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.70s

$ cargo test --locked --no-default-features --features "$GUI_FEATURES"
test result: FAILED. 2466 passed; 5 failed; 30 ignored; 0 measured; 0 filtered out; finished in 6.73s

$ cargo test --locked --no-default-features --features "$GUI_FEATURES" typescript_bindings_are_written_to_the_frontend_source_tree
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2500 filtered out; finished in 0.32s

The full runs fail only the cli::plugin::tests git-transport tests: the local Homebrew git 2.51.1 answers transport 'ext' not allowed. They fail the same way on upstream 536f080 here and are not touched by this change.

The regression failed with test-only changes on upstream 810e19d.

The bindings test produced no diff.

The test-directory cleanup case passed on its own and in the GUI suite rerun.

Additional notes

This follows up on the GUI cover proxy. #1006

The checks used local fixtures. Live Subsonic and interactive GUI sessions were unverified.

Summary by CodeRabbit

  • Bug Fixes
    • Covers now remain visible for large Subsonic lists when queue or search results change.
    • Cover references are retained when shared across channels and released when no longer referenced.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The cover registry now tracks references by GUI channel and revision instead of evicting entries at a global limit. Current messages update channel references, while stale messages cannot register new covers or replace stored channel state.

Changes: GUI cover reference retention

Layer / File(s) Summary
Channel-scoped cover registry
src/gui/covers.rs
The registry stores each channel's revision and referenced cover IDs. The global cover-count limit is removed.
Revision-aware rewriting and reference lifecycle
src/gui/covers.rs, changelog.d/fixed/gui-subsonic-cover-references.md
Rewriting tracks cover IDs by message revision. Replacing channel state releases references that no other channel uses. Tests cover large lists, shared references, and stale revisions. The changelog records the large-list cover behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to eb4c0

This change keeps covers for the current rows of large Subsonic lists from being dropped when the registry fills up. No concrete merge-blocking risk was found, and the new tests cover the changed behavior.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix(gui): retain Subsonic covers for current rows" uses a conventional-commit prefix (fix) with a scope (gui), which matches the required format. It is concise and imperative. The changeset…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(gui): retain Subsonic covers for current rows" uses a conventional-commit prefix (fix) with a scope (gui), which matches the required format. It is concise and imperative. The changeset matches the title: src/gui/covers.rs now retains cover references per channel and revision so that covers for current rows survive the former 4096-entry eviction, and the changelog entry documents the same fix.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 536f080 and eb4c078.

Files selected for processing: 2

  • changelog.d/fixed/gui-subsonic-cover-references.md
  • src/gui/covers.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@LargeModGames
LargeModGames merged commit 00a91d7 into main Nov 25, 2026
39 checks passed
@LargeModGames
LargeModGames deleted the fix/gui-cover-references branch November 25, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants