Fix missing Live report tooltip for locked hosts - #54509
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #54509 +/- ##
========================================
Coverage 76.56% 76.56%
========================================
Files 4261 4261
Lines 260385 260390 +5
Branches 15067 15240 +173
========================================
+ Hits 199365 199370 +5
+ Misses 60843 60842 -1
- Partials 177 178 +1
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:
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: fleetdm/fleet/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughLive report tooltip generation now receives the host’s MDM device status. For online hosts, it provides status-specific messages when the host is locked or wiped, and an updating-status message when the device status is updating. The existing offline-host tooltip remains. Tests cover six device statuses and verify the disabled state and tooltip text. Priority: ⬇️ Low Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The change explains why Live report is unavailable for locked, wiped, and updating hosts while preserving existing offline explanations and action availability. No merge-blocking issue is identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
| if (!isHostOnline && value === "query") { | ||
| return <>You can't run a live report on an offline host.</>; | ||
| } | ||
| if (value === "query") { | ||
| if (hostMdmDeviceStatus === "locked" || hostMdmDeviceStatus === "wiped") { | ||
| return ( | ||
| <>You can't run a live report on a {hostMdmDeviceStatus} host.</> | ||
| ); | ||
| } | ||
| if (hostMdmDeviceStatus && isDeviceStatusUpdating(hostMdmDeviceStatus)) { | ||
| return ( | ||
| <> | ||
| You can't run a live report while the host's device status | ||
| is updating. | ||
| </> | ||
| ); | ||
| } | ||
| } |
There was a problem hiding this comment.
nit: should we have a single if (value === "query") { ... } block so we can group all the tooltip contents in that same block?
|
Thanks @Prajwal2246 ! |
Related issue: Resolves #54482
On an online, locked host, Actions > Live report is disabled without explaining why. Add tooltips for locked, wiped, and updating device states using the existing dropdown tooltip helper. The offline explanation and action availability stay unchanged.
Checklist for submitter
changes/,orbit/changes/oree/fleetd-chrome/changes.See Changes files for more information.
Testing
Added/updated automated tests
QA'd all new/changed functionality manually
Automated validation:
git diff --checkpassed.Manual validation:
CI note: The lint-js failure reports five import-formatting errors in
frontend/pages/admin/ManageFleetsPage/TeamDetailsWrapper/AgentOptionsPage/AgentOptionsPage.tests.tsx. That file is unchanged by this PR and identical to the base commitaa90e843ed. The JavaScript test job passes.AI
AI: Codex (unknown)
Frontend
Before — screenshot from the original report in #54482: the disabled Live report action has no tooltip.
After — local recording using a mocked locked host state: hovering over the disabled Live report action shows "You can't run a live report on a locked host." No device was physically locked.
Screen.Recording.2026-10-01.at.12.29.36.PM.mov
The recording covers the locked-host case. Wiped and updating states are covered by automated tests; their manual browser checks remain pending.
Summary by CodeRabbit