Repository navigation
Make Favorites optional without discarding saved marks - #15
Merged
Merged
Conversation
Signed-off-by: Nikolai Berezovskii <nikolai@brzv.sk>
This was referenced Sep 18, 2026
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.
What this changes
Adds Enable Favorites in Settings, enabled by default. Turning it off hides stars and favorite actions/suggestions, removes any active Favorites search token, and presents history/search in normal recency order. Saved favorite marks, archive data and retention protection remain intact; turning the feature back on restores favorites presentation.
The store accepts an optional
favoritesFirstordering policy, defaulting to the existing behavior. Disabled favorites use a single bounded window across FTS search and live history, so old favorites cannot bypass paging or move cards around as the window grows. Pinboard order and Paste Stack are retained.Independent PR; no merge dependencies.
How you tested it
All 191 CopyCore tests passed. New tests cover disabled-mode paging/growth, text search, live observation, restored favorite-first ordering, preserved marks/retention and hidden suggestions.
Compiled and ran
Scripts/Tests/FavoritesSettingsTests.swiftwith the real SettingsStore: default-on, persistence, and callbacks passed.Xcode Debug build and
git diff --checkpassed.Isolated demo launch checks: enabled mode exposes favorite stars/divider; disabled mode exposes neither and retains Paste Stack and pinboards. Test-only launch harness opens the shelf automatically; it is not included in this PR. Interactive automation of the nonactivating panel is unreliable, so a live settings-toggle interaction is not claimed.
Every commit is signed off.
Engine changes include tests.
All three SPM pins are preserved.