Skip to content

feat(v3): add search box to the Plugins pedalboard page#873

Open
gionnibgud wants to merge 1 commit into
got-feedBack:mainfrom
gionnibgud:feat/v3-plugins-search
Open

feat(v3): add search box to the Plugins pedalboard page#873
gionnibgud wants to merge 1 commit into
got-feedBack:mainfrom
gionnibgud:feat/v3-plugins-search

Conversation

@gionnibgud

@gionnibgud gionnibgud commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

What

Adds a live search box to the v3 Plugins (Pedalboard) page toolbar. The skeuomorphic pedalboard looks great, but once a few boards fill up, plugins are hard to find by eye. The search box filters pedals as you type.

Behaviour

  • Live, as-you-type filtering (no button, no debounce) — case-insensitive substring match across plugin name / id / description.
  • Non-matching pedals hide; matching pedals compact/re-flow into flow order (no sparse gaps); boards with zero matches hide entirely.
  • Clearing the query restores everything, including each pedal's saved drag position.
  • Query is preserved across screen re-entry and the Reset button (module-scoped, re-applied at end of render()).
  • Resize while filtered keeps the compact flow (relayoutAll guarded).

Implementation notes

  • All in static/v3/plugins-page.js — matches the file's existing ES5 style (var/function, string-concat HTML, esc() for interpolation).
  • pluginMatches(p, q) is a pure helper, exposed on _test and unit-tested.
  • layoutBoard() skips .hidden pedals via a visible-only index so matches don't leave gaps.
  • Input styling mirrors the adjacent Reset button + the established v3 input focus pattern from songs.js. type="search" gives the native clear affordance.
  • No debounce is intentional (dozens of in-memory items, DOM class toggles only — matches the songs.js playlist-search precedent).

Out of scope

Fuzzy matching / match highlighting / auto-expanding collapsed boards — substring is enough for the current plugin count.

Testing

  • npm run test:js — new pluginMatches tests + full suite green (1031 pass, 0 fail).
  • npm run lint — clean.
  • static/tailwind.min.css rebuilt via scripts/build-tailwind.sh (new min-w-[200px] / placeholder:text-fb-textDim utilities).
  • Verified end-to-end in a local Docker deploy of this branch: typing "tuner" / "3d" filters correctly across boards, native ✕ clear restores all pedals, query survives navigation and Reset, no console errors.

Summary by CodeRabbit

  • New Features
    • Added a search box to the v3 Plugins pedalboard page with live filtering as you type.
    • Match by pedal name, ID, or description; non-matching pedals and boards with zero matches are hidden.
    • Matching pedals are reflowed to remove gaps; clearing the search restores all pedals, including any saved drag positions.
  • Documentation
    • Updated the changelog to highlight the new plugin search experience.
  • Tests
    • Added unit tests for the plugin matching logic.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 17b91632-b0a5-4928-8ecc-d680d598f372

📥 Commits

Reviewing files that changed from the base of the PR and between efbb46e and f228d30.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • static/tailwind.min.css
  • static/v3/plugins-page.js
  • tests/js/plugins_page.test.js
✅ Files skipped from review due to trivial changes (2)
  • CHANGELOG.md
  • tests/js/plugins_page.test.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • static/v3/plugins-page.js

📝 Walkthrough

Walkthrough

The v3 Plugins page adds live pedal search by name, id, and description. Matching pedals are compactly reflowed, empty boards are hidden, and clearing the query restores all pedals and saved drag positions. Tests cover matching edge cases.

Changes

Plugins pedalboard search

