> 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/chat/contacts.md).

# Chat contacts

{% 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, iOS and Android. [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/screens/chat/contacts.md).
{% endhint %}

The people on this site you can start a direct chat with, while chat is on. With chat off, the mobile chat tab is [My network](https://docs.snapfix.com/how-the-apps-work/screens/chat/my-network.md), a different list.

![Chat contacts](https://3653879137-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsVVGa79QbcEkJ7n8srxe%2Fuploads%2Fgit-blob-4d02d23bbb8bf845dd222dfbc8b8a1d6329f946b%2Fcontacts.png?alt=media)

* **Where:** web `/chat/:id`, the "My Network" tab on [Chats](https://docs.snapfix.com/how-the-apps-work/screens/chat/chats.md). iOS: the "MY NETWORK" page of the chat tab, and also the "My Network" chip inside "CHATS". Android: the "My Network" chip on Chats.
* **Who:** any signed-in user on a site with chat on. The list has no role split.
* **Feature:** [Chat](https://docs.snapfix.com/product/features/chat/chat.md)

## Layout

* **Web:** the search box and filter tabs of the Chats pane stay above the list. Then one row per person, A to Z: picture or initials, the name, and "@username" when the username is not an email address. Email and phone are hidden on purpose.
* **iOS:** a "Snapfix Contacts (n)" header (fixed English in the code), its own search field, and the rows with picture and name, with pull to refresh.
* **Android:** the rows under the "My Network" chip, with the chat list's search and pull to refresh.

Who is listed: the site's users except you. iOS and Android also leave out temporary users (people who have never signed in) and one fixed system user (the QR user); the web shows temporary users. The web code means to leave out people you already have a chat with, but it compares user IDs with chat IDs, and a direct chat ID is two user IDs joined, so nobody is left out.

## Inputs

| Field             | Type | Required | Default | Rules and messages                                                                                                                                                                                                                                |
| ----------------- | ---- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Search ("Search") | Text | No       | Empty   | No validation. Web: matches first name, last name, username and name, as you type. iOS: matches the name. Android: matches the name, trimmed and lowercased, 250 ms after typing stops. Web with no match: "No users found matching your search." |

## Actions

| Action          | Who             | What happens                                                                                                                                                                                                                                                                                                                                                                              | API                                                                                             |
| --------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| Open the tab    | Anyone, chat on | Uses the site's user list, loaded with [Chats](https://docs.snapfix.com/how-the-apps-work/screens/chat/chats.md).                                                                                                                                                                                                                                                                         | [`GET /v1/app/parents/{id}/users`](https://docs.snapfix.com/engineering-reference/api/users.md) |
| Tap a person    | Anyone          | Opens the direct [conversation](https://docs.snapfix.com/how-the-apps-work/screens/chat/conversation.md) with that person; the chat ID is the two user IDs, smaller first. The web creates the Firestore chat document at once, but no row appears in [Chats](https://docs.snapfix.com/how-the-apps-work/screens/chat/chats.md) until the first message, and the address does not change. | Firestore                                                                                       |
| Pull to refresh | iOS, Android    | Reloads the user list.                                                                                                                                                                                                                                                                                                                                                                    | [`GET /v1/app/parents/{id}/users`](https://docs.snapfix.com/engineering-reference/api/users.md) |

## States

* **Loading:** web skeleton rows (the language file has "Loading network...", but nothing shows it). iOS and Android: the refresh spinner.
* **Empty:** web: "No users found in your network.", or "No users found matching your search." during a search. iOS shows a blank list with no text.
* **Error:** a failed user load leaves the list empty; the web only writes it to the console.
* **No permission:** with chat off the web goes to `/fix` and mobile shows [My network](https://docs.snapfix.com/how-the-apps-work/screens/chat/my-network.md).
* **Offline (mobile):** no offline state of its own; the list needs the server.

## Platform differences

| Topic                        | Web                           | iOS                                     | Android                                 |
| ---------------------------- | ----------------------------- | --------------------------------------- | --------------------------------------- |
| Where                        | "My Network" tab              | "MY NETWORK" page and "My Network" chip | "My Network" chip                       |
| Users left out               | you                           | you, temporary users, the QR user       | you, temporary users, one fixed user ID |
| People you already chat with | still listed                  | still listed                            | still listed                            |
| Username under the name      | "@username" when not an email | no                                      | no                                      |
| Count header                 | none                          | "Snapfix Contacts (n)"                  | none on the chip                        |

Android also has a standalone contacts screen (`ChatNetworkFragment`, header "Snapfix Contacts (n)"), but the only branch that shows it can never run, so it is never shown.


---

# 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/chat/contacts.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.
