Skip to content

macOS FMA - Icon Composer - #46735

Merged
allenhouchins merged 6 commits into
mainfrom
macos-fma-icon-composer
Jun 4, 2026
Merged

macOS FMA - Icon Composer#46735
allenhouchins merged 6 commits into
mainfrom
macos-fma-icon-composer

Conversation

@harrisonravazzolo

@harrisonravazzolo harrisonravazzolo commented Jun 3, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added Icon Composer as a supported macOS application with install/uninstall support and a visual icon in the UI.
  • Chores

    • CI workflows updated to detect Icon Composer changes and to validate it on macOS runners using a clean Xcode state.

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 66.91%. Comparing base (a8e4253) to head (341c956).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...ges/SoftwarePage/components/icons/IconComposer.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #46735      +/-   ##
==========================================
- Coverage   66.91%   66.91%   -0.01%     
==========================================
  Files        2834     2835       +1     
  Lines      224966   224968       +2     
  Branches    11517    11517              
==========================================
+ Hits       150527   150528       +1     
- Misses      60783    60784       +1     
  Partials    13656    13656              

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

@harrisonravazzolo
harrisonravazzolo marked this pull request as ready for review June 3, 2026 17:23

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

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR adds Icon Composer as a new maintained application to the Fleet deployment system. It introduces the app's Homebrew manifest definition, registers it in the maintained apps catalog, and provides installation/uninstallation shell scripts that handle DMG mounting, application copying, and cleanup. CI/CD workflows are extended to detect icon-composer/darwin changes and conditionally remove pre-installed Xcode during validation. The frontend is updated with an SVG icon component and registry mapping to display Icon Composer in the software page.

Possibly related issues

  • New FMA: Icon Composer #46706: This PR directly implements the Icon Composer FMA feature by adding the complete manifest, installer definition with scripts, apps.json entry, workflow detection for the icon-composer/darwin slug, and frontend icon component.

