Flows in Studio
For AI agents: this page is Markdown at https://squiggle.sh/docs/studio/flows.md. Every docs page is listed at https://squiggle.sh/llms.txt, and all of them are one file at https://squiggle.sh/llms-full.txt.
The Flows screen records a flow while you use the app, lets you edit its steps, keeps flows in groups, and replays them on the simulator. The files are the same ones the squiggle command runs.
Record
Press Record and use the app, in Studio’s device panel or in the Simulator app itself. Each tap becomes a step that names the control by its testID, label or text, not by position. The screen you start on becomes the flow’s start screen.
Edit
The step list lets you add, remove, reorder and edit steps. Add steps from five groups: Interact, Wait / Assert, Control flow, Device and Network, so you can build a whole flow without recording. Save, revert or delete a single step or the whole flow.
Hover a step for its buttons. Edit fields opens every field the step accepts; More options under them shows the ones that qualify the step, such as its note, optional and when. Replay step runs only that step on the connected device.
A fixed pause, waitFor: { ms: 1500 }, shows its length in milliseconds, marked ms, in the step list and in its pause field. Only a whole number of milliseconds changes it: clear the field or type 1.5 and the pause stays as it was. The timeout of a scrollUntilVisible has no field: change it in the flow file. Saving the step in Studio keeps it.
Variables and run requirements
Flow setup, above the steps, holds what the whole flow declares. Under VARIABLES, Add variable adds a name and a value that steps use as ${NAME}; a flow it runs gets the value too. Under RUN REQUIREMENTS, scrolling, settling, step floor, settle ceiling, auto-scroll and strict set what this flow needs no matter how it is run. Left empty, each takes the run’s setting. They are saved in the flow file; see Settings a flow declares.
Organise
The Scripted tab lists flows with every step written out, and the Agentic tab lists agentic flows. New makes a New flow, a New agentic flow or a New group.
Groups on the Flows screen are folders inside .squiggle/flows/, so they are in your repository too. Drag a flow to move it, or press a group’s + (Add to and the group’s name): Add existing flow lists the other flows to tick, and Add (n) moves the ticked ones in. The same menu makes a new flow in the group. Sort by name, last replayed or date added.
Replay
Press Replay, or Replay flow on a flow in the list. Each step’s result appears as it runs, and the last run stays on screen with its timings. On a React web app, choose it on the Devices screen, then record and replay as on a simulator; see React web apps.
The Tools menu has Doctor, which checks the connection, and Crawl, which explores the app and opens the flow it finds.
Read the last run
| In Last run | What it does |
|---|---|
| Events, Steps | Switches between the step-by-step report and the run’s events: its settings, phases, heals and teardown. |
| Last Run position | Moves the panel below the editor, or back to the right. |
| More | Copy report copies the run, its settings and every step as text, for an issue or a prompt. Past runs opens History, filtered to flow runs. |
| Clear report | Clears the panel. The run stays in History. |
When a run healed a selector, a banner reads ✓ Accept N healed selector(s). Press it to write the new selectors into the flow’s steps and save the flow. See Healing.
Agent steps
An agent step that nothing checks shows Add assertion, which adds an assert after it: without one, the flow won’t run. Run in Claude Code and Run in Copilot copy a prompt that runs the flow and drives the step. Paste it into your agent; Studio doesn’t start one. Once an agent has driven the step, Re-record forgets the recording, so the next agent run drives it again.
Choose how a replay runs
The Options menu next to Replay sets how every replay runs. Click a setting to turn it on or off; the menu stays open, so you can change several at once. Each setting matches a squiggle flow flag:
| Option | What it does |
|---|---|
| Return to start screen | Takes the app back to the flow’s start screen before the run (--auto-correct). Off, a flow that declares a start screen still goes there first, as squiggle flow does; on, every flow does. |
| In-process delivery | Sends taps and text from inside the app, which is faster. On by default (--in-process). |
| Disable animations | Launches the app with iOS animations off (--no-animations). It takes effect the next time a replay launches the app. |
| Capture network | Records the app’s requests, so the flow can wait for the network and stub requests (--capture-net). Like Disable animations, it takes effect the next time a replay launches the app. |
| Direct scroll | Scrolls to a control in one step instead of dragging (--direct-scroll). |
| Auto-scroll | Scrolls an off-screen control into view instead of failing (--auto-scroll). |
| Fast settle | Moves on as soon as the app stops moving. On by default (--fast-settle). |
| Continue on failure | Runs every step instead of stopping at the first failure (--continue-on-fail). |
Studio remembers your settings after you quit it. A change applies from the next replay: a run already going keeps the settings it started with, and History records the settings each run used. See Run settings for when to change each one, and for the settings a flow can declare itself.
In the Studio on squiggle.sh, flows run in your browser, so only Continue on failure changes anything there. The other settings are greyed out, each with the reason.
Replay on every simulator at once
With two or more simulators booted, Replay all appears next to Replay. It runs the open flow on every booted simulator at the same time, with the same options, and opens the device grid so you can watch them. Each simulator shows its own progress on its cell, then its result: how many steps passed, or why it failed. Each run is saved to History on its own.
A simulator whose app isn’t running with Squiggle attached gets the app relaunched first, so its run starts a few seconds later. Stop all stops every simulator’s run after the step it is on.