Skip to content

Show disabled refetch button with tooltip for Android hosts#42165

Draft
kilo-code-bot[bot] wants to merge 5 commits intomainfrom
android-refetch-button-tooltip
Draft

Show disabled refetch button with tooltip for Android hosts#42165
kilo-code-bot[bot] wants to merge 5 commits intomainfrom
android-refetch-button-tooltip

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Mar 20, 2026

Summary

  • Show the refetch button as disabled (instead of hidden) for Android hosts on the host details page
  • Add a tooltip explaining that Android hosts sync data automatically when they change, but changes may not appear immediately due to Google rate limiting, with a "Learn how to manually sync" link (URL as TODO placeholder, opens in new tab)
  • Update the existing Android refetch test to verify the button is rendered as disabled with the correct tooltip and link

Changes

  • helpers.tsx: Updated the "android" entry in REFETCH_TOOLTIP_MESSAGES with new copy and added a CustomLink component ("Learn how to manually sync") with variant="tooltip-link", newTab, and url="TODO" placeholder
  • HostHeader.tsx: (unchanged from prior commit) Renders a <RefetchButton> with isDisabled and the Android tooltip message
  • HostHeader.tests.tsx: Updated the Android test to verify new tooltip text ("Android hosts sync data automatically"), the presence of the "Learn how to manually sync" link, and that it opens in a new tab (target="_blank")

Testing

All 9 HostHeader tests should pass (Babel version mismatch in CI-less environment prevented local run; changes are straightforward text + component updates).


Built for ntalerman by Kilo for Slack

Android uses a declarative/push-based MDM protocol where the device
sends updates when they happen, so Fleet can't request updates on
demand. Instead of hiding the refetch button entirely for Android
hosts, show it as disabled with a tooltip explaining that Android
devices sync automatically and how to trigger a manual sync on the
device itself.
@kilo-code-bot kilo-code-bot bot requested a review from a team as a code owner March 20, 2026 16:08
Copy link
Copy Markdown

@claude claude bot left a comment

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.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.52%. Comparing base (40e91c0) to head (5d1ccf7).
⚠️ Report is 579 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #42165      +/-   ##
==========================================
+ Coverage   66.49%   66.52%   +0.02%     
==========================================
  Files        2516     2532      +16     
  Lines      202010   202435     +425     
  Branches     9071     9299     +228     
==========================================
+ Hits       134331   134667     +336     
- Misses      55544    55634      +90     
+ Partials    12135    12134       -1     
Flag Coverage Δ
frontend 54.77% <100.00%> (+0.40%) ⬆️

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.

@noahtalerman noahtalerman self-assigned this Mar 20, 2026
@noahtalerman noahtalerman marked this pull request as draft March 20, 2026 16:30
- Updated tooltip copy to: 'Android hosts sync data automatically when they
  change, but changes may not appear immediately due to Google rate limiting.'
- Added 'Learn how to manually sync' as a CustomLink with newTab and
  tooltip-link variant (URL left as TODO placeholder)
- Updated test to verify new tooltip text and link behavior
<br />
due to Google rate limiting.{" "}
<CustomLink
url="TODO"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Add a link to a guide that explains how to manually trigger a re-push from a the device. It's somewhere in the Android device's settings...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened a PR for that guide here: #43326

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Added a "learn more" link for the guide.

Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
'GET /learn-more-about/unlock-ios-ipados': 'https://fleetdm.com/guides/lock-wipe-hosts#how-to-unlock-offline-ios-and-ipados-hosts',
'GET /learn-more-about/certificates': '/guides/connect-end-user-to-wifi-with-certificate',
'GET /learn-more-about/enrollment-profiles': 'https://developer.apple.com/documentation/devicemanagement/profile?changes=l_11_5',
'GET /learn-more-about/android-manual-sync': '/guides/how-to-manually-sync-an-android-device'
Copy link
Copy Markdown
Member

@noahtalerman noahtalerman Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants