fleet/frontend
Nico ffe0f71c83
Technician role FE changes (#39494)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #38630

## Testing

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

Screenshots below were taken with a **Team Technician** user. Same
changes apply for a **Global Technician**.

#### Controls > OS settings > Disk encryption

- Shows table without controls below.
- Shows empty state (doesn't allow to turn it on).

<img width="1915" height="886" alt="Screenshot 2026-02-10 at 12 24
25 PM"
src="https://github.com/user-attachments/assets/3f44d338-e728-4eb2-ad93-e30844201b52"
/>
<img width="1913" height="907" alt="Screenshot 2026-02-10 at 12 31
38 PM"
src="https://github.com/user-attachments/assets/71706e9e-0540-4c25-b5c0-3f7ccff3ba5a"
/>

#### Controls > OS settings > Custom settings

- Changed description to say **View configuration profiles that apply
custom settings.** instead of **Create and upload configuration profiles
to apply custom settings.**.
- **Add profile** not shown within table header.
- Trash can icon not shown when hovering over a row within the table.
- **Add profile** card not shown on empty state. Instead, "No
configuration profiles have been added." is shown.

<img width="1911" height="729" alt="Screenshot 2026-02-10 at 12 24
39 PM"
src="https://github.com/user-attachments/assets/aa68cbaf-4772-402d-9288-b4be2ddd3250"
/>
<img width="1912" height="650" alt="Screenshot 2026-02-10 at 12 28
48 PM"
src="https://github.com/user-attachments/assets/6a186172-b01f-4314-bb50-4cb533e13bce"
/>

#### Controls > Scripts > Library

- **Add script** not shown within table header.
- No actions shown when hovering over a table row.
- Can view script by clicking on a table row.
- Removed **To run the script across multiple hosts, add a policy
automation on the Policies page** line below **To run this script on a
host, go to the Hosts page and select a host.**.
- Updated copy to `To run this script on a host, go to the Hosts page
and select a host. Then, click Actions > Run script.`

<img width="1912" height="772" alt="Screenshot 2026-02-10 at 12 25
46 PM"
src="https://github.com/user-attachments/assets/83fbc1ec-3a6e-4bb5-865e-b5e7faef1e37"
/>

<img width="1732" height="761" alt="Screenshot 2026-02-11 at 3 50 33 PM"
src="https://github.com/user-attachments/assets/6dda97d7-fde2-4bcd-94b3-fa7368c65528"
/>


#### Labels

Can add label and filter by label

<img width="160" height="247" alt="Screenshot 2026-02-10 at 12 51 24 PM"
src="https://github.com/user-attachments/assets/ed63b708-27f8-4363-9d4f-9a7b0bf82b21"
/>

<img width="1901" height="856" alt="Screenshot 2026-02-10 at 12 35
07 PM"
src="https://github.com/user-attachments/assets/c2ef5e21-03ab-4955-a22f-cd6ca32f3179"
/>

<img width="1903" height="937" alt="Screenshot 2026-02-10 at 12 36
11 PM"
src="https://github.com/user-attachments/assets/d9d9f3bc-4d71-4c4b-902a-455eec9e057c"
/>

Can edit/delete labels created by themselves.
NOTE: my technician user ID is 37 - note that the **x** label belongs to
a different user id, while the second label belongs to ID 37, therefore
it can be edited and deleted.

<img width="1915" height="1152" alt="Screenshot 2026-02-10 at 12 38
29 PM"
src="https://github.com/user-attachments/assets/21f44c11-4e2d-456b-8547-90936b5d7602"
/>
<img width="1911" height="1154" alt="Screenshot 2026-02-10 at 12 38
42 PM"
src="https://github.com/user-attachments/assets/f9f7ea30-11b2-4d2d-9d71-de7299e4b451"
/>

Can delete manual label from host



https://github.com/user-attachments/assets/b64ba6dd-3f54-4dcd-9c57-7bede65122da

#### Host details

Can run scripts and view their results

<img width="1908" height="472" alt="Screenshot 2026-02-10 at 12 52
33 PM"
src="https://github.com/user-attachments/assets/d1e40339-ec52-47ff-bc53-c311498ffe80"
/>
<img width="1882" height="716" alt="Screenshot 2026-02-10 at 12 52
40 PM"
src="https://github.com/user-attachments/assets/dd0c2ec3-8cb8-4835-9c6d-f731a7434637"
/>
<img width="1915" height="718" alt="Screenshot 2026-02-10 at 12 52
48 PM"
src="https://github.com/user-attachments/assets/5e7a73e0-ac5b-4d38-b635-770f53dea9e3"
/>
<img width="1914" height="718" alt="Screenshot 2026-02-10 at 12 52
55 PM"
src="https://github.com/user-attachments/assets/b199c796-66b1-46bc-b2b5-fd35e8aa7a7c"
/>

Can run query associated to host as a live query




https://github.com/user-attachments/assets/7aea6f63-e443-4fa0-87dc-48bef84efa2f

#### Software

Doesn't show trash can icon on software installer card, just the
download one.

<img width="1423" height="838" alt="Screenshot 2026-02-10 at 1 33 53 PM"
src="https://github.com/user-attachments/assets/3a55c226-0bba-43ac-8594-7b5ac0a3684a"
/>

Can install/uninstall software on a host. Note that **Add software**
button is hidden (technicians can't add software).

<img width="1378" height="277" alt="Screenshot 2026-02-10 at 3 08 55 PM"
src="https://github.com/user-attachments/assets/bf413467-2071-48b6-b62b-f3a721b6057c"
/>



#### Queries

- Can run inherited queries on all hosts


https://github.com/user-attachments/assets/09f07e6b-a8c1-453e-81fd-4deb16005836

- Can run team queries on all hosts


https://github.com/user-attachments/assets/18b62dea-e159-40ea-b0ed-1d96b6bd40e7

- Can't manage automations or add queries (buttons are not shown at the
top-right corner)

#### Policies

Same as Queries



https://github.com/user-attachments/assets/2c24514a-2ae0-47a6-b631-6f9e48fc7b9c

#### Protected routes

Tested that I can't access routes that have restricted functionality for
this role, such as:

- **/controls/os-updates**, **/controls/setup-experience** and
**/controls/os-settings/certificates** => redirects to
**/controls/os-settings** 
- **/controls/scripts/progress** => redirects to
**/controls/scripts/library** 
- **/queries/new** and **/software/add/*** => renders access denied page


---------

Co-authored-by: Lucas Manuel Rodriguez <lucas@fleetdm.com>
2026-02-11 18:38:41 -03:00
..
__mocks__ Add conditional access already bypassed check (#39037) 2026-02-02 10:35:55 -05:00
components Technician role FE changes (#39494) 2026-02-11 18:38:41 -03:00
context Technician role FE changes (#39494) 2026-02-11 18:38:41 -03:00
docs Fleet UI [Feature]: UI reskin (#33558) 2025-09-29 12:10:41 -05:00
hooks Technician role FE changes (#39494) 2026-02-11 18:38:41 -03:00
interfaces Fleet UI: Tarballs and script packages skip recent updates UI statuses (#39437) 2026-02-11 14:07:11 -05:00
layouts Fix iOS/iPadOS self-service UI routing and database errors (#35739) 2025-11-14 15:54:30 -05:00
pages Technician role FE changes (#39494) 2026-02-11 18:38:41 -03:00
router Technician role FE changes (#39494) 2026-02-11 18:38:41 -03:00
services Show Manage Automations disabled button with tooltip on Queries page (#39302) 2026-02-09 15:16:28 -03:00
styles update add host modal to handle fully managed android enrollment (#39468) 2026-02-06 17:08:35 +00:00
templates update enroll page to include QR codes for enrolling various devices (#39389) 2026-02-11 09:57:36 +00:00
test Bump react-markdown and remark-gfm packages to resolve transitive dep vulns (#38411) 2026-01-30 16:44:19 +00:00
typings Add UI for enabling manual agent install of a bootstrap package (#28550) 2025-04-29 15:29:21 +01:00
utilities Technician role FE changes (#39494) 2026-02-11 18:38:41 -03:00
index.jsx update UI to react 18 (#17471) 2024-03-13 19:09:16 +00:00
index.scss New tooltips! (#4326) 2022-02-28 13:25:06 -08:00
public-path.js add prettier and have it format all fleet application code (#625) 2021-04-12 14:32:25 +01:00
README.md Clean up "here" link anchors for docs, ee, and frontend dirs (#29742) 2025-06-13 15:05:52 -05:00

Fleet frontend

The Fleet frontend is a Single Page Application using React with Typescript and Hooks.

Table of contents

Running the Fleet web app

For details instruction on building and serving the Fleet web application consult the Contributing documentation.

Testing

Visit the overview of Fleet UI testing for more information on our testing strategy, philosophies, and tools.

To run unit or integration tests in ComponentName.tests.tsx, run yarn test -- ComponentName.tests.tsx. To test all Javascript components run yarn test.

QA Wolf manages our E2E test and will maintain the tests as well as raise any issues found from these tests. Engineers should not have to worry about working with E2E testing code or raising issues themselves.

For more information on how our front-end tests work, visit our frontend test directory.

Directory structure

Component directories in the Fleet front-end application encapsulate the entire component, including files for the component and its styles. The typical directory structure for a component is as follows:

└── ComponentName
  ├── _styles.scss
  ├── ComponentName.tsx
  |-- ComponentName.tests.tsx
  ├── index.ts
  • _styles.scss: The component css styles
  • ComponentName.tsx: The React component
  • ComponentName.tests.tsx: The React component unit/integration tests
  • index.ts: Exports the React component
    • This file is helpful as it allows other components to import the component by it's directory name. Without this file the component name would have to be duplicated during imports (components/ComponentName vs. components/ComponentName/ComponentName).

components

The component directory contains global React components rendered by pages, receiving props from their parent components to render data and handle user interactions.

context

The context directory contains the React Context API pattern for various entities. Only entities that are needed across the app has a global context. For example, the logged in user (currentUser) has multiple pages and components where its information is pulled.

interfaces

Files in the interfaces directory are used to specify the Typescript interface for a reusable Fleet entity. This is designed to DRY up the code and increase re-usability. These interfaces are imported in to component files and implemented when defining the component's props.

Additionally, local interfaces are used for props of local components.

layouts

The Fleet application has only 1 layout, the Core Layout. The Layout is rendered from the router and are used to set up the general app UI (header, sidebar) and render child components. The child components rendered by the layout are typically page components.

pages

Page components are React components typically rendered from the router. React Router passed props to these pages in case they are needed. Examples include the router, location, and params objects.

router

The router directory is where the react router lives. The router decides which component will render at a given URL. Components rendered from the router are typically located in the pages directory. The router directory also holds a paths file which holds the application paths as string constants for reference throughout the app. These paths are typically referenced from the App Constants object.

services

CRUD functions for all Fleet entities (e.g. query) that link directly to the Fleet API.

styles

The styles directory contains the general app style setup and variables. It includes variables for the app color hex codes, fonts (families, weights and sizes), and padding.

templates

The templates directory contains the HTML file that renders the React application via including the bundle.js and bundle.css files. The HTML page also includes the HTML element in which the React application is mounted.

test

The test directory includes test helpers, API request mocks, and stubbed data entities for use in test files. See the UI testing documentation for more on test helpers, stubs, and request mocks.

utilities

The utilities directory contains re-usable functions and constants for use throughout the application. The functions include helpers to convert an array of objects to CSV, debounce functions to prevent multiple form submissions, format API errors, etc.

Patterns

The list of patterns used in the Fleet UI codebase can be found in patterns.md.

Storybook

Storybook is a tool to document and visualize components, and we use it to capture our global components used across Fleet. Storybook is key when developing new features and testing components before release. It runs a separate server exposed on port 6006. To run this server, do the following:

  • Go to your root fleet project directory
  • Run make deps
  • Run yarn storybook

The URL localhost:6006 should automatically show in your browser. If not, visit it manually.

Running Storybook before implementing new UI elements can clarify if new components need to be created or already exist. When creating a component, you can create a new file, component.stories.tsx, within its directory. Then, fill it with the appropriate Storybook code to create a new Storybook entry. You will be able to visualize the component within Storybook to determine if it looks and behaves as expected.