Fleet UI: Self-service categories follow-ups - #46860
Merged
jkatz01 merged 7 commits intoJun 5, 2026
Merged
Conversation
The self-service category filter stripped the emoji prefix from the selected category name but not from the item's category names, so a custom category like "🌎 Foos" never matched its own software and the category page showed no installers. Both sides come from the same software_categories rows, so compare the full names case-insensitively instead of stripping.
This roll-up activity had no frontend renderer, so it fell through to the
generic fallback ("<host> installed all self service software"). Add a
renderer for both the host activity card and the global activity feed:
"End user installed all the software in self-service." when un-scoped, and
"End user selected the Install all option in the self-service <category>
category." when category-scoped. The actor is dropped in favor of "End
user" since self-service can be triggered by anyone on the My device page.
The emoji-prefixed custom category names in these mocks aren't part of the SoftwareCategory literal union, so make generate (webpack ForkTsChecker) failed even though jest passed (babel skips type checking). Cast the mock categories, since custom-category names legitimately appear in this field at runtime.
Thread teamId from EditSoftwareModal through SoftwareVppForm to SoftwareOptionsSelector, matching the custom-package modal (#46601), so the VPP edit modal fetches this fleet's custom self-service categories instead of the hardcoded list.
- Soften the category mock casts to 'as string[] as SoftwareCategory[]', matching the existing services/entities/software.ts idiom, instead of routing through 'as unknown'. - Drop the redundant optional chain on activity.details (non-optional on IHostPastActivity) in the install-all activity item. - Cover the null self_service_category_name case (un-scoped roll-up) in both the host-card and global-feed activity tests. - Add a teamId 0 (no team) test proving the VPP/category selector still fetches dynamically rather than using the hardcoded fallback.
Member
Author
|
@claude review once |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/39018-self-service-categories #46860 +/- ##
=====================================================================
Coverage ? 66.88%
=====================================================================
Files ? 2813
Lines ? 223908
Branches ? 11575
=====================================================================
Hits ? 149772
Misses ? 60586
Partials ? 13550
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cdcme
marked this pull request as ready for review
June 4, 2026 22:00
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue: Resolves #39018
Follow-ups to the self-service custom categories work, landing on
feat/39018-self-service-categories:helpers.ts. Both sides of the comparison (custom category and software'scategories) carry the emoji prefix, so lowercase exact match works.installed_all_self_service_softwareactivity. New host activity item + global feed template, matching the BE contract (self_service_category_id|name,software_titles_count). Falls back to an un-scoped "End user installed all the software in self-service." when the install-all wasn't category-scoped.EditSoftwareModalnow passesteamIdthroughSoftwareVppForm→SoftwareOptionsSelector, so the VPP edit modal fetches custom categories from the API instead of falling back to the hardcoded list.teamId === 0(no team) is covered.Checklist for submitter
SELECT *is avoided, SQL injection is prevented...Testing