Skip to content

Rename MDM detector and references to Management#4

Merged
rodchristiansen merged 3 commits into
mainfrom
refactor/mdm-to-management
Jun 16, 2026
Merged

Rename MDM detector and references to Management#4
rodchristiansen merged 3 commits into
mainfrom
refactor/mdm-to-management

Conversation

@rodchristiansen

Copy link
Copy Markdown
Contributor

What

Renames the macOS "MDM" vocabulary to "Management", unifying it with the Windows side (which models the same concept as PolicyDetector → being renamed to ManagementDetector in a sibling PR). One mental model across both platforms.

  • MDMDetectorManagementDetector (file + type)
  • isManagedByMDM(key:) / isMDMManaged(_:)isManaged
  • mdmPreferenceDomainsmanagementPreferenceDomains
  • loadFromMDMOrLocal()loadFromManagementOrLocal()
  • mdmTimeoutmanagementTimeout
  • MDM in comments, log lines, and the GUI lock label → Management / Managed

Not changed

External preference domains (com.github.bootstrapmate, io.macadmins.installapplications) are untouched — those are wire identifiers, not code naming.

Safety

Pure rename, no behavioural change. swift build and swift test (13 tests) pass.

Notes

Based on main (independent of the signature-verification PR #3, which also touches ConfigManager.swift). If both land, expect a trivial merge resolution in ConfigManager.swift.

Unify the management-detection naming with the Windows side (which uses the
same concept) under a single 'Management' vocabulary:

- MDMDetector -> ManagementDetector (file + type)
- isManagedByMDM(key:) / isMDMManaged(_:) -> isManaged
- mdmPreferenceDomains -> managementPreferenceDomains
- loadFromMDMOrLocal() -> loadFromManagementOrLocal()
- mdmTimeout -> managementTimeout
- 'MDM' in comments, log lines, and the GUI lock label -> 'Management'/'Managed'

Pure rename — no behavioural change. External preference domains
(com.github.bootstrapmate, io.macadmins.installapplications) are unchanged.
swift build and swift test pass.

Copilot AI 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.

Pull request overview

Renames macOS “MDM” terminology across the Swift codebase to “Management/Managed” to align naming with the Windows side and unify the mental model for profile-managed preferences detection.

Changes:

  • Renamed MDMDetectorManagementDetector and updated GUI codepaths to use isManaged(...)/managed-key tracking.
  • Renamed config/manifest APIs and identifiers (mdmPreferenceDomains, loadFromMDMOrLocal, mdmTimeout, etc.) to “management” equivalents.
  • Updated user-facing strings and comments from “MDM” to “Management/Managed”.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Sources/core/Utilities/ManagementDetector.swift Renames the detector type and updates its public API naming to ManagementDetector / isManaged.
Sources/core/Managers/StatusManager.swift Updates header comment terminology from MDM to management.
Sources/core/Managers/ManifestManager.swift Renames the stubbed manifest-loading helper to loadFromManagementOrLocal() and updates its log line.
Sources/core/Managers/ConfigManager.swift Renames the managed-preferences domain list to managementPreferenceDomains and updates related comments/logs.
Sources/cli/bootstrapmate.swift Renames timeout and CLI log strings from MDM to management during profile-wait logic and missing-URL reporting.
Sources/app/Views/SettingsView.swift Updates GUI “managed” detection call and the lock label text.
Sources/app/ViewModels/SettingsViewModel.swift Updates detector references and renames isMDMManagedisManaged, plus related comments.
Comments suppressed due to low confidence (2)

Sources/core/Utilities/ManagementDetector.swift:52

  • Doc comment uses the redundant/awkward phrase "management-managed"; this reads like a typo and is harder to parse. Consider using "managed" (or "profile-managed") consistently.
    Sources/core/Utilities/ManagementDetector.swift:66
  • Doc comment uses the redundant/awkward phrase "management-managed". Prefer "managed" (or "profile-managed") to avoid repetition and improve clarity.

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

Comment thread Sources/app/Views/SettingsView.swift Outdated
}

// MARK: - MDM Status
// MARK: - management Status
Comment thread Sources/app/ViewModels/SettingsViewModel.swift Outdated
Comment on lines +192 to +193
Logger.info("Waiting for management configuration profile (timeout: \(managementTimeout)s)...")
earlyLog("Waiting for management config...")
Comment thread Sources/cli/bootstrapmate.swift Outdated
// Log progress every 30 seconds
if i % 30 == 0 {
Logger.debug("Still waiting for MDM config... (\(i)s elapsed)")
Logger.debug("Still waiting for management config... (\(i)s elapsed)")
Comment thread Sources/cli/bootstrapmate.swift Outdated
Comment thread Sources/cli/bootstrapmate.swift Outdated
- Replace the awkward 'management-managed' / 'non-management-managed'
  phrasing with 'managed' / 'non-managed' in doc and header comments.
- Title-case the SettingsViewModel MARK section.
- Sentence-case user-facing CLI log lines that begin with 'management',
  and clarify 'via CLI or managed preferences'.
@rodchristiansen rodchristiansen merged commit ff77108 into main Jun 16, 2026
1 check passed
@rodchristiansen rodchristiansen deleted the refactor/mdm-to-management branch June 16, 2026 01:58
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