Layer / File(s) Summary
Plugin matching contract
static/v3/plugins-page.js, tests/js/plugins_page.test.js
Adds case-insensitive substring matching across plugin metadata and tests empty queries, null values, and missing fields.
Filtering, layout, and page wiring
static/v3/plugins-page.js, CHANGELOG.md, static/tailwind.min.css
Adds the search input and live filtering flow, compacts visible pedals, hides empty boards, preserves saved positions when searching is cleared, updates board expansion and resize reflow behavior, exposes the matcher for tests, and records the feature in release notes with regenerated styling assets.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SearchInput
  participant PluginsPage
  participant applyFilter
  participant pluginMatches
  participant relayoutAll
  SearchInput->>PluginsPage: update searchQuery
  PluginsPage->>applyFilter: applyFilter(root)
  applyFilter->>pluginMatches: check pedal metadata
  pluginMatches-->>applyFilter: return match result
  applyFilter->>relayoutAll: compact visible pedals
  relayoutAll-->>PluginsPage: update board layout
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a search box to the v3 Plugins pedalboard page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
tests/js/plugins_page.test.js (1)

155-163: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the page-level filtering contract.

These tests validate pluginMatches, but not applyFilter or layoutBoard: board hiding, compact reflow, clearing/restoring positions, and resize behavior remain untested in the changed surface. Verify that existing integration tests cover those flows, or add one focused page-level test. This follows the PR objective’s filtering and layout guarantees.

Also applies to: 165-171, 173-177

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/js/plugins_page.test.js` around lines 155 - 163, Extend the page-level
filtering tests around pluginMatches to cover applyFilter and layoutBoard:
verify filtered boards are hidden, visible boards compactly reflow, clearing the
filter restores positions, and resize behavior remains correct. First reuse
existing integration coverage if it already validates these guarantees;
otherwise add one focused test using the page’s established test helpers and
symbols.
static/tailwind.min.css (1)

2-2: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Exclude the generated Tailwind artifact from source-style linting.

Stylelint reports multiple errors on this regenerated bundle, including font-family quoting, deprecated clip, vendor-prefixed selectors, and keyword casing. Since these are standard generated Tailwind rules, configure Stylelint to ignore static/tailwind.min.css or apply a generated-artifact override instead of hand-editing the minified output. This is based on the reported static-analysis results.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@static/tailwind.min.css` at line 2, Exclude the generated Tailwind artifact
from Stylelint source-style checks by updating the project’s Stylelint
configuration or generated-artifact override to ignore static/tailwind.min.css.
Do not hand-edit the minified bundle; preserve linting for authored stylesheets.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@static/v3/plugins-page.js`:
- Around line 364-378: Update the expansion handler around layoutBoard so it
passes null when searchQuery.trim() is non-empty and loadLayout() otherwise,
matching the selection already used in applyFilter. Preserve the existing board
and category arguments while ensuring expanded boards remain compact during
active searches.

---

Nitpick comments:
In `@static/tailwind.min.css`:
- Line 2: Exclude the generated Tailwind artifact from Stylelint source-style
checks by updating the project’s Stylelint configuration or generated-artifact
override to ignore static/tailwind.min.css. Do not hand-edit the minified
bundle; preserve linting for authored stylesheets.

In `@tests/js/plugins_page.test.js`:
- Around line 155-163: Extend the page-level filtering tests around
pluginMatches to cover applyFilter and layoutBoard: verify filtered boards are
hidden, visible boards compactly reflow, clearing the filter restores positions,
and resize behavior remains correct. First reuse existing integration coverage
if it already validates these guarantees; otherwise add one focused test using
the page’s established test helpers and symbols.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: abc43063-d6ba-4767-975e-2bca94745658

📥 Commits

Reviewing files that changed from the base of the PR and between 9d0bf95 and efbb46e.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • static/tailwind.min.css
  • static/v3/plugins-page.js
  • tests/js/plugins_page.test.js

Comment thread static/v3/plugins-page.js
Plugins are hard to find by eye in the pedalboard layout once a few
boards fill up. Add a live, as-you-type search box to the toolbar that
filters pedals by name/id/description (case-insensitive substring):
non-matching pedals hide, matches compact/re-flow via layoutBoard, and
boards with zero matches hide entirely. Clearing the query restores
everything, including saved drag positions.

Signed-off-by: gionnibgud <gionnibgud@gmail.com>
@gionnibgud
gionnibgud force-pushed the feat/v3-plugins-search branch from efbb46e to f228d30 Compare July 11, 2026 15:32
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