> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/how-the-apps-work/screens/compliance/timeline.md).

# Timeline

{% hint style="info" %}
Draft, written by an agent and not yet checked by a person ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). Platforms: web. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/compliance/timeline.md).
{% endhint %}

System types, systems, contractors or compliance tasks on a month or week chart. Each row's bars show when the item is green, amber and red, from its dates and alert window.

![Timeline](https://3653879137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsVVGa79QbcEkJ7n8srxe%2Fuploads%2Fgit-blob-7eb98aaa468b4dde48ac8593460e749a9fe17e98%2Ftimeline.png?alt=media)

* **Where:** web `/comply`, "Timeline" tab.
* **Who:** site admins (role "Admin"); see [Dashboard](https://docs.snapfix.com/how-the-apps-work/screens/compliance/dashboard.md#getting-here). In the API, the system type and contractor timelines admit any member of the site, while the system and task timelines need the admin role \[[ASK-112](https://github.com/snapfix/docs/blob/main/ASK.md#ask-112-which-comply-reads-should-members-who-are-not-admins-get)].
* **Feature:** [Comply](https://docs.snapfix.com/product/features/compliance/comply.md)

## Layout

1. **Title:** "Timeline".
2. **Filter buttons** on the left: "System Types", "Systems", "Contractors" and "Tasks". The selected one is filled and shows its count in brackets, for example "System Types (27)" or "Contractors (39)". "Systems" and "Tasks" also show the chosen type after a dash, for example "Systems - Electrical (6)".
3. **Controls** on the right: "Today", a "Month" or "Week" button that switches the view, and, in week view only, a previous week and a next week arrow.
4. **Chart:** one row per item, with its name on the left. Green, amber and red bars run from the item's start dates ([timeline item](https://docs.snapfix.com/engineering-reference/api/compliance.md#timeline-item-object)): green from the day it was created, amber from the start of its alert window, red from its expiry. An item with no expiry date stays green. A task row shows its status changes and a bar at its due date. Each bar's tooltip is the item's name.

The page remembers the filter for each site on this device, with the type for "Systems" and "Tasks", and opens it again on the next visit. A type chosen by clicking a type bar is not remembered.

## Inputs

None. The chart has no search box.

## Actions

| Action                 | Who         | What happens                                                                                                                                                                                                                                                              | API                                                                                                                                                                     |
| ---------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Open the tab           | Site admins | Loads the remembered filter, or "System Types"                                                                                                                                                                                                                            | As the filter below                                                                                                                                                     |
| "System Types"         | Site admins | Shows every system type of the site. The list loads only the first time                                                                                                                                                                                                   | [`GET /v1/app/comply/timeline/system-type/{parentUuid}`](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplytimelinesystem-typeparentuuid) |
| "Contractors"          | Site admins | Shows every contractor. The list loads only the first time                                                                                                                                                                                                                | [`GET /v1/app/comply/timeline/contractor/{parentUuid}`](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplytimelinecontractorparentuuid)   |
| "Systems"              | Site admins | Opens [Select a System Type](#select-a-system-type), then shows that type's systems                                                                                                                                                                                       | [`GET /v1/app/comply/timeline/system/{systemTypeUuid}`](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplytimelinesystemsystemtypeuuid)   |
| "Tasks"                | Site admins | Opens [Select a System Type](#select-a-system-type), then shows the tasks linked to that type's systems, with their status changes. The request sends `X-API-Version: 1.0.1`. It fails when any of those tasks is a planned task, and the chart then shows the empty text | [`GET /v1/app/comply/timeline/job/{systemTypeUuid}`](https://docs.snapfix.com/engineering-reference/api/compliance.md#get-v1appcomplytimelinejobsystemtypeuuid)         |
| Click a type bar       | Site admins | Switches to "Systems" for that type                                                                                                                                                                                                                                       | As "Systems"                                                                                                                                                            |
| Click a system bar     | Site admins | Opens [System detail](https://docs.snapfix.com/how-the-apps-work/screens/compliance/system-detail.md) with the type in the address (`?type=…&id=…`)                                                                                                                       | -                                                                                                                                                                       |
| Click a contractor bar | Site admins | Opens [Contractor detail](https://docs.snapfix.com/how-the-apps-work/screens/compliance/contractor-detail.md)                                                                                                                                                             | -                                                                                                                                                                       |
| Click a task bar       | Site admins | Opens the task at `/group/{group}/task/{task}` ([Task detail](https://docs.snapfix.com/how-the-apps-work/screens/tasks/task-detail.md))                                                                                                                                   | -                                                                                                                                                                       |
| Click a row's name     | Site admins | Scrolls the chart to the item's first bar. No request                                                                                                                                                                                                                     | -                                                                                                                                                                       |
| "Today"                | Site admins | Scrolls to today, or shows this week in week view, and turns the today line on or off. No request                                                                                                                                                                         | -                                                                                                                                                                       |
| "Month" or "Week"      | Site admins | Switches the view, then scrolls to today. No request                                                                                                                                                                                                                      | -                                                                                                                                                                       |
| Previous or next week  | Site admins | Moves the week view by one week. No request                                                                                                                                                                                                                               | -                                                                                                                                                                       |

## States

* **Loading:** a small spinner in place of the chart.
* **Empty:** "No timeline data available for the selected filter."
* **Error:** the four timeline requests skip the shared error alert and only log to the console, so a failed load shows the empty text.
* **No permission:** a non-admin never reaches the page ([Dashboard](https://docs.snapfix.com/how-the-apps-work/screens/compliance/dashboard.md#getting-here)).
* **Offline (mobile):** not applicable (web only).

## Dialogs and sheets

### Select a System Type

Opened by "Systems" and "Tasks", and by the "Systems" tab of [Folders](https://docs.snapfix.com/how-the-apps-work/screens/compliance/folders.md). Title "Select a System Type". A search box, "Search System Types", narrows the list about a second after the last key press, with no request. Below it, the site's types with radio buttons, or "No system types found". Buttons "Cancel" and "Select"; "Select" stays off until a type is chosen.

Choosing a type loads its systems or tasks. Opening the dialog clears the current type first, and "Cancel" does not restore it: the filter keeps its rows but loses the type's name, and a system opened from the chart afterwards has no type in its address.

## Platform differences

Web only. The apps show a notice instead ([Comply](https://docs.snapfix.com/how-the-apps-work/screens/compliance/mobile-notice.md)).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/how-the-apps-work/screens/compliance/timeline.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
