---
title: "Interactive stress examples"
description: "Messages stress compares a bounded synthetic history page with deliberately eager construction while typing and streaming updates."
modificationDate: "2026-11-30"
---

> ## 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.

# Interactive stress examples

<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/reference/developer/interactive-stress-examples: <what was wrong or missing>"`

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

</AgentInstructions>

[Messages stress](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/messages-stress/README.md) compares a bounded synthetic
history page with deliberately eager construction while typing and streaming
updates. [Completion Storm](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/completion-storm/README.md) holds and releases
real local HTTP requests, including failures and replies to a departed screen.
[Markdown stress](https://github.com/expo/exact/blob/41ded8c5ede0b2959ef0daa83b1ff78545dd4428/apps/markdown-stress/README.md) exercises the shipped parser
and reader components with large documents, huge individual blocks and reflow,
and the Markdown editor with a toolbar and a link sheet
([`markup`, `format`, `select`](https://exact.expo.dev/reference/contract-grammar/built-in-tags.md#markdown-markup-format-select)).
These are opt-in developer workloads; none claims automatic virtualization or
120 Hz performance. LLP 1041 specifies the
graceful-overload direction and records what the first examples actually prove.

With a fixture running, `bun scripts/metrics.mjs --stress-url
http://127.0.0.1:4318 --seconds 10 --target-hz 120` samples typing-to-echo and
frame-callback gaps (`CHROME` selects the browser). Repeat `--tap <testId>` for
workload controls. This is a headless diagnostic, not a physical-display FPS test.

On macOS, the driver’s `resize 900x700` requests 900 points of full content
width (including a sidebar) and 700 points of page height. A page with
`viewport-fit="cover"` or an active `window-controls-overlay` includes the titlebar
in that height; other pages start below the window’s bars. Its reply reports the
page’s actual viewport separately.

After building a native app, `bun scripts/native-resize-metrics.mjs macos
--app messages-stress` interleaves window resizing, typing and scrolling, then
checks geometry, echo and recovery. Substitute `linux` on an actual Linux host
or select `--app markdown-stress` / `completion-storm` (with its fixture running).
It records raw command acknowledgments and executable identity; AppKit window
resizing and Linux headless presenter resizing do not measure physical refresh.

## Intersection visibility

`reachstart` and `reachend` belong only to `list virtualized=true` with one
direct keyed `for` (LLP 1010). A vertical list with `appearance="none"` can
also hold always-mounted lead and trail children. Only a non-empty data
collection fires edges. Without fixed content,
its geometric window reaches the first or last supplied row. With fixed content,
the edge is the lead's start or the trail's end. An empty data collection fires
neither event. A plain list lays out all its children and has no collection window;
the Contract compiler refuses either handler there, on every target.

In a list with no fixed content, a loading or start-of-thread notice can be
one more item of the `for`'s list, put first by a `derive`. The `for`'s root
draws it by its key, and `reachstart` watches that edge row. For a notice in
fixed content, see [Long lists](https://exact.expo.dev/recipes/long-lists.md): the lead's start is
the edge.

```text
derive rows = [Message(id="older", body=(atStart ? "Start of the chat" : "Loading…"))].concat(thread)
```

`reach-margin` on such a list sets how far ahead of an edge they fire: the edge
row may be up to that far past the port. It is a literal, one or two nonnegative
px or % lengths (before and after; a percentage is of the list's port along its
axis), and defaults to one port, `"100%"`. `reach-margin="200%"` asks for the
next page when the last row is two ports away (LLP 1145 D4). That is the
distance at rest. While the list scrolls toward an end, the margin on that side
grows by as much as the list's window leads for the scroll: a quarter second of
travel, up to two ports. A fling up a transcript at 4,000 px/s in a 320 px port
asks for older rows once the first row is within 960 px (LLP 1027.004 D3).

For a plain feed or masonry, use `intersect=` on a marker at the end of the
content, after the columns, inside the same scroller:

```text
view intersect=loadMore intersect-margin="0px 0px 800px 0px"
  height=1
```

`loadMore(entry: IntersectionObserverEntry)` should load only when
`entry.isIntersecting` is true, a next page exists, and no request is pending.
The bottom margin starts loading up to 800px before the marker enters the
scrollport. This observes the marker, not the last row of each column.
See [paging columns](https://exact.expo.dev/recipes/responsive-columns.md#paging-columns) for a complete example.

`intersect=action` on a node offers a final `IntersectionObserverEntry` record
(`isIntersecting: bool`, `intersectionRatio: number`) after authored arguments.
The nearest ancestor scroll container is the root, otherwise the viewport;
threshold is fixed at 0. It delivers after mounting and on enter/leave, not
on every ratio change. Entries in one root/margin group follow observation order,
after resize callbacks and authored scrolling. `intersect-margin="200px 0px"`
is a literal rootMargin (one to four case-insensitive px/% lengths, default 0px).
Numbers follow CSS syntax: `.5px` and `1e2px` are valid; `1.px` is refused at compile time.
Percentages use the corresponding root dimension.
On iOS, a `resizes-visual` route's viewport can be the root, including at offset zero.
`overflow: clip` clips descendants without becoming a root. The margin expands
only the root; clips between the target and root keep their original bounds.
Ancestors above an explicit root only map its coordinates.
This can keep T3 sidebar subscriptions active near the viewport and track timeline turns.
Removal cancels observation without a leave callback. Both web targets use the
browser's IntersectionObserver after first paint. AppKit, UIKit and Linux use
the shared native sampler after resize settlement and presented scrolling.
Native inline runs, moving presentation geometry, rotated roots and SVG clip references remain unqualified;
percentage margins follow Chrome (LLP 1001). See LLP 1005's intersection
visibility deviation; other native hosts remain unqualified.

## Reporting a pinch

| Host | Input delivered to `pinch` and `pinchrelease` |
| --- | --- |
| iOS and iPadOS | UIKit's simultaneous pinch recognizer. A drifting pair scrolls the list as it pinches. Lifting the pair leaves the list at its release offset; a surviving or later finger that moves again can still fling. An iPad trackpad pinch reaches this recognizer (unverified on hardware). |
| Android, Web JS, Web wasm, macOS, painted Linux and Windows, terminal | Both bindings compile and stay silent. Android and touch-web recognizers are queued on `fable/pinch-report-1804`. |

Use `wheel` with `ctrlKey` for trackpad magnification on macOS and the web.
On other desktops the same handler can consume a Control-held wheel where
the host delivers one. [Grid example](https://exact.expo.dev/learn/contract-for-agents/time-motion-graphics-and-platform-facts.md#changing-a-grids-columns)

## Scroll drags and swipes

`scrolldragstart` and `scrolldragend` on a scroller bracket the reader's drag
of it, as UIKit's `scrollViewWillBeginDragging` and
`scrollViewWillEndDragging(_:withVelocity:targetContentOffset:)` do. The end's
`ScrollDragEvent` carries `velocityX` and `velocityY` in UIKit's units, CSS
pixels per millisecond, positive in the direction `scrollLeft` and `scrollTop`
grow, and `targetLeft` and `targetTop`, where the momentum will stop, `some` on
iOS and Android and `none` where the host cannot say before it gets there. macOS
takes a trackpad's two fingers as the drag and the web a touch, each estimating
the velocity from the last 100 ms of the fingers' moves; Android takes a finger
on each scroller it moves, with the platform's velocity; Linux and
Windows send neither. A wheel, the keyboard and a programmatic scroll send
neither
([events](https://exact.expo.dev/reference/contract-grammar/events.md)).

An element takes one `swipe=action` and exactly one of `swipe-follow` or
`swipe-flick` beside it. With `swipe-follow="right"` or `"left"`, a quoted
literal, the node follows the finger, and one action runs when it lifts 64
points or more that way; `tree` names the event `swiperight` or `swipeleft`.
The direction is the screen's, in a right-to-left layout too, and a node
follows one direction ([Swipe to reply](https://exact.expo.dev/learn/contract-for-agents/time-motion-graphics-and-platform-facts.md#swipe-to-reply)).

With `swipe-flick` (`left`, `right`, `up` or `down`), `swipe` is the
platform's discrete swipe: nothing follows the finger, and the action runs once
when UIKit's swipe recognizer recognizes a swipe that way on the node or a view
inside it, a text field included. UIKit arbitrates it with the other gestures
under the finger, as it does any swipe: a field whose text overflows pans
instead. Only iOS has it; macOS,
tvOS, the web, Linux, Windows and Android fire none (LLP 1057.001 §8).
