Skip to content

Fleet UI: Add dynamic categories to edit software modal - #46601

Merged
RachelElysia merged 1 commit into
feat/39018-self-service-categoriesfrom
39018-update-software-categories
Jun 2, 2026
Merged

Fleet UI: Add dynamic categories to edit software modal#46601
RachelElysia merged 1 commit into
feat/39018-self-service-categoriesfrom
39018-update-software-categories

Conversation

@RachelElysia

@RachelElysia RachelElysia commented Jun 1, 2026

Copy link
Copy Markdown
Member

Issue

Part of #39018
Closes #46371

Description

  • Replace hardcoded category list in CategoriesSelector with a useQuery fetch against the self-service categories API for the current fleet.
  • Add empty state with an "Add category" link to /software/library/categories when the fleet has no categories.
  • Render DataError when the categories fetch fails (retry: false so users see the error fast instead of waiting through 4 retries).
  • Handle "some or all of the categories provided" BE error on edit save.
  • Cap the categories list at 210px max-height with inner scroll so the last row peeks; apply the same 210px to TargetLabelSelector's checkbox list per Figma dev note.
  • Static fallback path (no teamId passed) preserves the existing hardcoded list for VPP/Android/FMA forms until they're wired up separately.

Screen recording

Screen.Recording.2026-06-01.at.4.53.01.PM.mov

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

- Replace hardcoded category list in CategoriesSelector with a useQuery
  fetch against the self-service categories API for the current fleet.
- Add empty state with an "Add category" link to /software/library/categories
  when the fleet has no categories.
- Render DataError when the categories fetch fails (retry: false so users
  see the error fast instead of waiting through 4 retries).
- Handle "some or all of the categories provided" BE error on edit save.
- Cap the categories list at 210px max-height with inner scroll so the
  last row peeks; apply the same 210px to TargetLabelSelector's checkbox
  list per Figma dev note.
- Static fallback path (no teamId passed) preserves the existing hardcoded
  list for VPP/Android/FMA forms until they're wired up separately.
@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat/39018-self-service-categories@abd3821). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...wareTitleDetailsPage/EditSoftwareModal/helpers.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                          Coverage Diff                          @@
##             feat/39018-self-service-categories   #46601   +/-   ##
=====================================================================
  Coverage                                      ?   66.86%           
=====================================================================
  Files                                         ?     2810           
  Lines                                         ?   223765           
  Branches                                      ?    11534           
=====================================================================
  Hits                                          ?   149618           
  Misses                                        ?    60592           
  Partials                                      ?    13555           
Flag Coverage Δ
frontend 56.92% <90.47%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@RachelElysia
RachelElysia marked this pull request as ready for review June 1, 2026 21:05
@RachelElysia
RachelElysia requested a review from a team as a code owner June 1, 2026 21:05

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@RachelElysia
RachelElysia merged commit 9f6f80d into feat/39018-self-service-categories Jun 2, 2026
17 checks passed
@RachelElysia
RachelElysia deleted the 39018-update-software-categories branch June 2, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants