Skip to content

Add "Support" default software category#47923

Open
allenhouchins wants to merge 1 commit into
mainfrom
allen/add-support-software-category
Open

Add "Support" default software category#47923
allenhouchins wants to merge 1 commit into
mainfrom
allen/add-support-software-category

Conversation

@allenhouchins

@allenhouchins allenhouchins commented Jun 19, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #

Adds a new default self-service software category, rendered as 🛟 Support, alongside the existing six defaults (Browsers, Communication, Developer tools, Productivity, Security, Utilities).

What changed

Backend (Go)

  • server/fleet/software.go — added 🛟 Support to DefaultSelfServiceCategoryNames (seeds new fleets) and "Support": "🛟 Support" to LegacySoftwareCategoryNames (so GitOps/FMA manifests can reference the non-emoji Support).
  • New migration 20260619120000_AddSupportSoftwareCategory — inserts the global default (team_id=0) and backfills every existing fleet. Timestamps pinned for deterministic schema dumps; INSERT IGNORE guards the (team_id, name) unique key.
  • schema.sql regenerated via tools/dbutils.
  • cmd/maintained-apps/main.go — added Support to the FMA validator allowlist.

Frontend

  • frontend/interfaces/software.ts — added "Support" to the SoftwareCategory union.
  • frontend/pages/hosts/details/cards/Software/SelfService/helpers.ts — added { label: "🛟 Support", value: "Support" } to the fallback list.

Docs

  • docs/Configuration/yaml-files.md — documented Support as a supported GitOps category.

Note on sort order

ListSoftwareCategories does ORDER BY name under utf8mb4_unicode_ci, which sorts by the word after the (ignorable) emoji. 🛟 Support is therefore placed between 🔐 Security and 🛠️ Utilities.

Checklist for submitter

  • Changes file added for user-visible changes in changes/.

  • Input data is properly validated, SELECT * is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.

Testing

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

Verified against a dockerized MySQL:

  • Migration test TestUp_20260619120000
  • TestSoftware/SoftwareCategoryCRUD (order-sensitive assertion)
  • TestSelfServiceCategoriesCRUD + TestDeviceSelfServiceCategories integration tests
  • cmd/maintained-apps tests, ee categories test, go vet, make lint-go-incremental (0 issues)
  • tools/dbutils schema regeneration matches

Database migrations

  • Checked schema for all modified table for columns that will auto-update timestamps during migration.
  • Confirmed that updating the timestamps is acceptable, and will not cause unwanted side effects.
  • Ensured the correct collation is explicitly set for character columns (COLLATE utf8mb4_unicode_ci).

New Fleet configuration settings

  • Verified the setting is documented (GitOps categories supported values in docs/Configuration/yaml-files.md).

Summary by CodeRabbit

  • New Features
    • Introduced the "🛟 Support" category as a new self-service software classification option. Users can now better organize support-related applications within their software catalog. The category is available globally across all teams, providing improved organization and discovery capabilities for support applications alongside utilities and other existing software categories.

Adds a new default self-service software category, rendered as
"🛟 Support", alongside the existing six defaults.

- Add to fleet.DefaultSelfServiceCategoryNames (seeds new fleets) and
  LegacySoftwareCategoryNames so GitOps/FMA manifests can reference the
  non-emoji "Support".
- New migration backfills the global default and every existing fleet.
- Allow "Support" in the maintained-apps (FMA) validator.
- Add to the frontend SoftwareCategory type and fallback category list.
- Document the new supported GitOps category.

Placed between Security and Utilities so it matches the ORDER BY name
collation order used by ListSoftwareCategories.
@allenhouchins allenhouchins requested review from a team and rachaelshaw as code owners June 19, 2026 15:01
Copilot AI review requested due to automatic review settings June 19, 2026 15:01
@allenhouchins allenhouchins requested a review from a team as a code owner June 19, 2026 15:01

@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.

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.26%. Comparing base (8755d5c) to head (2073aac).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...ables/20260619120000_AddSupportSoftwareCategory.go 62.50% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #47923   +/-   ##
=======================================
  Coverage   67.25%   67.26%           
=======================================
  Files        3641     3642    +1     
  Lines      230237   230253   +16     
  Branches    11986    11988    +2     
=======================================
+ Hits       154856   154870   +14     
- Misses      61464    61465    +1     
- Partials    13917    13918    +1     
Flag Coverage Δ
backend 68.87% <62.50%> (+<0.01%) ⬆️
frontend 58.21% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

  • Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.

Pull request overview

Adds a new default self-service software category, 🛟 Support, and wires it through the backend defaults/migrations plus frontend and maintained-app validation so it can be referenced consistently (including via legacy non-emoji Support).

Changes:

  • Backend: extend default/legacy category mappings and add a migration to seed/backfill 🛟 Support.
  • Frontend: extend the category type union and the static fallback category list to include Support.
  • Maintained apps: allow Support as a valid category in the validator allowlist.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
server/fleet/software.go Adds 🛟 Support to default seeded category names and legacy name translation map.
server/datastore/mysql/schema.sql Regenerates schema seed data to include the new migration and Support category row.
server/datastore/mysql/migrations/tables/20260619120000_AddSupportSoftwareCategory.go Migration to insert global default 🛟 Support and backfill per-team rows.
server/datastore/mysql/migrations/tables/20260619120000_AddSupportSoftwareCategory_test.go Migration test verifying insertion/backfill and pinned timestamps.
frontend/pages/hosts/details/cards/Software/SelfService/helpers.ts Adds 🛟 Support to the deprecated static fallback categories list.
frontend/interfaces/software.ts Extends SoftwareCategory union with "Support".
cmd/maintained-apps/main.go Allows Support in maintained-app category validation.
docs/Configuration/yaml-files.md Excluded from diff (content not reviewed).
changes/add-support-software-category Excluded from diff (content not reviewed).
Files excluded by content exclusion policy (2)
  • changes/add-support-software-category
  • docs/Configuration/yaml-files.md

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c9641345-4821-429a-9100-180339022006

📥 Commits

Reviewing files that changed from the base of the PR and between 9a234db and 2073aac.

⛔ Files ignored due to path filters (1)
  • docs/Configuration/yaml-files.md is excluded by !**/*.md
📒 Files selected for processing (8)
  • changes/add-support-software-category
  • cmd/maintained-apps/main.go
  • frontend/interfaces/software.ts
  • frontend/pages/hosts/details/cards/Software/SelfService/helpers.ts
  • server/datastore/mysql/migrations/tables/20260619120000_AddSupportSoftwareCategory.go
  • server/datastore/mysql/migrations/tables/20260619120000_AddSupportSoftwareCategory_test.go
  • server/datastore/mysql/schema.sql
  • server/fleet/software.go

Walkthrough

Adds "🛟 Support" as a new default self-service software category. The backend domain model in server/fleet/software.go gains a new entry in DefaultSelfServiceCategoryNames and a legacy name mapping in LegacySoftwareCategoryNames. A new database migration (20260619120000) inserts the category as a global default row in software_categories and backfills one row per existing team via INSERT IGNORE … SELECT. The schema seed data and migration status table are updated to reflect the new row. The maintained-apps CLI validator gains "Support" in its allowedCategories set. On the frontend, the SoftwareCategory TypeScript union is extended and CATEGORIES_ITEMS is updated to add Support at id 6 while shifting Utilities to id 7.

Possibly related issues

Possibly related PRs

  • fleetdm/fleet#47881: Modifies the same software category seeding, backfill logic, and emoji-prefixed category name wiring that this PR extends, making the two PRs directly related at the code level.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately and concisely describes the main change: adding a new 'Support' default software category to Fleet.
Description check ✅ Passed The PR description comprehensively covers all required sections: detailed 'What changed' breakdown for backend/frontend, testing verification, database migration checks, and configuration documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch allen/add-support-software-category

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jkatz01 jkatz01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, consistent with all the new changes

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.

4 participants