Possibly related PRs

  • fleetdm/fleet#45858: Also adds a new app-specific icon component and updates SOFTWARE_NAME_TO_ICON_MAP in the same frontend icon registry.
  • fleetdm/fleet#45404: Similarly extends the frontend icon registry with a new icon component and mapping.
  • fleetdm/fleet#46734: Adds a new macOS FMA and updates the same SoftwarePage icon registry with a new icon mapping.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is empty; no description was provided by the author despite the template requiring multiple checklist items and testing documentation. Add a comprehensive pull request description following the template, including related issue number, relevant checklist items for security/testing/database/compatibility, and testing evidence.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'macOS FMA - Icon Composer' accurately summarizes the main change: adding Icon Composer support to the macOS FMA (Flexible Maintenance Approach) system.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch macos-fma-icon-composer

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.

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ee/maintained-apps/outputs/icon-composer/darwin.json`:
- Around line 6-7: The install-state SQL for "exists" and "patched" is too broad
(matches any com.apple.IconComposer bundle); change both query strings to
restrict to the standalone app bundle by requiring the app record's path to be
'/Applications/Icon Composer.app' (e.g. add AND path = '/Applications/Icon
Composer.app' to the WHERE clauses that reference bundle_identifier =
'com.apple.IconComposer'). Ensure you update both the "exists" and "patched"
entries so Fleet only considers the managed standalone install.
- Line 19: The installer currently moves the live app aside before verifying the
staged copy; update the deployment flow in the script around TMPDIR/APPDIR so
you first copy and validate the new bundle into TMPDIR (verify file existence
and a successful sudo cp -R), only then atomically swap-in the new app (use sudo
mv to replace the live "/Applications/Icon Composer.app"), and if the swap or
verification fails restore the original from the backup (or abort without
removing the original). Ensure error checking sets non-zero exit codes on
failures, wrap the sequence that does sudo cp -R "$TMPDIR/Icon Composer.app"
"$APPDIR" and sudo mv "$APPDIR/Icon Composer.app" "$APPDIR/Icon
Composer.app.bkp" with checks that revert to the backup on failure, and keep
quit_and_track_application and relaunch_application calls unchanged except to
run quit before the verified swap and relaunch only after successful swap.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8993dc83-58c6-4588-87e8-e833d7ccc9cd

📥 Commits

Reviewing files that changed from the base of the PR and between a8e4253 and edb4e68.

⛔ Files ignored due to path filters (1)
  • website/assets/images/app-icon-icon-composer-60x60@2x.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • .github/workflows/test-fma-darwin-pr-only.yml
  • .github/workflows/test-fma-darwin.yml
  • ee/maintained-apps/inputs/homebrew/icon-composer.json
  • ee/maintained-apps/outputs/apps.json
  • ee/maintained-apps/outputs/icon-composer/darwin.json
  • frontend/pages/SoftwarePage/components/icons/IconComposer.tsx
  • frontend/pages/SoftwarePage/components/icons/index.ts

Comment thread ee/maintained-apps/outputs/icon-composer/darwin.json Outdated
Comment thread ee/maintained-apps/outputs/icon-composer/darwin.json
Restrict detection and patch checks for com.apple.IconComposer to exclude copies bundled inside Xcode.app by adding `path NOT LIKE '%/Xcode.app/%'` to both `exists` and `patched` SQL queries. This avoids false positives from the Xcode bundle and ensures version comparisons only apply to standalone installations.

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

♻️ Duplicate comments (2)
ee/maintained-apps/outputs/icon-composer/darwin.json (2)

19-19: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make app replacement transactional with rollback.

On Line 19, the installer still moves the live app before verifying the staged copy and has no restore path on failure. A failed copy/swap can leave the host without Icon Composer.

Suggested flow change
- if [ -d "$APPDIR/Icon Composer.app" ]; then
-   sudo mv "$APPDIR/Icon Composer.app" "$TMPDIR/Icon Composer.app.bkp"
- fi
- sudo cp -R "$TMPDIR/Icon Composer.app" "$APPDIR"
+ # 1) validate staged app exists
+ [ -d "$TMPDIR/Icon Composer.app" ] || exit 1
+ # 2) stage into /Applications with temp name
+ sudo rm -rf "$APPDIR/Icon Composer.app.new"
+ sudo cp -R "$TMPDIR/Icon Composer.app" "$APPDIR/Icon Composer.app.new" || exit 1
+ # 3) swap only after successful stage
+ if [ -d "$APPDIR/Icon Composer.app" ]; then
+   sudo mv "$APPDIR/Icon Composer.app" "$APPDIR/Icon Composer.app.bkp" || exit 1
+ fi
+ sudo mv "$APPDIR/Icon Composer.app.new" "$APPDIR/Icon Composer.app" || {
+   [ -d "$APPDIR/Icon Composer.app.bkp" ] && sudo mv "$APPDIR/Icon Composer.app.bkp" "$APPDIR/Icon Composer.app"
+   exit 1
+ }
+ sudo rm -rf "$APPDIR/Icon Composer.app.bkp"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ee/maintained-apps/outputs/icon-composer/darwin.json` at line 19, The
installer currently moves the live app before verifying the staged copy; modify
the install flow around APPDIR/TMPDIR (where it currently does sudo mv
"$APPDIR/Icon Composer.app" "$TMPDIR/Icon Composer.app.bkp" and sudo cp -R
"$TMPDIR/Icon Composer.app" "$APPDIR") to be transactional: first ensure the
staged "$TMPDIR/Icon Composer.app" is valid (exists, readable, and launches or
at least contains expected Info.plist bundle identifier), then atomically swap
by (1) moving the existing "$APPDIR/Icon Composer.app" to a backup (e.g.,
"$APPDIR/Icon Composer.app.bkp") only after verification succeeds, (2) moving
the staged app into "$APPDIR" (using sudo mv), and on any failure during the
swap restore the backup to "$APPDIR" and clean up staged files; also remove the
backup only after successful install and
relaunch_application('com.apple.IconComposer') succeeds. Ensure all operations
use sudo where necessary and propagate non-zero exit codes to trigger the
rollback.

6-7: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Constrain install-state queries to Fleet-managed path.

On Line 6 and Line 7, excluding Xcode.app is not sufficient; these queries can still match non-managed installs outside /Applications/Icon Composer.app, causing state drift versus the uninstall/install target.

