Skip to content

Fix/factory presets unhide#5

Merged
Hornfisk merged 2 commits into
masterfrom
fix/factory-presets-unhide
Jul 8, 2026
Merged

Fix/factory presets unhide#5
Hornfisk merged 2 commits into
masterfrom
fix/factory-presets-unhide

Conversation

@Hornfisk

@Hornfisk Hornfisk commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

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)

  • The 14 factory presets are baked into the binary via include_str!. I grepped the shipped v1.0.1 Windows niner.clap/.vst3 and all 14 are present, so it was never a build/bundling issue.
  • The only runtime filter that can drop a factory is list_all()'s hidden_factories check, fed by hidden_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 honors hidden_presets.txt; factory presets are always listed, so every affected install recovers on next launch with no user action.
  • 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 delete as before.
  • Removed the dead load_/persist_hidden_factories helpers; fixed the wrong Windows data-dir path in the paths.rs doc comment.

Tests

Two regression tests that fail pre-fix:

  • hidden_file_is_ignored - a planted hidden_presets.txt no 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_heavy DSP-hash test fails identically on clean master on this box - compiler/CPU golden drift, unrelated to this change.)

Also in this PR

  • Bumps version to 1.0.2 (drives the GUI/log/feedback version strings via CARGO_PKG_VERSION) and adds the CHANGELOG.md entry.

Verify on Windows (post-merge)

Tag -> CI builds artifacts -> confirm all 14 presets appear and the stale hidden file is auto-cleared.

Hornfisk and others added 2 commits July 8, 2026 11:47
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>
@Hornfisk Hornfisk merged commit 4ae990f into master Jul 8, 2026
8 checks passed
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.

1 participant