From 32d0171b1012ddabb847f657ea4740c3a82d31a9 Mon Sep 17 00:00:00 2001 From: PJ Date: Wed, 12 Aug 2026 16:47:25 +0530 Subject: [PATCH] feat(replay-ui): show the step a violation was detected at The witness evidence is the detecting step's state, so say which step that is and let a reader jump to it. Claude-Session: https://claude.ai/code/session_01Fj4wJUikdABuMQEETwW55J --- replay-ui/src/panels/ViolationsPanel.tsx | 23 ++++++++++++++++++++++- replay-ui/src/types.ts | 3 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/replay-ui/src/panels/ViolationsPanel.tsx b/replay-ui/src/panels/ViolationsPanel.tsx index 1c6a73e..85bc5bb 100644 --- a/replay-ui/src/panels/ViolationsPanel.tsx +++ b/replay-ui/src/panels/ViolationsPanel.tsx @@ -59,9 +59,30 @@ function WitnessView({ )} ) : null} + {witness.detected_step && witness.detected_step !== witness.step ? ( +
+ detected at + {onJumpToStep ? ( + + ) : ( + + step {witness.detected_step} + + )} +
+ ) : null} {evidence.length > 0 ? (
- witness + + witness + {witness.detected_step ? ` (state at step ${witness.detected_step})` : ""} +
{evidence.map(([name, value]) => (
diff --git a/replay-ui/src/types.ts b/replay-ui/src/types.ts index dfa8708..601187b 100644 --- a/replay-ui/src/types.ts +++ b/replay-ui/src/types.ts @@ -128,6 +128,9 @@ export interface Witness { // which for deferred obligations (next, eventually) is earlier than the // step whose record carries the witness. step?: number; + // detected_step is the step whose evaluation produced the violation. The + // extractors below are that step's state, not step's. + detected_step?: number; extractors?: Record; }