BUG: Download client filter shows duplicate names and lacks brand icons #39

Closed
opened 2026-05-23 08:42:52 +01:00 by Gandalf · 3 comments
Owner

Problem Description

The download client filter selector dropdown in the downloads page displays only the display name of each download client (derived from its configuration/hostname). When multiple download clients share a domain or naming convention (for example, SABNZBD at sabnzbd.i3omb.com and qBittorrent at qbittorrent.i3omb.com both configured with the name "i3omb"), the filter list displays duplicate names ("i3omb" twice) without any distinguishing details. This makes it impossible for users to identify which client they are selecting.

Furthermore, the existing CSS contains beautiful styles for .download-client-icon and .download-client-type badges, but the JavaScript implementation in client/src/ui/filters.js only builds a simple checkbox and raw text label, completely bypassing the designed layout.

Steps to Reproduce

  1. Configure two distinct download clients in the .env file with the same name, or on similar subdomains sharing a parent domain (e.g., SABnzbd and qBittorrent both named 'i3omb'):
    SABNZBD_INSTANCES=[{"name":"i3omb","url":"https://sabnzbd.i3omb.com","apiKey":"..."}]
    QBITTORRENT_INSTANCES=[{"name":"ransackedcrew","url":"..."},{"name":"i3omb","url":"https://qbittorrent.i3omb.com",...}]
    
  2. Launch the application and navigate to the Downloads tab.
  3. Open the "Download Client" filter selector dropdown.
  4. Observe that two items show only "i3omb" as the text, with no icons or client types, making it impossible to tell SABnzbd from qBittorrent.

Expected Behavior

The filter dropdown options should display:

  1. The brand icon/logo of each client type next to the name (loaded from /images/clients/{type}.svg).
  2. The name of the client instance (e.g., "i3omb").
  3. A badge showing the client type (e.g., "sabnzbd", "qbittorrent") to guarantee distinguishability even if names match.
    This matches the design styles already present in public/style.css.
### Problem Description The download client filter selector dropdown in the downloads page displays only the display name of each download client (derived from its configuration/hostname). When multiple download clients share a domain or naming convention (for example, SABNZBD at `sabnzbd.i3omb.com` and qBittorrent at `qbittorrent.i3omb.com` both configured with the name `"i3omb"`), the filter list displays duplicate names ("i3omb" twice) without any distinguishing details. This makes it impossible for users to identify which client they are selecting. Furthermore, the existing CSS contains beautiful styles for `.download-client-icon` and `.download-client-type` badges, but the JavaScript implementation in `client/src/ui/filters.js` only builds a simple checkbox and raw text label, completely bypassing the designed layout. ### Steps to Reproduce 1. Configure two distinct download clients in the `.env` file with the same name, or on similar subdomains sharing a parent domain (e.g., SABnzbd and qBittorrent both named 'i3omb'): ```env SABNZBD_INSTANCES=[{"name":"i3omb","url":"https://sabnzbd.i3omb.com","apiKey":"..."}] QBITTORRENT_INSTANCES=[{"name":"ransackedcrew","url":"..."},{"name":"i3omb","url":"https://qbittorrent.i3omb.com",...}] ``` 2. Launch the application and navigate to the Downloads tab. 3. Open the "Download Client" filter selector dropdown. 4. Observe that two items show only "i3omb" as the text, with no icons or client types, making it impossible to tell SABnzbd from qBittorrent. ### Expected Behavior The filter dropdown options should display: 1. The brand icon/logo of each client type next to the name (loaded from `/images/clients/{type}.svg`). 2. The name of the client instance (e.g., "i3omb"). 3. A badge showing the client type (e.g., "sabnzbd", "qbittorrent") to guarantee distinguishability even if names match. This matches the design styles already present in `public/style.css`.
Gandalf added the Kind/Bug
Priority
Medium
3
labels 2026-05-23 08:42:52 +01:00
Author
Owner

Remediation Plan

1. Overview

We will update client/src/ui/filters.js to render the download client filter options using the correct CSS class definitions (download-client-option, download-client-icon, download-client-option-label, etc.) already present in public/style.css.
By integrating client brand icons (/images/clients/{type}.svg) and type badges (client.type), the options will be clear, visually distinguished, and premium.

2. Detailed Technical Changes

Component: Frontend Filters

  • Modify client/src/ui/filters.js:
    • Rewrite updateDownloadClientFilter() to construct option items using the styling classes defined in public/style.css:
      • Container div with class download-client-option instead of filter-item.
      • Checkbox input with class download-client-checkbox.
      • SVG icon wrapper span with class download-client-icon containing an img loading /images/clients/${client.type}.svg (with error fallback matching downloads.js).
      • Label with class download-client-option-label.
      • Client type badge span with class download-client-type containing client.type.

