Fleet UI: Add self-service categories to command palette - #47115
Conversation
Adds two entries: a "Self-service categories" sub-item under Software library for navigation, and an "Add self-service category" action that deep-links the page with ?add_category=1 to auto-open the modal (mirroring the Variables/Scripts pattern).
|
@claude review |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #47115 +/- ##
========================================
Coverage 67.17% 67.17%
========================================
Files 2908 2908
Lines 226136 226142 +6
Branches 11829 11684 -145
========================================
+ Hits 151898 151904 +6
- Misses 60508 60509 +1
+ Partials 13730 13729 -1
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:
|
There was a problem hiding this comment.
Pull request overview
This PR extends Fleet’s global command palette (⌘/Ctrl+K) to better support the self-service software categories workflow by adding (1) a navigation entry to the categories page and (2) a deep-link “Add” action that auto-opens the “Add category” modal via a query param, matching the existing Variables/Scripts deep-link pattern.
Changes:
- Add a “Self-service categories” sub-item under “Software library” in the command palette.
- Add an “Add self-service category” command that links to
/software/library/categories?add_category=1(with fleet context preserved). - Update the SelfServiceCategories page to open (and then strip) the
add_category=1param and add automated tests for the deep-link behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/pages/SoftwarePage/SoftwareLibrary/SelfServiceCategoriesPage/SelfServiceCategoriesPage.tsx | Adds deep-link handling (?add_category=1) to open the Add modal (permission-gated) and then strips the param via router.replace. |
| frontend/pages/SoftwarePage/SoftwareLibrary/SelfServiceCategoriesPage/SelfServiceCategoriesPage.tests.tsx | Adds test coverage for the deep-link modal open/strip behavior (manager vs non-manager and re-open scenarios). |
| frontend/components/CommandPalette/helpers.tests.ts | Updates palette helper tests to assert the new command ID is present/absent under the correct permission conditions. |
| frontend/components/CommandPalette/groups/software.ts | Adds “Self-service categories” as a sub-item under “Software library” for navigation. |
| frontend/components/CommandPalette/groups/commands.ts | Adds “Add self-service category” command that deep-links with ?add_category=1 and preserves fleet context via withTeamId. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Issue
Closes #43757
Closes #46443
Description
Screenrecording
Uploading Screen Recording 2026-06-08 at 1.41.41 PM.mov…
Testing