Proposed minimal fix
-        "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.apple.IconComposer' AND path NOT LIKE '%/Xcode.app/%';",
-        "patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'com.apple.IconComposer' AND path NOT LIKE '%/Xcode.app/%' AND version_compare(bundle_short_version, '1.2') < 0);"
+        "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.apple.IconComposer' AND path = '/Applications/Icon Composer.app';",
+        "patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM apps WHERE bundle_identifier = 'com.apple.IconComposer' AND path = '/Applications/Icon Composer.app' AND version_compare(bundle_short_version, '1.2') < 0);"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ee/maintained-apps/outputs/icon-composer/darwin.json` around lines 6 - 7, The
current SQL in the "exists" and "patched" entries still matches installs outside
the Fleet-managed location; update both queries to constrain the path to the
Fleet-managed install location (e.g., require path to start with or equal
'/Applications/Icon Composer.app') instead of only excluding Xcode.app. Modify
the "exists" and "patched" SELECTs that reference bundle_identifier =
'com.apple.IconComposer' and path NOT LIKE '%/Xcode.app/%' to add a path
condition that limits results to the Fleet-managed path (for example path LIKE
'/Applications/Icon Composer.app/%' or path = '/Applications/Icon
Composer.app').
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@ee/maintained-apps/outputs/icon-composer/darwin.json`:
- Line 19: The installer currently moves the live app before verifying the
staged copy; modify the install flow around APPDIR/TMPDIR (where it currently
does sudo mv "$APPDIR/Icon Composer.app" "$TMPDIR/Icon Composer.app.bkp" and
sudo cp -R "$TMPDIR/Icon Composer.app" "$APPDIR") to be transactional: first
ensure the staged "$TMPDIR/Icon Composer.app" is valid (exists, readable, and
launches or at least contains expected Info.plist bundle identifier), then
atomically swap by (1) moving the existing "$APPDIR/Icon Composer.app" to a
backup (e.g., "$APPDIR/Icon Composer.app.bkp") only after verification succeeds,
(2) moving the staged app into "$APPDIR" (using sudo mv), and on any failure
during the swap restore the backup to "$APPDIR" and clean up staged files; also
remove the backup only after successful install and
relaunch_application('com.apple.IconComposer') succeeds. Ensure all operations
use sudo where necessary and propagate non-zero exit codes to trigger the
rollback.
- Around line 6-7: The current SQL in the "exists" and "patched" entries still
matches installs outside the Fleet-managed location; update both queries to
constrain the path to the Fleet-managed install location (e.g., require path to
start with or equal '/Applications/Icon Composer.app') instead of only excluding
Xcode.app. Modify the "exists" and "patched" SELECTs that reference
bundle_identifier = 'com.apple.IconComposer' and path NOT LIKE '%/Xcode.app/%'
to add a path condition that limits results to the Fleet-managed path (for
example path LIKE '/Applications/Icon Composer.app/%' or path =
'/Applications/Icon Composer.app').

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 71b10982-bbc8-4663-802b-4e181d354fdc

📥 Commits

Reviewing files that changed from the base of the PR and between edb4e68 and 341c956.

📒 Files selected for processing (1)
  • ee/maintained-apps/outputs/icon-composer/darwin.json

@allenhouchins allenhouchins self-assigned this Jun 3, 2026
@allenhouchins

Copy link
Copy Markdown
Member

@lukeheath @georgekarrv @getvictor can we get a review on this? It requires CODEOWNERS since its editing an existing workflow. The edit is small, just expanding on an already established pattern to account for a new app.

find /Applications -maxdepth 1 -iname "Xcode*.app" -type d | while read app;
do
echo "Removing $app..."
sudo rm -rf "$app"

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.

No one else squeamish by this :D

@allenhouchins
allenhouchins merged commit 2e3c084 into main Jun 4, 2026
30 checks passed
@allenhouchins
allenhouchins deleted the macos-fma-icon-composer branch June 4, 2026 18:26
@coderabbitai coderabbitai Bot mentioned this pull request Jul 16, 2026
21 tasks
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