fleet/frontend/services/entities
Scott Gress 12ab93d9e0
Update "Setting up your device" page for MacOS Setup Experience (#33770)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #33173

# Details

This PR updates the "Setting up your device" page which appears in Linux
and Windows (and as of https://github.com/fleetdm/fleet/issues/30117,
MacOS) setup experiences. Front-end updates:

* Lots of renaming of things that were software-specific to now more
generically refer to "setup step"
* Removed the "My Device" heading
* Moved the info button inside the table header
* Added status of setup script run to the table
* Updated the empty state to not refer specifically to software
* Added optional `setup_only` query param to the `/device` page which,
if set, will always show the "setting up your device" page even if all
setup is complete. Normally as soon as setup finishes, the front-end
redirects to the regular My Device page. In the case of MacOS setup
experience, we don't want this to happen as we expect to either 1) keep
the setup experience up indefinitely if we're blocking device setup on
software install failure, or 2) close the setup dialog on successful
completion. This query param is also handy for testing.
* Added new "Configuration complete" state to be shown when all setup
steps are finished (successfully or not). This is only applicable on
MacOS, since other platforms will redirect to the My Device page when
finished.

This PR also includes one small backend change to the
`/device/{token}/setup_experience/status` API endpoint, to have it
return a `scripts` array alongside the existing `software` array. This
endpoint is not documented publicly.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

## Testing

- [X] Added/updated automated tests
Updated existing DeviceUserPage tests that check the SettingUpYourDevice
content, and added new tests for the new scripts content and the new
query param.

- [X] QA'd all new/changed functionality manually

<img width="1028" height="867" alt="Screenshot 2025-10-02 at 7 20 28 PM"
src="https://github.com/user-attachments/assets/7adab2c2-dac1-4463-96fc-13094da2c379"
/>

(note that as of now we'd only have at most one script, showing multiple
here to demonstrate the different states)

<img width="1031" height="524" alt="Screenshot 2025-10-02 at 7 22 01 PM"
src="https://github.com/user-attachments/assets/bedaa840-d7ef-4b6f-8daf-6ac3b447594f"
/>

<img width="1222" height="760" alt="image"
src="https://github.com/user-attachments/assets/42cf82d5-53e0-4c4d-b60e-9ac2cc86af68"
/>

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
2025-10-06 16:45:53 +01:00
..
activities.ts Chore rework UI activities (#25539) 2025-01-20 10:39:46 +00:00
autofill.ts Fix policy autofill using incorrect media-type for query (#30112) 2025-06-18 13:12:58 -04:00
certificates.ts Update UI for Smallstep CA feature (#33448) 2025-09-26 09:26:57 -05:00
common.ts UI: Windows setup experience > install software (#32934) 2025-09-16 10:12:25 -07:00
conditional_access.ts Add easy to understand errors when setting up Entra conditional access (#33453) 2025-09-25 22:52:28 -03:00
config.ts add startup assistant to the UI (#17731) 2024-03-26 14:46:33 +00:00
config_profiles.ts Feat UI host filter by custom profiles (#29038) 2025-05-15 12:37:45 +01:00
device_user.ts Update "Setting up your device" page for MacOS Setup Experience (#33770) 2025-10-06 16:45:53 +01:00
disk_encryption.ts Add "Require BitLocker PIN" checkbox to disk encryption page (#31132) 2025-07-23 14:36:28 -05:00
enroll_secret.ts Update UI to handle "No team" filters (#10706) 2023-03-31 12:40:14 -05:00
global_policies.ts 21855 – Paginate and filter Queries on the server, update platform filtering from compatible to targeted platforms (#24446) 2024-12-11 10:50:28 -08:00
global_scheduled_queries.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
host_count.ts UI: Filter hosts by batch execution status (#29612) 2025-06-09 10:53:17 -07:00
host_query_report.ts UI – Host query report page (#15511) 2023-12-08 16:54:24 -08:00
host_summary.ts Fleet UI: Missing host and low disk space filters on dashboard and manage host page (#7728) 2022-10-14 15:21:30 -05:00
hosts.ts update my device page to allow resend of profiles (#33108) 2025-09-22 14:31:06 +01:00
idp.ts add new idp section on integrations page and show the users idp connection with fleet (#27566) 2025-03-28 11:23:07 +00:00
installers.ts adjust installers endpoint to avoid AJAX downloads (#7226) 2022-08-16 12:54:41 -03:00
invites.ts UI – Updates to confirm invite flow (#25583) 2025-01-24 10:55:39 -08:00
labels.ts UI: Labels by IdP (#30368) 2025-06-30 10:05:03 -07:00
macadmins.ts Fleet UI: macOS dashboard MDM solutions (#7014) 2022-08-15 17:47:07 -05:00
mdm.ts Unenroll Android BYOD hosts (#33546) 2025-09-29 08:15:30 -04:00
mdm_android.ts hook up SSE for UI android sse (#26656) 2025-02-27 18:45:41 +00:00
mdm_apple.ts Fleet UI: Add Self-service categories key and filtering (#28506) 2025-05-02 12:11:48 -04:00
mdm_apple_bm.ts feat: enable multiple ABM and VPP tokens (#21693) 2024-08-29 18:51:46 -04:00
operating_systems.ts Fleet UI: Add timestamps to host count on software detail pages (#25143) 2025-01-07 09:22:41 -05:00
osquery_options.ts Update UI to handle "No team" filters (#10706) 2023-03-31 12:40:14 -05:00
packs.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
queries.ts UI: Allow editing the name and team of a "Save as new" query (#30544) 2025-07-03 13:11:06 -07:00
query_report.ts Added optional team_id parameter to query report endpoint (#24811) 2024-12-17 13:26:35 -06:00
scheduled_queries.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
scripts.ts UI: Batch script run detail page (#32333) 2025-08-29 09:37:05 -06:00
secrets.tsx UI for managing custom variables (#31875) 2025-08-15 08:24:55 -05:00
sessions.ts Fleet UI: 2FA (#24442) 2024-12-05 15:54:43 -05:00
software.ts Add custom software icons (#32652) 2025-09-05 17:31:03 -05:00
spec.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
status.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
status_labels.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
targets.ts Fleet UI: Fix new query bugs introduced (#14309) 2023-10-06 10:03:19 -07:00
team_policies.ts UI: Update conditional access on a per-policy basis (#28658) 2025-05-01 11:43:38 -07:00
team_scheduled_queries.ts Update UI to handle "No team" filters (#10706) 2023-03-31 12:40:14 -05:00
teams.ts Added frontend support for No team automations (#32507) 2025-09-02 18:02:54 -05:00
users.ts UI - use new db user settings to persist user's host table column preferences (#25185) 2025-01-09 10:53:43 -08:00
version.ts Removed all traces of Redux from the app! (#5287) 2022-04-22 09:45:35 -07:00
vulnerabilities.ts Fleet UI: Exact match vulnerabilities search when wrapped in quotes (#21375) 2024-08-27 09:14:38 -04:00