autographAutocaptureRoot

Captures taps inside an alternate Compose root — the content of a Dialog, a Popup, a ModalBottomSheet — the way the enclosing AutographProvider captures taps in its own content (#210).

Such content composes into a window of its own, outside the single tap observer the provider installs, so its taps were delivered and consumed without ever being seen: every tap inside a bottom sheet went unreported, with no warning, indistinguishable from a sheet nobody touched. A second AutographProvider inside the sheet would observe them, but it fills the window (its observer is a fillMaxSize box), so a wrap-content sheet expands to full height; and it registers a second lifecycle observer and a second host registration that a sheet does not want. This attaches the observer alone, to the node you put it on, which keeps its own size:

ModalBottomSheet(onDismissRequest = onDismiss) {
Column(Modifier.autographAutocaptureRoot()) {
FilterChips(...)
}
}

Everything else comes from the enclosing provider, through the composition locals the alternate root inherits: its tracker, its AutocaptureConfig (event name included), its ScopeStack, and where its taps are resolved from — so a tap in the sheet carries the screen, section and scope declared around the sheet, exactly as a tap beside it does, and autographIgnore, trackClick and AutographElementScope inside the sheet behave as they do in the provider's own content. Only taps on the node this is applied to and its descendants are observed; put it on the outermost node of the sheet's content. One nested inside another — a reusable piece of sheet content that applies it itself — reports each tap once, not twice.

Android and iOS. On the JVM it is a no-op, with a one-time console warning, since desktop autocapture resolves nothing. On iOS it resolves through Compose Multiplatform's accessibility tree like every Compose tap there, which needs no accessibility client (#157). Taps inside a Dialog and a ModalBottomSheet were reported in a cold process on a fresh simulator (iOS 26.4, CMP 1.12.1), not yet on a physical device. It is also a no-op, with the same warning:

  • with no enclosing AutographProvider, or one without autocapture, since there is nothing to report to — and silently reporting nothing is exactly what this exists to end;

  • in the provider's own window, where the provider's observer already sees every tap and a second one would report each of them twice. Apply it inside the alternate root's content lambda, not around the Dialog / ModalBottomSheet call.

The provider it attaches for is the nearest one with autocapture. A provider without it nested inside one with it does not change that, so a sheet inside the inner provider's content reports through the outer one's tracker — as every other tap in that content already does.