# Repository filtering

> Search and filter test cases across all suites using the repository filter bar.

The repository filter bar lets you find test cases across all suites in a project without expanding each suite manually. It appears as a full-width row directly below the breadcrumb header.

## Using the search input

Type any substring into the search box to match test cases. The **Search by** selector controls what the query matches:

- **All fields** (default) — matches case title, display ID, or parent suite name. Not serialized in the URL; a URL without `scope` means "all fields".
- **Cases** — matches case title or display ID only.
- **Suites** — returns the cases of any suite whose name matches. Unassigned cases never appear in suite-scope results.

The search is debounced (300 ms) and kept in the URL as `q`. A `?q=login&scope=suites` URL reproduces the exact filter state on reload or when shared.

## Adding filters

Click **Add filter** to open the filter menu. All system fields (Priority, Status, Type, Layer, Behavior, Severity) and visible org custom fields of filterable types appear in the menu.

Select a field, then choose one or more option values in the chip editor. Multiple values within one field OR-compose; multiple fields AND-compose:

- `Priority = High` AND `Status = Active` → cases that are both High priority AND Active status.
- `Priority = High, Medium` → cases with High OR Medium priority.

The `empty` sentinel in each filter matches cases with no stored value for that field.

While [test case review](https://docs.probara.net/en/guides/test-case-review/) is on in the project, the menu also offers
**Review status** (**Not reviewed**, **In review**, **Approved**).

To reset a single filter without removing it, open its dropdown and click **Clear selection** at the bottom. This empties that one filter's selection while keeping the chip in place so you can immediately pick new values — unlike **Clear filters**, which removes every filter at once.

## Pruned tree

While any filter or search is active the repository enters **filtered mode**:

- Only suites with directly matching cases are visible; ancestor suites are shown as structural containers without a count badge.
- Each matching suite shows a badge with its direct match count.
- Cases render inline from the search response — per-suite lazy loading is suspended.
- The sidebar suite tree mirrors the same pruned structure.
- Expansion state in filtered mode is derived and does not write your persistent expansion — clearing the filters restores exactly the tree you had before.

Unassigned matches appear under the **Cases without suite** section.

## Cap notice

The endpoint returns at most 500 matches. When the full count exceeds the returned items, a notice appears explaining how many matches were found and prompting you to refine the filter. There is no pagination — the pruned tree would miscount suite branches on partial pages.

## Clearing filters

Click **Clear filters** in the empty state, or manually remove chips and clear the search input. The URL reverts to the pre-filter state and the normal tree restores with your original expansion.

## URL sharing

Every filter state is encoded in the URL (`q`, `scope`, `cf` as repeatable params). Paste the URL into a browser or share it — the recipient sees the same filtered repository.
