Display software version filter on hosts page when filtering by a team without that software version
Fleet version: "go_version": "go1.25.6" (Fleet 4.81.0)
Web browser and operating system: Chrome Version 144.0.7559.110 (Official Build) (arm64)
π₯ Actual behavior
When filtering by a specific software version the "Version pill" might disappear when switching teams, especially if the team doesn't have that software installed
π οΈ To fix
- Backend: update hosts API to include
softwareobject when a validsoftware_version_idparameter is provided, even if it is not present on the selected team - Frontend: Display software version filter badge and table headings when hosts list has no results (similar to how we display label w/ no results, see screenshot)
These steps:
- [x] Have been confirmed to consistently reproduce the issue across multiple Fleet instances.
- [ ] Describe the workflow that led to the issue but have not yet been reproduced across multiple Fleet instances.
π§βπ» Steps to reproduce
-
Navigate to Software in the Fleet software library.
-
Click on a software title.
-
From the Versions section, click the host count to open the filtered Hosts view for that software.
-
Change the Team dropdown:
- Select a team that has the installer configured but no hosts with the software installed.
- Then select a team that does not have the installer configured.
π―οΈ More info (optional)
N/A
Jacob's estimate: Frontend 2 Backend 3
~1.5-2 days β 5 total
@rachaelshaw @Brajim20 in the to-fix photo, the empty state has various filters. To me it makes more sense to keep the filters hidden, since if there are no hosts, there's no reason to filter further. This okay with you?
@jacobshandling I think we'd need to keep the filters in case one of them is in use and could be cleared, right? (Or does software version not work with other filters?)
@rachaelshaw looks like there are some very specific relationships there - software version can be combined with os name or os version (both of which are represented with filter pills, not the dropdowns in question), and not any other filters (see logic here)
The UI currently reflects that: the other software/cve filters applied to the hosts page for a team that doesnβt have any matching hosts hides the other drop-downs:
-software_title_id:
-vulnerability:
So seems like unless we want to add support for combining those filters, we want to leave the dropdowns hidden here
@jacobshandling makes sense to me then π
QA Verification
- [X] Software filter is visible for a team with no hosts
- [X] Vulnerabilities filter is visible for a team with no hosts
- [X] OS versions filter is visible for a team with no hosts
- [X] Combined filters are visible
Filter gone astray, Teams find clarity in change, Software lights the way.