Rename skipped install activity flag - #51102
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #51102 +/- ##
==========================================
- Coverage 68.65% 68.64% -0.01%
==========================================
Files 3993 3995 +2
Lines 257448 257616 +168
Branches 13806 13806
==========================================
+ Hits 176749 176853 +104
- Misses 64988 65030 +42
- Partials 15711 15733 +22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Renames the installed software activity detail flag for patch-when-closed “skip” events from install_skipped_when_app_open to the Product-approved skipped_install, aligning backend JSON, Go types, and all frontend consumers.
Changes:
- Renamed the activity details field in
ActivityTypeInstalledSoftware(InstallSkippedWhenAppOpen→SkippedInstall) and updated emission code and backend tests. - Updated frontend readers (activity feed, host activity item, policy automations activities table, install details modal) and their unit tests to use
skipped_install. - Updated frontend activity details typing to reflect the new API field.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/service/orbit.go | Emits SkippedInstall on the installed software activity payload. |
| server/service/orbit_test.go | Updates assertions to validate SkippedInstall behavior. |
| server/fleet/activities.go | Renames the Go field + JSON tag to skipped_install. |
| frontend/pages/policies/details/components/PolicyAutomationsActivitiesTable/PolicyAutomationsActivitiesTable.tests.tsx | Updates test fixtures to use skipped_install. |
| frontend/pages/policies/details/components/PolicyAutomationsActivitiesTable/helpers.tsx | Switches logic to read details.skipped_install. |
| frontend/pages/hosts/details/cards/Activity/ActivityItems/InstalledSoftwareActivityItem/InstalledSoftwareActivityItem.tsx | Switches host activity rendering to use details.skipped_install. |
| frontend/pages/hosts/details/cards/Activity/ActivityItems/InstalledSoftwareActivityItem/InstalledSoftwareActivityItem.tests.tsx | Updates test helper/fixtures for skipped_install. |
| frontend/pages/DashboardPage/cards/ActivityFeed/GlobalActivityItem/GlobalActivityItem.tsx | Switches global activity feed template logic to skipped_install. |
| frontend/pages/DashboardPage/cards/ActivityFeed/GlobalActivityItem/GlobalActivityItem.tests.tsx | Updates activity feed test fixtures for skipped_install. |
| frontend/interfaces/activity.ts | Replaces install_skipped_when_app_open with skipped_install in the activity details interface. |
| frontend/components/ActivityDetails/InstallDetails/SoftwareInstallDetailsModal/SoftwareInstallDetailsModal.tsx | Renames modal details + props to skipped_install / skippedInstall and updates conditional rendering. |
| frontend/components/ActivityDetails/InstallDetails/SoftwareInstallDetailsModal/SoftwareInstallDetailsModal.tests.tsx | Updates modal tests to pass and assert the renamed flag. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
WalkthroughThe skipped-install activity flag is renamed from Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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
🧹 Nitpick comments (1)
server/service/orbit_test.go (1)
1365-1365: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAdd a JSON contract assertion for the renamed field.
These assertions inspect
SkippedInstallon the Go struct. They do not verify that the emitted payload usesskipped_install. Add a focused assertion inserver/fleet/activities_test.goor an API-level test for the new key and the absence ofinstall_skipped_when_app_open.Also applies to: 1390-1390
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@server/service/orbit_test.go` at line 1365, The tests only validate the Go field SkippedInstall and do not verify the serialized JSON contract. Add a focused JSON/API assertion covering the activity payload, requiring the renamed skipped_install key and confirming install_skipped_when_app_open is absent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@server/fleet/activities.go`:
- Around line 1218-1219: Update the activity detail handling around
SkippedInstall so historical install_skipped_when_app_open JSON is interpreted
as skipped_install when listing activities. Preserve the existing raw activity
details and current skipped_install behavior for newly stored records, using
either an API read fallback, frontend fallback, or migration rather than
discarding historical information.
---
Nitpick comments:
In `@server/service/orbit_test.go`:
- Line 1365: The tests only validate the Go field SkippedInstall and do not
verify the serialized JSON contract. Add a focused JSON/API assertion covering
the activity payload, requiring the renamed skipped_install key and confirming
install_skipped_when_app_open is absent.
🪄 Autofix
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 Plus
Run ID: 75821d2b-6ea1-45bf-a022-7e6929806dec
📒 Files selected for processing (12)
frontend/components/ActivityDetails/InstallDetails/SoftwareInstallDetailsModal/SoftwareInstallDetailsModal.tests.tsxfrontend/components/ActivityDetails/InstallDetails/SoftwareInstallDetailsModal/SoftwareInstallDetailsModal.tsxfrontend/interfaces/activity.tsfrontend/pages/DashboardPage/cards/ActivityFeed/GlobalActivityItem/GlobalActivityItem.tests.tsxfrontend/pages/DashboardPage/cards/ActivityFeed/GlobalActivityItem/GlobalActivityItem.tsxfrontend/pages/hosts/details/cards/Activity/ActivityItems/InstalledSoftwareActivityItem/InstalledSoftwareActivityItem.tests.tsxfrontend/pages/hosts/details/cards/Activity/ActivityItems/InstalledSoftwareActivityItem/InstalledSoftwareActivityItem.tsxfrontend/pages/policies/details/components/PolicyAutomationsActivitiesTable/PolicyAutomationsActivitiesTable.tests.tsxfrontend/pages/policies/details/components/PolicyAutomationsActivitiesTable/helpers.tsxserver/fleet/activities.goserver/service/orbit.goserver/service/orbit_test.go
Cherry-pick of #51102 into the 4.91 RC branch. Renames the `installed_software` activity detail flag `install_skipped_when_app_open` → `skipped_install` (Resolves #51052). Needed here because this branch was cut on 2026-08-11, before the rename landed on main, and `docs-v4.91.0` already publishes the field as `skipped_install` — without this, 4.91.0 ships an API field whose own reference docs name something else.
Related issue: Resolves #51052
Renames the
installed_softwareactivity detail flag frominstall_skipped_when_app_opentoskipped_install, the name Product approved and the onedocs-v4.91.0already publishes (audit-logs.md:1661). The implementation (#49858) landed six days before the activity docs (#49106), so the two diverged; since patch-when-closed is unreleased, this renames outright rather than aliasing.The name is deliberately reason-agnostic: #39178 will set the same flag for a second skip reason (notify-then-defer), where
install_skipped_when_app_openwould be false.Rename only — no behavior change. Covers the JSON tag, the Go field (
InstallSkippedWhenAppOpen→SkippedInstall), and the frontend, where all four readers were swept: activity feed, host activity card, policy automations table, and the install-details modal (including itsinstallSkippedWhenAppOpenprop). No endpoint paths changed.Deliberately unchanged:
isAppOpenSkipinorbit.gostill names the detection of the app-open case specifically, and the pre-existing frontend-only"skipped_install"display status (interfaces/software.ts) is not an API value — after this rename the two simply agree.No changes file:
~unreleased bug, andchanges/39962-patch-when-closedalready covers the feature. No migration: activity details are an opaqueactivity_past.detailsJSON blob and no SQL reads this key. Arenameto:alias was considered and rejected — aliases are applied before the INSERT, so it would permanently double-write a never-released key into every row.Important
rc-minor-fleet-v4.91.0was cut on 2026-08-11 and still carries the old name. This needs a cherry-pick into that branch before the 4.91.0 cut, or 4.91.0 shipsinstall_skipped_when_app_openwhile its own reference docs documentskipped_install.Checklist for submitter
Testing
For unreleased bug fixes in a release candidate, one of:
Summary by CodeRabbit
Bug Fixes
Refactor