fleetdm / fleet

Open-source platform for IT, security, and infrastructure teams. (Linux, macOS, Chrome, Windows, cloud, data center)
https://fleetdm.com
Other
3.11k stars 427 forks source link

Install/uninstall options are selectable when the client has enough information to know they'll fail if pressed #22209

Closed iansltx closed 3 weeks ago

iansltx commented 1 month ago

💥  Actual behavior

For example, uninstalling a package is allowed when scripts aren't enabled on the host (or the host is osquery rather than fleetd). This behavior is inconsistent with running scripts, which does disable when scripts aren't runnable on the host.

Technically the example I'm providing here is an unreleased bug, but we're going with a smaller patch that makes error messaging more visible for this release, and can follow on with better UX.

🧑‍💻  Steps to reproduce

  1. Add a host with scripts disabled
  2. Install software on that host, either directly or via Fleet
  3. Add an installer (incl. uninstall script) for the host
  4. Navigate to the host -> software screen and notice that Uninstall isn't disabled

🕯️ More info (optional)

To fix

If scripts are disabled for a host, disable the options that require scripts and show a tooltip like we do for Actions > Run script on the Host details page (Figma here)

sharon-fdm commented 1 month ago

I removed the ~unreleased per my understanding it's not going to 4.57.0

jacobshandling commented 1 month ago

For context and clarity, this would be undoing changes implemented this sprint:

Recent spec explicitly calling for allowing both options at all times unless SW is "pending": https://www.figma.com/design/ToQaK2yUJwDyzagTdrbOfX/%2320320-Uninstall-packages?node-id=5364-13355&m=dev

Screenshot 2024-09-18 at 3 02 26 PM

Product confirmed this approach after discussion:

Screenshot 2024-09-18 at 3 07 14 PM

And so this ticket was made to explicitly track those updates: https://github.com/fleetdm/fleet/issues/21931

RachelElysia commented 1 month ago

+1 Jacob, thanks for outlining.

Staying flexible about this missed edge case and built out this bug fix since it's best for the ux to not be able to click an action that we 100% know won't work (reusing tooltip/behavior from general host action dropdown --enable-scripts disabled tooltip/behavior).

fleet-release commented 3 weeks ago

In cloud city's glow, Fleet's code evolves, scripts align. No false paths to sow.