# Inspect a Compose screen

Source: https://olef.dev/docs/guides/inspect-compose

**Outcome:** connect the visible problem to the UI tree and relevant source, then verify the corrected screen.

## Prerequisites

Basic UI inspection uses the connected device service. Compose runtime details require a compatible debuggable app and runtime attachment. Set the project root for source mapping. See the [debugger and layout guide](https://olef.dev/docs/concepts/debugging).

## Ask your agent

```text
The Save button on this Compose screen is visible but does not respond.
Use Olef to inspect the screen, actionable elements, and Compose layout.
Check whether it is disabled, covered, or wired incorrectly. Use source
and runtime evidence before changing code, then verify the interaction.
```

## Inspect the visible screen first

```bash
olef ui dump
olef layout snapshot --screenshot
```

Check labels, bounds, clickability, and the actual target. A visible label may belong to a clickable parent. Prefer a stable resource ID or Compose test tag when available.

## Add Compose and source details

Run from the app project directory, or replace `.` with its Gradle root:

```bash
olef --project-root . layout snapshot --compose --semantics --source-map --screenshot
```

Inspect the returned availability and errors as well as the nodes. Missing Compose data is not evidence that no Compose UI exists. Runtime compatibility and attachment determine which details are available.

For recomposition observations and layout comparisons, inspect the [layout commands](https://olef.dev/docs/reference/cli/layout) and [runtime commands](https://olef.dev/docs/reference/cli/runtime) for the installed version.

## Verify the fix

Apply the source change, read a fresh screen, and act on the target with an expected result. Check both the visual change and the interaction. A screenshot alone does not prove the button works.
