Repository navigation
Conversation
aRustyDev
force-pushed
the
stack/2/bounded-playback-history
branch
from
October 30, 2026 03:33
75c7dd3 to
67e234e
Compare
aRustyDev
force-pushed
the
stack/2/bounded-playback-history
branch
from
October 30, 2026 03:47
67e234e to
d766404
Compare
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.
TL;DR
Go back to a recently played track without downloading it again. Keep up to 11 tracks in memory for the current session, preserving pause state and the terminal layout.
Important
#blocked-by #139 (which is blocked by #138)
Please wait for #138 and #139 to merge before reviewing this PR. The Files changed tab includes their configuration and testing work because this PR targets
main. After they merge, I’ll rebase this branch so the diff contains only bounded history and Previous controls.History is independent of #140. Incremental history diff for reference.
Changes
Add
Previousthrough configurablebindings.previous(defaulth), terminalTrackPrevious, and Linux MPRIS. Navigation follows these rules:Keep compressed audio for up to 11 tracks, evicting the oldest when full. Preserve pause state across transitions. Publish MPRIS Previous availability as navigation becomes possible. Windows SMTC Previous remains unavailable; displayed terminal controls stay unchanged.
Document cursor movement, retained forward tracks, restart/loading transitions, and coalesced notifications beside the code. Explain how automatic completion differs from an explicit Next command.
Why this approach
Once Lowfi advances, the previous track is otherwise lost. Retaining compressed tracks makes back/forward navigation immediate without keeping decoded audio or writing a persistent history database.
A fixed track count limits growth, though memory use still depends on track sizes. An unbounded history would keep growing, while re-downloading would add latency and another failure point. Completion and restart-threshold notifications carry a playback generation so an old event cannot advance a replacement track or change its capabilities. Tests exercise the actual waiter notifications as well as player transitions.
Validation
60 default Cargo tests passed on macOS, including eviction, restart thresholds, forward traversal, pause preservation, stale events, loading transitions, and bindings. Formatting, default/no-default Nextest, feature checks, and mutation inventories passed. Native Linux MPRIS suites passed. Private-item documentation passes with broken rustdoc links denied; live D-Bus publication was not exercised.