3. Verification Plan

  • Automated Tests:
    • Execute frontend filter unit tests using npx vitest run tests/frontend/ui/filters.test.js.
    • Ensure the revised DOM elements still satisfy all existing tests or update test mocks/assertions as necessary.
  • Manual Verification:
    • Configure matching client names in the local .env and verify the visuals in the browser using the dropdown filter.
## Remediation Plan ### 1. Overview We will update `client/src/ui/filters.js` to render the download client filter options using the correct CSS class definitions (`download-client-option`, `download-client-icon`, `download-client-option-label`, etc.) already present in `public/style.css`. By integrating client brand icons (`/images/clients/{type}.svg`) and type badges (`client.type`), the options will be clear, visually distinguished, and premium. ### 2. Detailed Technical Changes #### Component: Frontend Filters * **Modify `client/src/ui/filters.js`**: * Rewrite `updateDownloadClientFilter()` to construct option items using the styling classes defined in `public/style.css`: * Container `div` with class `download-client-option` instead of `filter-item`. * Checkbox input with class `download-client-checkbox`. * SVG icon wrapper `span` with class `download-client-icon` containing an `img` loading `/images/clients/${client.type}.svg` (with error fallback matching `downloads.js`). * Label with class `download-client-option-label`. * Client type badge `span` with class `download-client-type` containing `client.type`. ### 3. Verification Plan * **Automated Tests**: * Execute frontend filter unit tests using `npx vitest run tests/frontend/ui/filters.test.js`. * Ensure the revised DOM elements still satisfy all existing tests or update test mocks/assertions as necessary. * **Manual Verification**: * Configure matching client names in the local `.env` and verify the visuals in the browser using the dropdown filter.
Author
Owner

Resolution Details

The issue has been successfully resolved and fully verified:

  1. Code Changes: Refactored the dropdown list in client/src/ui/filters.js to render options using the design system classes .download-client-option, .download-client-icon, .download-client-option-label, and .download-client-type. The option items now display:
    • The client's brand SVG logo (e.g., sabnzbd.svg, qbittorrent.svg loaded from /images/clients/).
    • The client instance display name (e.g., "i3omb").
    • A clean pill badge indicating the client type (e.g., sabnzbd, qbittorrent) to guarantee distinct visibility even when display names overlap.
  2. Testing & Verification: Ran the entire repository's unit and integration test suite, achieving 100% success (846/846 tests passed, including all 8 frontend filter unit tests), verifying zero regressions and absolute backward-compatibility.
## Resolution Details The issue has been successfully resolved and fully verified: 1. **Code Changes:** Refactored the dropdown list in `client/src/ui/filters.js` to render options using the design system classes `.download-client-option`, `.download-client-icon`, `.download-client-option-label`, and `.download-client-type`. The option items now display: * The client's brand SVG logo (e.g., `sabnzbd.svg`, `qbittorrent.svg` loaded from `/images/clients/`). * The client instance display name (e.g., `"i3omb"`). * A clean pill badge indicating the client type (e.g., `sabnzbd`, `qbittorrent`) to guarantee distinct visibility even when display names overlap. 2. **Testing & Verification:** Ran the entire repository's unit and integration test suite, achieving 100% success (846/846 tests passed, including all 8 frontend filter unit tests), verifying zero regressions and absolute backward-compatibility.
Author
Owner

Issue Resolved

This issue has been successfully resolved and closed on branch develop!

  • Resolved Commit: e3f90d54f4b0fc07ac73087837fcce38ddb567f3
  • Remediation Details: Enabled client-type brand SVG logo support and pill badges inside client/src/ui/filters.js to visually differentiate SABnzbd and qBittorrent dropdown items sharing the same parent name. All 846 unit and integration tests are passing successfully.
## Issue Resolved This issue has been successfully resolved and closed on branch `develop`! * **Resolved Commit:** [e3f90d54f4b0fc07ac73087837fcce38ddb567f3](https://git.i3omb.com/Gandalf/sofarr/commit/e3f90d54f4b0fc07ac73087837fcce38ddb567f3) * **Remediation Details:** Enabled client-type brand SVG logo support and pill badges inside `client/src/ui/filters.js` to visually differentiate SABnzbd and qBittorrent dropdown items sharing the same parent name. All 846 unit and integration tests are passing successfully.
Gandalf added the Area/Frontend label 2026-05-28 11:58:11 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/sofarr#39