# Environments

> Manage project-scoped deployment targets — create, edit, delete, and set the default environment.

An **environment** is a named, project-scoped deployment target you attach to test runs and reports — for example, `Staging`, `Production`, or `QA EU`. Each environment can carry an optional base URL that links results back to a running service.

## Reaching the screen

Open a project, then click **Environments** in the project sidebar. The URL is `/projects/:projectId/environments`.

## The environments list

The list shows every environment in the project as a table with the following columns:

| Column   | Description                                                                                                                                                        |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Name** | Display name of the environment, with its description underneath (_No description_ when it has none). A **default** badge marks the project's default environment. |
| **Slug** | URL-safe identifier unique within the project (e.g. `staging`, `prod-eu`)                                                                                          |
| **URL**  | Optional base URL pointing to the deployed service; it opens in a new tab                                                                                          |

Use the search input at the top to filter by name. The rows-per-page selector and the range summary
always show once the list is long enough to paginate; the previous/next and page-number controls
appear only when the list spans more than one page.

On a narrow (phone-width) screen the table becomes a card list: each environment presents as its
own card, showing the same slug, base URL, description, and default badge, with edit and delete
still available on the card. Every search and pagination control you have on a wider screen is
still there — only the layout changes. At tablet width and above the list is the table described
above.

## Creating an environment

1. Click **New environment** (visible to members and above; viewers see a read-only list).
2. Enter a **Name**. As you type, Probara derives the **Slug** automatically — for example, `Pre Prod` becomes `pre-prod`.
3. Optionally override the slug by editing it directly. Once you edit the slug field manually, it stops auto-updating when the name changes.
4. Fill in an optional **Description** and **Base URL**. The description can hold formatting and images: paste or drop an image into it, or type **/** and choose **Image**.
5. Toggle **Default** if this environment should be the project default.
6. Click **Create**.

**Slug rules**: slugs must be lowercase alphanumeric with hyphens (`^[a-z0-9]+(-[a-z0-9]+)*$`) and must be unique within the project. If a slug is already in use, an inline error appears on that field and the dialog stays open.

## Setting the default environment

Only one environment can be the project default at a time. Toggle **Default** during creation or edit. Promoting a new environment to default automatically demotes the previous one — no manual step required.

## Editing an environment

Open the row's actions menu (**⋯**) and choose **Edit** to open the edit dialog. All fields are editable. The slug field does not re-derive from the name when you change it — it stays as-is unless you update it explicitly.

Validation works the same as on create: a slug collision surfaces as an inline error.

## Deleting an environment

Open the actions menu (**⋯**) on the row you want to remove and choose **Delete**. A confirmation dialog names the environment and asks you to confirm. Click **Delete** to proceed, or **Cancel** to return to the list without changes.

Deletion is permanent and cannot be undone from the UI.
