fleet icon indicating copy to clipboard operation
fleet copied to clipboard

My device page: switching tabs (e.g. Self-service) resets Software tab filter/search/pagination

Open marcusallen97 opened this issue 4 months ago • 2 comments

Fleet versions

  • Discovered: Fleet built from main @ e87dd023f7 (2026-07-17), orbit-v1.57.0-638-ge87dd023f7
  • Reproduced: Same

Web browser and operating system: Latest Chrome, tested on macOS host My device page


💥 Actual behavior

On the Fleet Desktop My device > Software tab, any URL-driven state (the Applications/Full inventory filter, search term, pagination page) is discarded when navigating to another tab (e.g. Self-service) and back. The Software tab always reloads with its default filter (Applications) instead of what was previously selected.

Root cause: frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx:745 wires the tab control with onSelect={(i) => router.push(tabPaths[i])}, where tabPaths (defined at lines 97-107) are bare paths with no query string. Every tab click replaces the URL entirely, dropping any params the current tab had set.

🛠️ Expected behavior

Switching tabs and back to Software should preserve the filter selection (and ideally search term/page) rather than silently resetting to defaults.

🧑‍💻 Steps to reproduce

  • [x] Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
  1. Enroll a macOS host with Fleet Desktop and open the tray icon > My device.
  2. Go to the Software tab, and switch the filter dropdown to Full inventory.
  3. Click the Self-service tab, then click back to Software.
  4. Notice the filter has reset to Applications instead of remaining on Full inventory.

🕯️ More info

  • Found while QAing PR #48637 (adds the Applications/Full inventory filter to the My device Software tab), but this is pre-existing tab-switching behavior, not introduced by that PR — it would affect search term and pagination page the same way on any tab switch.
  • Not a regression from #48637; filed separately since it's a distinct existing bug in DeviceUserPage.tsx's tab navigation.

marcusallen97 avatar Jul 17 '26 19:07 marcusallen97

I checked this, and I don't think it's a bug. Clearing filters, search and page when you switch tabs is how every tabbed page in the UI works right now.

juan-fdz-hawa avatar Sep 29 '26 22:09 juan-fdz-hawa

Users browse their software Tab switch erases their place State returns once kept

fleet-release avatar Sep 29 '26 22:09 fleet-release