Fleet UI: return app name on success of adding android app - #44068
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #44068 +/- ##
==========================================
+ Coverage 66.78% 66.81% +0.02%
==========================================
Files 2718 2722 +4
Lines 218772 218996 +224
Branches 10709 10709
==========================================
+ Hits 146112 146313 +201
- Misses 59497 59518 +21
- Partials 13163 13165 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a765401 to
9c5321c
Compare
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
Caution Review failedAn error occurred during the review process. Please try again later. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR extends the AddAppStoreApp method to return the app name alongside the software title ID. The interface signature changes from (uint, error) to (uint, string, error). The HTTP response struct gains a name field alongside software_title_id. The implementation updates all error paths to return an empty string for the name, while success returns the actual app name fetched from Android Play Store or Apple VPP metadata. Mock and test call sites are updated to handle the additional return value. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the VPP “add app store app” flow so the API returns the newly-added app’s name (in addition to the software title ID), enabling the Fleet UI to display the Android app name on success.
Changes:
- Extended
AddAppStoreAppservice method to return(titleID, name, err). - Added
nameto theaddAppStoreAppResponseJSON payload. - Updated affected unit tests and the service mock to match the new method signature.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/service/vpp.go | Extends endpoint response to include app name and updates service signature/stub. |
| ee/server/service/vpp.go | Updates EE implementation to return the app name along with the title ID. |
| server/fleet/service.go | Updates Service interface contract to return app name. |
| server/mock/service/service_mock.go | Updates mock function types/signatures for AddAppStoreApp. |
| server/service/vpp_test.go | Updates auth test to handle the new return value. |
| server/service/software_installers_test.go | Updates auth test to handle the new return value. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| _, err = svc.AddAppStoreApp(ctx, tt.teamID, fleet.VPPAppTeam{VPPAppID: fleet.VPPAppID{AdamID: "123", Platform: fleet.IOSPlatform}}) | ||
| _, _, err = svc.AddAppStoreApp(ctx, tt.teamID, fleet.VPPAppTeam{VPPAppID: fleet.VPPAppID{AdamID: "123", Platform: fleet.IOSPlatform}}) |
There was a problem hiding this comment.
It's being tested elsewhere: server/service/integration_android_software_test.go in TestAndroidAppsSelfService, lines ~307 and ~392
| } | ||
|
|
||
| return addedApp.TitleID, nil | ||
| return addedApp.TitleID, app.Name, nil |
There was a problem hiding this comment.
Fleet's MySQL layer doesn't normalize VPP app names on insert (no triggers, no column transforms). The value you pass in is the value that gets stored. Adding a re-read after write is an extra DB round-trip to guard against something that doesn't happen.
| TitleID uint `json:"software_title_id,omitempty"` | ||
| Err error `json:"error,omitempty"` | ||
| TitleID uint `json:"software_title_id,omitempty"` | ||
| Name string `json:"name,omitempty"` |
There was a problem hiding this comment.
Do we need a docs update for this?
There was a problem hiding this comment.
Will do separate PR into 4.86.0 docs
Issue
Closes #44067
Description
Screenrecording
Before
Screen.Recording.2026-05-11.at.3.45.18.PM.mov
After
Screen.Recording.2026-05-11.at.3.48.39.PM.mov
Testing
Summary by CodeRabbit
New Features
Tests