Rename MDM detector and references to Management#4
Merged
Conversation
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.
There was a problem hiding this comment.
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
MDMDetector→ManagementDetectorand updated GUI codepaths to useisManaged(...)/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 isMDMManaged → isManaged, 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.
| } | ||
|
|
||
| // MARK: - MDM Status | ||
| // MARK: - management Status |
Comment on lines
+192
to
+193
| Logger.info("Waiting for management configuration profile (timeout: \(managementTimeout)s)...") | ||
| earlyLog("Waiting for management config...") |
| // 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)") |
- 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'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Renames the macOS "MDM" vocabulary to "Management", unifying it with the Windows side (which models the same concept as
PolicyDetector→ being renamed toManagementDetectorin a sibling PR). One mental model across both platforms.MDMDetector→ManagementDetector(file + type)isManagedByMDM(key:)/isMDMManaged(_:)→isManagedmdmPreferenceDomains→managementPreferenceDomainsloadFromMDMOrLocal()→loadFromManagementOrLocal()mdmTimeout→managementTimeoutMDMin comments, log lines, and the GUI lock label →Management/ManagedNot 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 buildandswift test(13 tests) pass.Notes
Based on
main(independent of the signature-verification PR #3, which also touchesConfigManager.swift). If both land, expect a trivial merge resolution inConfigManager.swift.