Skip to content

Add curated plugin categories with a name-based classification fallback - #561

Draft
diamondsea11 wants to merge 1 commit into
rerdavies:mainfrom
diamondsea11:upstream-pr/lv2-category-patching
Draft

Add curated plugin categories with a name-based classification fallback#561
diamondsea11 wants to merge 1 commit into
rerdavies:mainfrom
diamondsea11:upstream-pr/lv2-category-patching

Conversation

@diamondsea11

Copy link
Copy Markdown

From #555: "Patching of LV2 categories. Sure! LV2 plugin categories are an unholy mess. I'd like to see what you have."

This is that. It's a presentation layer over the declared LV2 class rather than an attempt to fix the underlying metadata.

Three parts, all UI-side

PluginCategories.ts (new) — 13 guitarist-facing categories with colours and a display order, a mapping from each PluginType onto one, and a name/type/author heuristic that only runs to refine the result. "Patching" is the accurate word: a plugin declaring UtilityPlugin but named "…Cabinet IR…" lands under Cabs rather than Volume & Utility. The heuristic is deliberately last — an accurate declared class always wins.

LoadPluginDialog — filter dropdown grouped by category with colour swatches; category filter values are prefixed category:, which is why filterType widens from PluginType to string. Unfiltered results sort by category rank.

PedalboardView — a block's icon takes its category colour, but only when the user hasn't set an explicit iconColor. Existing per-item colours still win.

No host, preset-schema or serialization changes.

On your Helix question

You asked in #555 whether the restyling copies Helix. Not deliberately — I referenced Quad Cortex and the Darkglass Anagram when describing what I wanted, and I'd guess the category-colour idea is closer to those. If any of this reads as too close to Helix to you, say so and I'll rework it.

On your internationalization concern

Category labels are English string literals in the new file. They'd need extracting like any other UI string. Nothing here makes translation harder than the rest of the UI already is — but nothing makes it easier either. If you want them structured differently for that reason, easier to change now than later.

Deliberately left out

The re-categorisation override. The fork also lets the user reassign a mis-categorised plugin, persisted in localStorage. Its two functions (getPluginCategoryOverride / setPluginCategoryOverride) ship in this file but are unreferenced here, because their only caller is a fork-only browser component that isn't part of this PR. Say the word and I'll strip them out, or propose that UI separately once the categories themselves are settled.

Five unrelated fixes that happen to live in LoadPluginDialog.tsx in the fork: a "100%'" typo, an operator-precedence bug in a Typography expression (uiPlugin?.name ?? "" + stereoIndicator — the + binds tighter than ??), search debounce 2000 ms → 250 ms, and two disabled={selectedPlugin === null}disabled={!selectedPlugin} tweaks. All real, all off-topic; kept out so this diff stays one subject. Happy to send any of them separately — the precedence one is an actual bug.

Verification

npx tsc -b --force in vite/ exits 0 on this branch. Each edited region was additionally diffed byte-for-byte against the fork original to confirm the extraction is faithful. Not visually tested in this isolated form — the fork it came from runs on an iPad daily.

Provenance

As discussed in #555: I'm not a developer, this is AI-implemented from my descriptions. Given this is the largest of the four PRs and it's UI code — where you noted AI tends to do worst — please review it with that in mind.

Targeting main since that's what the branch is based on — happy to retarget to dev.

LV2 plugin classes are, as you put it, an unholy mess: plugins routinely
declare a class that says little about what a guitarist would call the effect,
and the class tree groups things in ways that don't match how anyone browses
for a reverb or a fuzz. This adds a presentation layer over the declared class
rather than trying to fix the underlying metadata.

Three parts, all UI-side, no host or preset-schema changes:

PluginCategories.ts (new) defines 13 guitarist-facing categories with colours
and a display order, maps each LV2 PluginType onto one, and adds a name/type/
author heuristic that only runs to refine the result. Named "patching" because
that's what it is -- e.g. a plugin declaring UtilityPlugin but named
"...Cabinet IR..." lands under Cabs rather than Volume & Utility. The heuristic
is deliberately last: an accurate declared class always wins.

LoadPluginDialog groups the filter dropdown by category with colour swatches,
adds category filter values (prefixed "category:", hence filterType widening
from PluginType to string), and sorts unfiltered results by category rank.

PedalboardView colours a block's icon by its plugin's category when the user
hasn't set an explicit icon colour -- existing per-item iconColor still wins.

On your internationalization concern: category labels are English literals in
this file, so they'd need extracting like any other UI string. Nothing here
makes that harder than it already is, but nothing makes it easier either.

Not included, deliberately: the fork also has a user-facing "re-categorise this
plugin" override persisted in localStorage. It lives in this same file
(getPluginCategoryOverride/setPluginCategoryOverride) and is wired up from a
fork-only InlinePluginBrowser component that isn't part of this PR, so the
functions are present but unreferenced here. Say the word and I'll strip them
out, or propose the override UI separately once the categories themselves are
settled.

Verified: `npx tsc -b --force` in vite/ completes with exit code 0 against
this branch. The three edited regions were also diffed byte-for-byte against
the fork original to confirm the extraction is faithful. Five unrelated changes
that happen to sit in LoadPluginDialog.tsx in the fork (a "100%'" typo fix, an
operator-precedence fix in a Typography expression, a search debounce of 2000ms
-> 250ms, and two `disabled={selectedPlugin === null}` -> `disabled={!selectedPlugin}`
tweaks) were deliberately left out to keep this diff to one topic. Happy to
send any of them separately.

Extracted from the diamondsea11/pipedal fork (feature/multipath-v1) for
independent review, per the maintainer's request in
rerdavies#555 to evaluate fork changes
one topic at a time.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
diamondsea11 pushed a commit to diamondsea11/pipedal that referenced this pull request Aug 6, 2026
All four extracted branches are now open as drafts against rerdavies/pipedal:
rerdavies#558 ALSA multichannel, rerdavies#559 S24_LE scaling, rerdavies#560 JUCE sidechain group
fallback, rerdavies#561 LV2 category patching. All target main, which is what the
branches were cut from; retargeting to dev is offered in each PR body.

rerdavies#558 already existed as a non-draft and was converted, with its
auto-populated commit-message body replaced by one written for review.

Each PR body states the provenance Robin asked about in rerdavies#555 (not a
developer, AI-implemented from descriptions) so he can calibrate review
effort, and states verification honestly per PR -- only rerdavies#561 has actually
been compiled.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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