useInspectHistory
Stable · since 0.1.0
Returns the most recent limit inspector snapshots from the active runtime, newest first. The hook subscribes to runtime.subscribe and re-renders whenever a new run is recorded — use it for in-app devtools panels, “last 20 runs” lists, or any UI that needs a live event log.
Snapshots include all triggers in the runtime — there is no per-trigger filter. To narrow to one trigger, filter the returned array.
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Param | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Maximum number of snapshots to return. Capped by the runtime’s inspectorBufferSize. |
Returns
Section titled “Returns”A readonly TriggerInspectSnapshot[], newest first. Empty when the inspector is disabled or no runs have occurred yet.
Examples
Section titled “Examples”Recent runs panel
Section titled “Recent runs panel”Per-trigger filter
Section titled “Per-trigger filter”Error-only view
Section titled “Error-only view”Status counts
Section titled “Status counts”Related
Section titled “Related” useInspect Latest snapshot for one trigger (no subscription).
createInspector The ring-buffer implementation.
RuntimeOptions `inspector` and `inspectorBufferSize`.
@triggery/devtools-panel Drop-in panel that uses this hook.