Preserve team context when accessing Add app store page from iOS/iPadOS host's software library
Fleet version: rc-minor-fleet-v4.80.0
Web browser and operating system: N/A
💥 Actual behavior
When starting in a team that has been set up with VPP, navigating to the VPP App Store via the top-level Software link correctly shows the team-scoped store with provisioned apps. However, accessing the App Store through a device within the same team incorrectly displays a message stating that VPP is not set up for this team, as if the user were viewing the App Store in the "No Team" context. This indicates a context mismatch where the device-based navigation is not honoring the active team’s VPP assignment.
https://github.com/user-attachments/assets/9ce55597-87d3-4c2d-9c42-fa85a931448f
🛠️ To fix
When the user selects Add software button, on the Host > Software > Library page, Fleet should remember the team of the host and add the software to that team.
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.
🧑💻 Steps to reproduce
- Assign the VPP App Store to a specific team and ensure some apps are provisioned.
- Switch into that team and navigate to the App Store using the top-level Software link. Confirm the VPP apps are visible.
- Choose a device assigned to the team and navigate to the App Store.
- Observe that the App Store incorrectly reports “This team isn't added to Volume Purchasing Program (VPP),” as if it were scoped to the default No Team instead of the active team.
QA Notes:
Note: this was only happening previously when a fleet had no VPP apps assigned ✅ When an iOS host is assigned to a fleet, library -> add software now takes me to the correct fleet's add VPP page ✅ When an iOS host is unassigned it also goes to the correct page ✅ The page is correct whether the fleet has a VPP token assigned or not, and whether it has VPP apps available or not
Team context lost, Apps in clouds, adrift, confused, Now anchored, found, used.