Inspect a Compose screen
Outcome: connect the visible problem to the UI tree and relevant source, then verify the corrected screen.
Prerequisites
Section titled “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.
Ask your agent
Section titled “Ask your agent”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 sourceand runtime evidence before changing code, then verify the interaction.Inspect the visible screen first
Section titled “Inspect the visible screen first”olef ui dumpolef layout snapshot --screenshotCheck 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
Section titled “Add Compose and source details”Run from the app project directory, or replace . with its Gradle root:
olef --project-root . layout snapshot --compose --semantics --source-map --screenshotInspect 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 and runtime commands for the installed version.
Verify the fix
Section titled “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.