Skip to content

OAB: Update settings and add activity template - #52570

Open
MagnusHJensen wants to merge 3 commits into
mainfrom
52064-only-ab-settings
Open

OAB: Update settings and add activity template#52570
MagnusHJensen wants to merge 3 commits into
mainfrom
52064-only-ab-settings

Conversation

@MagnusHJensen

@MagnusHJensen MagnusHJensen commented Sep 4, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #52064

Screenshot 2026-09-04 at 15 50 54 Screenshot 2026-09-04 at 15 50 45 Screenshot 2026-09-04 at 15 47 19 Screenshot 2026-09-04 at 15 46 09 Screenshot 2026-09-04 at 15 45 31 Screenshot 2026-09-04 at 15 45 23

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • 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.
  • Timeouts are implemented and retries are limited to avoid infinite loops
  • If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes

Testing

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

Frontend

  • Attached a screenshot or screen recording of each user-visible change. For changes to existing UI, show the before and after.

Summary by CodeRabbit

  • New Features

    • Added an organization setting to allow enrollment only for Apple Business Manager company-owned devices.
    • Updated Apple enrollment settings to reflect whether personal BYOD enrollment is available.
    • Added activity feed entries and filters for enabling or disabling Apple Business-only enrollment.
    • Added Managed Device Attestation guidance with a link to related documentation.
  • Improvements

    • Clarified enrollment and hardware attestation labels, help text, and compatibility considerations.

Copilot AI lite review requested due to automatic review settings September 4, 2026 13:53
@MagnusHJensen
MagnusHJensen requested a review from a team as a code owner September 4, 2026 13:53
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.79%. Comparing base (84a5db8) to head (7b510fd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ticEnrollmentCard/AppleAutomaticEnrollmentCard.tsx 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #52570      +/-   ##
==========================================
- Coverage   75.79%   75.79%   -0.01%     
==========================================
  Files        4097     4097              
  Lines      247480   247498      +18     
  Branches    14068    14238     +170     
==========================================
+ Hits       187573   187586      +13     
- Misses      59731    59736       +5     
  Partials      176      176              
Flag Coverage Δ
frontend 67.69% <55.00%> (+<0.01%) ⬆️

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.

🟡 Changes recommended

There’s at least one confirmed runtime/type-safety issue (unsafe appConfig.mdm access and missing required IMdmConfig mock field) plus unmet spec-alignment/tests for the new behaviors.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR implements the frontend UI and activity-feed wiring for “Apple Business-only enrollment” (AB-only) mode, including Org settings controls, Integrations copy updates, and new activity templates/types.

Changes:

  • Adds a new Advanced option toggle for “Allow only Apple Business enrollments” and updates the hardware attestation checkbox copy/help text.
  • Updates the Apple Automatic Enrollment (ADE) card copy to conditionally remove BYOD language when AB-only mode is enabled.
  • Adds two new activity types and renders them in the global activity feed + filter labels.
File summaries
File Description
frontend/pages/DashboardPage/cards/ActivityFeed/GlobalActivityItem/GlobalActivityItem.tsx Adds templates/switch cases for two new AB-only enrollment activity types.
frontend/pages/admin/OrgSettingsPage/cards/Advanced/components/HostLifecycleSection/HostLifecycleSection.tsx Updates Host lifecycle UI copy and adds the AB-only enrollment checkbox.
frontend/pages/admin/OrgSettingsPage/cards/Advanced/Advanced.tsx Extends Advanced settings form state + PATCH payload to include the AB-only enrollment flag.
frontend/pages/admin/IntegrationsPage/cards/MdmSettings/components/AppleBusinessManagerSection/AppleBusinessManagerSection.tsx Threads AB-only enrollment flag into the ADE card.
frontend/pages/admin/IntegrationsPage/cards/MdmSettings/components/AppleBusinessManagerSection/AppleAutomaticEnrollmentCard/AppleAutomaticEnrollmentCard.tsx Conditionally adjusts ADE card copy when AB-only enrollment is enabled.
frontend/interfaces/config.ts Adds the new MDM config field to the frontend config interface.
frontend/interfaces/activity.ts Adds new ActivityType enum entries and filter-label mappings for AB-only enrollment activities.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 6
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread frontend/interfaces/config.ts
Comment thread frontend/pages/admin/OrgSettingsPage/cards/Advanced/Advanced.tsx
Comment thread frontend/interfaces/activity.ts Outdated
Comment thread frontend/pages/admin/OrgSettingsPage/cards/Advanced/Advanced.tsx
@coderabbitai

coderabbitai Bot commented Sep 4, 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: Team

Run ID: 6712e8c7-3cbd-4420-8733-dda01f491d35

📥 Commits

Reviewing files that changed from the base of the PR and between 807a8be and 7b510fd.

📒 Files selected for processing (3)
  • frontend/interfaces/activity.ts
  • frontend/pages/DashboardPage/cards/ActivityFeed/GlobalActivityItem/GlobalActivityItem.tests.tsx
  • frontend/pages/DashboardPage/cards/ActivityFeed/GlobalActivityItem/GlobalActivityItem.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.


Walkthrough

The PR adds a required MDM configuration flag for Apple Business-only enrollment. Organization Advanced settings initialize and save the flag, and premium users can edit it alongside updated hardware attestation text. The Apple Business Manager ADE card displays different enrollment copy when the flag is enabled. The activity model and activity feed now support enabled and disabled Apple Business-only enrollment events.

Merge Risk: ⚪ Minimal · up to 7b510

This change adds Apple Business-only enrollment settings, related ADE messaging, and enrollment activity entries. The reviewed activity support is wired consistently and covered by focused tests, with no remaining merge-readiness risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The implementation covers the configuration field, organization settings checkbox, hardware-attestation rename, ADE card copy, activity types, filter labels, activity templates, and related activity-f… Add or provide evidence for the required Advanced settings tests and ADE card tests. Verify the final hardware-attestation help text and all Premium, Free, and GitOps behaviors against issue #52064.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the settings update and activity-template changes covered by the pull request.
Description check ✅ Passed The description includes the linked issue, relevant checklist items, manual QA status, and screenshots for the user-visible frontend changes. It does not document automated test updates, although the …
Out of Scope Changes check ✅ Passed The changed files and functionality are directly related to Apple Business-only enrollment, hardware-attestation settings, ADE card copy, and activity-feed support described in issue #52064. No unrela…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 9…
Full details: Linked Issues check

Explanation

The implementation covers the configuration field, organization settings checkbox, hardware-attestation rename, ADE card copy, activity types, filter labels, activity templates, and related activity-feed tests. The linked issue also requires updates to Advanced settings tests and ADE card tests, but the provided change summary shows only GlobalActivityItem tests.

  • Fix all pre-merge checks with AI
✨ 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 52064-only-ab-settings

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.

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.

AB-only enrollment: Settings UI and activity feed

2 participants