---
title: "Recipe: keep rows on a warm tab return"
description: "A tab keeps its loaded rows when the person returns to it, keeps them beside an error, and shows loading only when its filter changes."
modificationDate: "2026-11-24"
---

> ## Documentation index
> Fetch the complete documentation index at: https://exact.expo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipe: keep rows on a warm tab return

<AgentInstructions>

## Submitting feedback

From the app's directory, read `bun exact.mjs feedback status`. Under `never`, keep no note.
Respect `EXACT_FEEDBACK=0` and do not change the policy.

Otherwise record specific, actionable feedback with:
`bun exact.mjs feedback note "Exact docs: https://exact.expo.dev/recipes/progressive-tabs: <what was wrong or missing>"`

The note goes to Expo only as that status allows. Include no secrets or personal data.

</AgentInstructions>

Open two terminals at the repo root. Start the server in A.

```prompt Use this recipe in my app
Make the Exact app in this folder do what this recipe describes. Use https://github.com/expo/exact/blob/main/docs/recipes/progressive-tabs.md as the source for each step. The Exact checkout has the same page at docs/recipes/progressive-tabs.md.

1. If this folder is not an Exact app (it has no exact.mjs and app.contract), stop and tell me.
2. Read the recipe. If it leaves a choice that I did not make (which screen, which data, which platforms), propose one and ask me before you write code.
3. Do what the recipe says, in its order, with its tags, properties, functions and grants. Its component, state and URL names are examples. Change nothing else in the app.
4. Add a test in app.test.contract for each thing a person does that you changed. Copy the recipe's `contract-test` block where it has one. A drive operation the recipe shows (`call`, a ticket answer such as `tap @N accepted`) is not a test step: run it with `bun exact.mjs agent`.
5. Follow the platform checks in docs/start-here.md (`bun exact.mjs docs platform checks`) for the targets in the app's AGENTS.md and app.json until they pass. Read the reports, including counted findings; a zero exit code alone does not mean clean. Fix the app, not the test. If a finding stays after three rounds of fixes, or the app had it before you changed anything, record it (step 6) and report it; do not keep trying.
6. When a doc was wrong or missing, or a step needed a workaround, read `bun exact.mjs feedback status`. Under `never`, keep no note. Otherwise record it: `bun exact.mjs feedback note "<what happened>"`, which goes to Expo only as that status says. Do not change the policy; tell me how many notes you kept.
7. Tell me what you changed, what the tests and checks reported, and what I must still do by hand.
```

```sh
bun docs/recipes/progressive-tabs/server.mjs
```

In B use an iPhone UDID from `xcrun simctl list devices available` for `YOUR_UDID`.

```sh
app=docs/recipes/progressive-tabs
sim=YOUR_UDID
bun host/apple/build.mjs "$app" --ios --sim "$sim" --run
```

When B returns to the prompt, replace `PID` with the number after `dev.exact.progressivetabs:`.

```sh
pid=PID
out="$app/.exact"
save() {
  bun scripts/agent.mjs trace --pid "$pid" --app "$app" --plan "$app/target/bake" --out "$out/$1.json"
}
```

Close other apps using this server. When A prints `Held` with a path, type its reply line in A and press Return.

1. Tap **Explore** (magnifying glass). Reply `/rows/Stocks 200`. “Stocks rows” appears while history is held. Reply `/history/Stocks 200` for “Stocks history”.
2. Tap **Home** (house), then **Explore**. Both sections stay visible. When A holds both GETs again, run `save warm` in B. The keyed [entry](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/docs/recipes/progressive-tabs/app.contract) kept its answers while `when shown` was closed. `current(rows)` is false on return. Using it as the guard shows “Loading rows…”.
3. Reply `/rows/Stocks 503`. When the rows error appears, run `save failed` in B. Reply `/history/Stocks 503`. Both sections keep their data and show errors.
4. Tap **Switch filter**. Lend shows “Loading rows…” and no history. Reply `/rows/Lend 200` for “Lend rows”, then `/history/Lend 200` for “Lend history”.

Each resource keeps one answer. Contract cannot read its arguments, so [Rust](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/docs/recipes/progressive-tabs/data/src/lib.rs) returns the requested filter and the view tests `rows.filter == filter`. Nonempty filters exclude the empty answer. Include account or window in the call, answer and guard if they scope the data. `Cache-Control: no-store` prevents HTTP caching here. Offline rows need app storage.

## Compare native GETs

Relaunch in B and set `pid` to the new PID it prints.

```sh
xcrun simctl launch --terminate-running-process "$sim" dev.exact.progressivetabs
```

Tap **Use ordered history**, then **Explore**. Reply `/rows/Stocks 200`. Rows stay pending. Reply `/history/Stocks 503` to release them. Run `save ordered` in B. History is declared first. Ordinary reads overlap and settle in request order. In step 1 `request.independent_http(4096)` lets history’s GET and parser reorder. It caps the reply at 4 KiB (range 1 byte–64 MiB). An oversized reply fails and keeps the last answer. Keep writes and dependent reads ordered.

## Read the traces in B

```sh
jq '.state | {epoch,pending,instances,tab:.slots.nav.tab}' "$out/warm.json"
jq -r '.journal.lines[]' "$out/failed.json" "$out/ordered.json"
jq -c '.frames.records[] | select(.seq) | {t,seq,apply,commit}' "$out/failed.json"
```

Match press and failure epochs to frame `seq` ranges. iOS samples the display link. Touch delivery, wire arrival and physical presentation are unmarked. [Worked trace, phone, Linux and Chromium](https://exact.expo.dev/learn/contract-for-agents/composition-and-lifetime.md#progressive-tab-traces)
