Move Apple Business instructions out of UI and into guides - #43638
Conversation
There was a problem hiding this comment.
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.
Review Summary by QodoMove Apple Business Manager instructions to external guides
WalkthroughsDescription• Move Apple Business Manager setup instructions from UI modals to external guides • Update routing to point ABM-related links to new guide pages • Simplify AddAbmModal and RenewAbmModal by removing inline instructions • Replace detailed step lists with brief descriptions and links to guides Diagramflowchart LR
A["ABM UI Modals<br/>with inline instructions"] -->|Remove detailed steps| B["Simplified modals<br/>with guide links"]
C["Old routing<br/>to docs pages"] -->|Update routes| D["New routing<br/>to guide pages"]
B -->|Link to| E["External guides<br/>apple-mdm-setup"]
D -->|Point to| E
File Changes1. website/config/routes.js
|
Code Review by Qodo
1. Broken setup-abm and renew-abm links
|
| 'GET /learn-more-about/turn-on-apple-mdm': '/guides/apple-mdm-setup#turn-on-apple-mdm', | ||
| 'GET /learn-more-about/setup-abm': '/guides/apple-mdm-setup#apple-business-ab', | ||
| 'GET /learn-more-about/renew-apns': '/guides/apple-mdm-setup#renew-apns', | ||
| 'GET /learn-more-about/renew-abm': '/docs/using-fleet/mdm-setup#apple-business-manager-abm', | ||
| 'GET /learn-more-about/renew-abm': '/guides/apple-mdm-setup#renew-ab', |
There was a problem hiding this comment.
1. Broken setup-abm and renew-abm links 📎 Requirement gap ≡ Correctness
The new Apple Business guide links in the UI point to /learn-more-about/setup-abm and /learn-more-about/renew-abm, but the configured redirects use fragment anchors (#apple-business-ab, #renew-ab) that don’t exist in the target guide. Users clicking "Learn how" may land on the wrong section or a broken anchor, failing the requirement that the guide link be present and accessible.
Agent Prompt
## Issue description
The `/learn-more-about/setup-abm` and `/learn-more-about/renew-abm` redirects use fragment identifiers that don’t exist in the target guide (`/guides/apple-mdm-setup`). This makes the new UI "Learn how" links potentially broken or misdirected.
## Issue Context
The UI was updated to remove inline Apple Business instructions and replace them with guide links. Per compliance, the guide link must be present and accessible (not broken).
## Fix Focus Areas
- website/config/routes.js[1162-1165]
- articles/apple-mdm-setup.md[37-55]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
These links are updated in a separate PR:
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #43638 +/- ##
==========================================
- Coverage 66.91% 66.90% -0.01%
==========================================
Files 2600 2600
Lines 208643 208359 -284
Branches 9304 9210 -94
==========================================
- Hits 139608 139412 -196
+ Misses 56327 56273 -54
+ Partials 12708 12674 -34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
WalkthroughThis pull request refactors the Apple Business Manager (ABM) integration UI by removing inline step-by-step setup instructions and replacing them with links to external guides. The Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@website/config/routes.js`:
- Around line 1162-1165: Update the two incorrect redirect targets in routes.js:
replace the value for the route key 'GET /learn-more-about/setup-abm' currently
pointing to '/guides/apple-mdm-setup#apple-business-ab' with the correct
fragment '/guides/apple-mdm-setup#apple-business-manager-abm', and replace the
value for 'GET /learn-more-about/renew-abm' currently pointing to
'/guides/apple-mdm-setup#renew-ab' with
'/guides/apple-mdm-setup#to-renew-an-abm-token'; alternatively, if you prefer to
change the docs instead, add matching markdown headings (e.g., "### Renew ABM"
or a heading that generates "#apple-business-ab") so the existing route
fragments resolve.
🪄 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: 2015a304-4b64-4a37-bfe7-bd8870d91f27
📒 Files selected for processing (6)
frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/AppleBusinessManagerPage.tsxfrontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/AddAbmModal/AddAbmModal.tsxfrontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/AddAbmModal/_styles.scssfrontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/RenewAbmModal/RenewAbmModal.tsxfrontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/RenewAbmModal/_styles.scsswebsite/config/routes.js
💤 Files with no reviewable changes (3)
- frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/AppleBusinessManagerPage.tsx
- frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/RenewAbmModal/_styles.scss
- frontend/pages/admin/IntegrationsPage/cards/MdmSettings/AppleBusinessManagerPage/components/AddAbmModal/_styles.scss
| 'GET /learn-more-about/turn-on-apple-mdm': '/guides/apple-mdm-setup#turn-on-apple-mdm', | ||
| 'GET /learn-more-about/setup-abm': '/guides/apple-mdm-setup#apple-business-ab', | ||
| 'GET /learn-more-about/renew-apns': '/guides/apple-mdm-setup#renew-apns', | ||
| 'GET /learn-more-about/renew-abm': '/docs/using-fleet/mdm-setup#apple-business-manager-abm', | ||
| 'GET /learn-more-about/renew-abm': '/guides/apple-mdm-setup#renew-ab', |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
url="https://fleetdm.com/guides/apple-mdm-setup"
html="$(curl -fsSL "$url")"
echo "Checking fragment IDs on $url"
for id in turn-on-apple-mdm apple-business-ab renew-ab troubleshooting; do
if printf '%s' "$html" | rg -q "id=\"$id\""; then
echo "FOUND #$id"
else
echo "MISSING #$id"
fi
doneRepository: fleetdm/fleet
Length of output: 221
🏁 Script executed:
find . -name "*apple-mdm*" -o -name "*apple*mdm*" | head -20Repository: fleetdm/fleet
Length of output: 857
🏁 Script executed:
find . -path "*/articles/*" -o -path "*/guides/*" | grep -i apple | head -20Repository: fleetdm/fleet
Length of output: 1302
🏁 Script executed:
git ls-files | grep -i "apple.*mdm\|mdm.*apple" | head -20Repository: fleetdm/fleet
Length of output: 1178
🏁 Script executed:
head -100 articles/apple-mdm-setup.mdRepository: fleetdm/fleet
Length of output: 6241
🏁 Script executed:
cat articles/apple-mdm-setup.md | rg "^#{1,6}\s+" | head -30Repository: fleetdm/fleet
Length of output: 953
🏁 Script executed:
wc -l articles/apple-mdm-setup.mdRepository: fleetdm/fleet
Length of output: 88
🏁 Script executed:
find website -name "*config*" -o -name "*astro*" | grep -E "\.(ts|js|json)$" | head -10Repository: fleetdm/fleet
Length of output: 231
🏁 Script executed:
cat website/astro.config.ts 2>/dev/null | head -50Repository: fleetdm/fleet
Length of output: 39
🏁 Script executed:
rg "slug\|fragment\|heading" website --type ts --type js -i | head -20Repository: fleetdm/fleet
Length of output: 39
🏁 Script executed:
rg "apple-business" website/config/routes.js -B2 -A2Repository: fleetdm/fleet
Length of output: 1342
🏁 Script executed:
find website -name "*.ts" -o -name "*.js" -o -name "*.md" | xargs grep -l "remark\|rehype\|heading\|fragment" 2>/dev/null | head -10Repository: fleetdm/fleet
Length of output: 568
🏁 Script executed:
cat website/package.json | grep -A5 -B5 "remark\|rehype"Repository: fleetdm/fleet
Length of output: 39
🏁 Script executed:
rg "apple-business-manager" articles/apple-mdm-setup.md -i -C2Repository: fleetdm/fleet
Length of output: 39
🏁 Script executed:
# Check what the exact heading is for ABM section
sed -n '45,75p' articles/apple-mdm-setup.mdRepository: fleetdm/fleet
Length of output: 2193
🏁 Script executed:
sed -n '34,50p' articles/apple-mdm-setup.mdRepository: fleetdm/fleet
Length of output: 982
🏁 Script executed:
# Extract all headings with their context to understand the structure
rg "^#{1,6}\s+.*" articles/apple-mdm-setup.md -oRepository: fleetdm/fleet
Length of output: 953
🏁 Script executed:
# Check if there's any heading with just "Renew AB" or "Apple Business AB"
rg -i "renew.*ab|apple.*business" articles/apple-mdm-setup.mdRepository: fleetdm/fleet
Length of output: 1370
🏁 Script executed:
find website -name "*.config.*" -o -name "*.ts" | xargs grep -l "slug\|heading\|rehype" 2>/dev/null | head -5Repository: fleetdm/fleet
Length of output: 39
🏁 Script executed:
cat website/config.js 2>/dev/null | head -100Repository: fleetdm/fleet
Length of output: 39
🏁 Script executed:
# Check if there's a build process that might customize heading IDs
rg "apple-business-manager-abm|apple-business-ab" website --type md --type ts --type jsRepository: fleetdm/fleet
Length of output: 315
🏁 Script executed:
# Let's check the actual rendering by looking at recent HTML output or build artifacts
find . -name "*.html" -path "*/apple-mdm-setup*" 2>/dev/null | head -5Repository: fleetdm/fleet
Length of output: 39
🏁 Script executed:
rg "github-slugger|rehype-slug|heading.*id" website --type ts --type js -i | head -20Repository: fleetdm/fleet
Length of output: 4230
🏁 Script executed:
# Check the package.json dependencies to see what markdown processor is used
cat website/package.json | head -100Repository: fleetdm/fleet
Length of output: 4173
🏁 Script executed:
# Search for any custom heading ID configuration
rg "turnOnAppleMdm|apple.business.*ab|renew.*ab" . --type ts --type js -iRepository: fleetdm/fleet
Length of output: 9659
Fix incorrect fragment IDs in ABM redirect routes.
Two of the new redirects point to non-existent fragment IDs:
#apple-business-abdoesn't exist; the actual heading is "## Apple Business Manager (ABM)" which generates#apple-business-manager-abm#renew-abdoesn't exist; the "To renew an ABM token" subsection generates#to-renew-an-abm-token
Update routes to use the correct fragment IDs, or add new markdown headings (e.g., "### Renew ABM") that match the intended targets.
Current incorrect routes:
'GET /learn-more-about/setup-abm': '/guides/apple-mdm-setup#apple-business-ab',
'GET /learn-more-about/renew-abm': '/guides/apple-mdm-setup#renew-ab',
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@website/config/routes.js` around lines 1162 - 1165, Update the two incorrect
redirect targets in routes.js: replace the value for the route key 'GET
/learn-more-about/setup-abm' currently pointing to
'/guides/apple-mdm-setup#apple-business-ab' with the correct fragment
'/guides/apple-mdm-setup#apple-business-manager-abm', and replace the value for
'GET /learn-more-about/renew-abm' currently pointing to
'/guides/apple-mdm-setup#renew-ab' with
'/guides/apple-mdm-setup#to-renew-an-abm-token'; alternatively, if you prefer to
change the docs instead, add matching markdown headings (e.g., "### Renew ABM"
or a heading that generates "#apple-business-ab") so the existing route
fragments resolve.
There was a problem hiding this comment.
This is ok. See this comment here: #43638 (comment)
For the following quick win:
Summary by CodeRabbit
Improvements
Documentation