Software title details page shows "Software not detected" instead of redirecting when switching to a fleet where the title doesn't exist
Fleet versions
- Discovered: 4.87.0-rc
- Reproduced: 4.87.0-rc
Web browser and operating system: Chrome on macOS
💥 Actual behavior
When viewing a software title detail page (/software/titles/:id?fleet_id=X) and using the fleet dropdown to switch to a fleet that doesn't have that software title, the page shows:
Software not detected Expecting to see software? Check back later.
The API returns 404 Not Found:
{
"message": "Resource Not Found",
"errors": [{ "name": "base", "reason": "SoftwareTitle 607 was not found in the datastore" }]
}
🛠️ Expected behavior
Update empty state copy:
Software not found in this fleet.
🧑💻 Steps to reproduce
These steps:
- [x] Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
- [ ] Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
- Navigate to a software title detail page for a title that exists in Fleet A (
/software/titles/:id?fleet_id=A). - Use the fleet dropdown to switch to Fleet B where that software title has no hosts, no installer, and no VPP/in-house app.
- The page shows "Software not detected" instead of redirecting to the software library.
🕯️ More info (optional)
Root cause: SoftwareTitleDetailsPage.tsx ignores 404 errors silently via ignoreAxiosError(error, [403, 404]), setting isSoftwareTitleError = true which renders the empty state. There is no redirect on 404.
Suggested fix in frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareTitleDetailsPage.tsx:
onError: (error) => {
if (error.response?.status === 404) {
router.push(
getPathWithQueryParams(paths.SOFTWARE_LIBRARY, { fleet_id: teamIdForApi })
);
return;
}
if (!ignoreAxiosError(error, [403])) {
handlePageError(error);
}
},
@Brajim20 I have a fix ready for this.
One small deviation from the suggested diff: the suggested fix redirects to paths.SOFTWARE_LIBRARY (/software/library), but I used paths.SOFTWARE (/software) instead, since that's the default "Software" inventory page users land on, and the expected behavior described in the issue (/software?fleet_id=X) also matches paths.SOFTWARE.
Let me know if the software/library was intentional, and I'll update it.
@marko-lisica / @RachelElysia Is this where we want to land the user in this scenario?
Is this where we want to land the user in this scenario?
Up to @marko-lisica
Hi @marko-lisica, just following up on this whenever you have a chance to take a look.
@marko-lisica - I'm a little worried this trades one confusing UX for a worse one.
The "roll through fleets" motion is a real admin workflow: checking which fleets have Slack, which have the installer set up, etc. The current empty state, ugly as it is, keeps you on the title's URL with the fleet dropdown right there:
- Fleet A → detail page loads
- Fleet B → detail page loads
- Fleet C → empty state (dropdown still there, one click to move on)
- Fleet D → detail page loads
If we redirect on 404, that loop breaks, once you land on /software?fleet_id=C, you've lost the title context, and to check fleet D you'd have to hunt for the title in the library again or click back and then switch fleets which feels like a worse flow.
I wonder if the actual bug is the copy, not the behavior? "Software not detected. Expecting to see software? Check back later." sounds like a data-lag issue, which is probably what makes it feel broken. If it instead said something like "Software not detected in Workstations" with a "Go to Workstations software" link, the current flow would read as intentional and the stuck feeling would go away — without giving up the roll-through-fleets workflow.
Also worth having me to confirm from #16948 that the 403/404 conflation on these pages is load-bearing for not confirming/denying that a title exists on a fleet the user can't see. Rrahul's diff preserves that (403 still gets swallowed into the empty state), so the leak isn't reintroduced, but it's worth keeping in mind that was a gotcha we intentionally built around as we iterate on this.
@marko-lisica - curious what you think about a copy tweak instead of a full redirect
@RachelElysia I think that makes sense. Let's update the copy for the empty state.
I think we should say Software not found in this fleet. "Detected" makes sense when you talk about osquery detection, but software can be added even if not detected.
I don't think we need to link to the software page. It should be enough if we explain that the software isn't available for that fleet.
I'll update the expected behavior in the issue description.
cc @rrahul-1
Makes sense, the redirect would have broken the "roll through fleets" workflow where admins check a title across multiple fleets. Updating the copy is a better fix since it keeps the user in context with the fleet dropdown still available, rather than dropping them back to the library. Updated the header to "Software not found in this fleet" and reverted the redirect logic.
Tested on 4.91.0 (Main)
PASSED ✅
Users switch between fleets with ease The path clears when software departs Home waits like still lakes