Skip to main content
Openturn’s inspector turn the action log into an interactive timeline: every frame, every state diff, every transition branch the engine considered, and the graph of states with the current node highlighted.

Preferred: useInspector + <InspectorShell>

Inside any <OpenturnProvider>, call useInspector() on your bindings. One hook covers both local and multiplayer modes; it picks the right timeline source (local replay log or hosted batch history) from useMatch().
For standalone replay viewers (no live match), use useReplayInspector:

Drop-in components

@openturn/inspector-ui exports a single createInspector(bindings) that returns { Inspector, ReplayInspector, HostedInspector }. Each component manages its own inspector state internally and renders <InspectorShell> for you. Prefer the hook-based pattern above for custom layouts.

What you see

Each inspector exposes the same panels:
  • Timeline — a horizontal list of frames. Click a frame to jump to it.
  • Snapshot — the full G + position + derived at the selected frame.
  • Diff — what changed between the previous and current frame (computed with diffReplayValues).
  • Transition — the event that fired, the chosen branch label, and all the branches the engine evaluated.
  • Control — the state’s control summary and pending targets.
  • Graph — the state machine graph with the current node and incoming/outgoing edges highlighted.

Inspecting a specific branch

Click a transition entry to see:
  • The event name and payload.
  • Every branch evaluation: which resolver ran, whether it returned a result, and (if not) why (null return, rejectTransition, no match).
  • The chosen branch’s label.
This is the fastest way to answer “why did the engine pick that transition.”

Programmatic access

If you want the raw data without a UI, use the underlying builders:
For hosted matches, convert protocol batches with hostedBatchEntriesFromProtocol and pass the result as the entries field of a { kind: "hosted", ... } source.