Skip to content

make clear passcode activity global as well - #43483

Merged
MagnusHJensen merged 1 commit into
mainfrom
clear-passcode-activity-also-global
Apr 13, 2026
Merged

make clear passcode activity global as well#43483
MagnusHJensen merged 1 commit into
mainfrom
clear-passcode-activity-also-global

Conversation

@MagnusHJensen

@MagnusHJensen MagnusHJensen commented Apr 13, 2026

Copy link
Copy Markdown
Member

Follow up work after design review, makes the clear passcode activity global as well

Summary by CodeRabbit

  • Bug Fixes
    • Improved activity logging for passcode clearing operations to ensure proper event tracking.

@MagnusHJensen
MagnusHJensen requested a review from a team as a code owner April 13, 2026 18:38
Copilot AI review requested due to automatic review settings April 13, 2026 18:38

@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 Apr 13, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cb489169-52f5-488a-b6d1-3acca467e369

📥 Commits

Reviewing files that changed from the base of the PR and between 3c1b8fc and 26439ac.

📒 Files selected for processing (2)
  • server/fleet/activities.go
  • server/service/integration_mdm_commands_test.go
💤 Files with no reviewable changes (1)
  • server/fleet/activities.go

Walkthrough

The HostOnly() method was removed from the ActivityTypeClearedPasscode type in server/fleet/activities.go, changing how host-scoping semantics are determined for cleared-passcode activities. Correspondingly, a test in server/service/integration_mdm_commands_test.go was updated to verify both host-scoped and global activity assertions for the ActivityTypeClearedPasscode type using the iOS host identifier and display name fields.

Possibly related PRs

  • Recovery lock password activities #41529: Modifies activity-type implementations in server/fleet/activities.go to adjust host-scoping behavior for recovery-lock activity types, similar code-level changes to activity host-scoping semantics.
  • Clear passcode frontend #43084: Changes handling of the ClearedPasscode activity type to mark it as a host past activity, directly related to modifications of the same activity type's host-scoping behavior.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal and lacks required information from the template such as related issue reference, testing evidence, and applicable checklists. Add the related issue number, confirm testing was performed (especially multi-host isolation tests), and complete relevant checklist items from the PR template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: making the clear passcode activity global in addition to host-scoped.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 clear-passcode-activity-also-global

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.

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.

Pull request overview

Makes the “cleared passcode” activity appear in the global activity feed (in addition to the host-scoped activity feed), per the design review follow-up.

Changes:

  • Updated the Clear Passcode integration test to assert both host and global activities are recorded.
  • Removed the HostOnly() marker from ActivityTypeClearedPasscode, allowing it to be included in /api/latest/fleet/activities.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
server/service/integration_mdm_commands_test.go Verifies the clear passcode action generates both host and global activity entries.
server/fleet/activities.go Stops marking cleared_passcode as host-only so it shows up in the global activity list.

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

@codecov

codecov Bot commented Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.90%. Comparing base (3c1b8fc) to head (26439ac).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #43483      +/-   ##
==========================================
- Coverage   66.90%   66.90%   -0.01%     
==========================================
  Files        2596     2596              
  Lines      208220   208220              
  Branches     9208     9208              
==========================================
- Hits       139313   139309       -4     
- Misses      56237    56239       +2     
- Partials    12670    12672       +2     
Flag Coverage Δ
backend 68.68% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@MagnusHJensen
MagnusHJensen merged commit fbee6cd into main Apr 13, 2026
55 checks passed
@MagnusHJensen
MagnusHJensen deleted the clear-passcode-activity-also-global branch April 13, 2026 19:30
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.

3 participants