Fix/factory presets unhide#5
Merged
Merged
Conversation
Factory presets could silently disappear from the UI dropdown, leaving as few as one visible (a friend's Windows CLAP showed only "hh"). Root cause: "deleting" a factory preset was implemented as a persistent, per-user hide written to hidden_presets.txt, which list_all() filtered out. The DEL button snaps to index 0 after each delete, so repeated clicks cascaded through the whole factory bank, hiding it one entry at a time, with no UI to undo it and no diagnostics. The Slammer->Niner whole-dir migration could also carry a stale hidden list across. It is platform-independent: the shipped v1.0.1 Windows binary contains all 14 presets (verified), so it was never a build/bundling issue. Fix (remove factory-hide + auto-heal): - list_all() no longer honors hidden_presets.txt; factory presets are always listed, so every affected install recovers on next launch. - PresetManager::load() deletes any stale hidden_presets.txt on startup (also neutralizes the migration vector) and logs factory/user counts, the diagnostics that were missing. - delete() refuses factory presets (surfaced via the existing status line) instead of hiding them; user presets still delete as before. - Remove the now-dead load_/persist_hidden_factories helpers. Add regression tests that fail pre-fix: a planted hidden_presets.txt no longer suppresses factories (14, was 1), and deleting a factory is refused. Fix the wrong Windows data-dir path in the paths.rs doc. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Version drives the GUI/log/feedback-URL strings via CARGO_PKG_VERSION, so this bump updates them everywhere. README download links point at /releases/latest and need no change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
P1: factory presets vanish (only 1 shows)
A friend's v1.0.1 Windows CLAP showed only 1 factory preset (
hh) instead of 14.Root cause (confirmed)
include_str!. I grepped the shipped v1.0.1 Windowsniner.clap/.vst3and all 14 are present, so it was never a build/bundling issue.list_all()'shidden_factoriescheck, fed byhidden_presets.txt. "Deleting" a factory preset was a silent, permanent, per-user hide, and the DEL button snaps to index 0 after each delete, so repeated DEL clicks cascade through the whole factory bank, hiding it one entry at a time, with no un-hide UI and no diagnostics. The Slammer -> Niner whole-dir migration could also carry a stale hidden list across.Fix: remove factory-hide + auto-heal
list_all()no longer honorshidden_presets.txt; factory presets are always listed, so every affected install recovers on next launch with no user action.PresetManager::load()deletes any stalehidden_presets.txton startup (also neutralizes the migration vector) and logs factory/user counts (the diagnostics that were missing).delete()refuses factory presets (surfaced via the existing status line) instead of hiding them; user presets delete as before.load_/persist_hidden_factorieshelpers; fixed the wrong Windows data-dir path in thepaths.rsdoc comment.Tests
Two regression tests that fail pre-fix:
hidden_file_is_ignored- a plantedhidden_presets.txtno longer suppresses factories (14, was 1).delete_factory_is_refused- deleting a factory is refused and the list is unchanged.All 181 lib unit tests pass. (Note: the pre-existing
golden_heavyDSP-hash test fails identically on cleanmasteron this box - compiler/CPU golden drift, unrelated to this change.)Also in this PR
CARGO_PKG_VERSION) and adds theCHANGELOG.mdentry.Verify on Windows (post-merge)
Tag -> CI builds artifacts -> confirm all 14 presets appear and the stale hidden file is auto-cleared.