mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
refactor(inspect-ui): use next step's screenshot for state after
Each step now has one screenshot (the moment of observation). The "state after" view of step N is the same moment as step (N+1)'s observation, so reuse that file rather than expecting a separate -after.png.
This commit is contained in:
1 parent
fb69c1b774
commit
50e03244d6
1 file changed
+6
-3
@@ -92,15 +92,18 @@ export default function RunDetail() {
|
||||
onJumpNextViolation: jumpToNextViolation,
|
||||
});
|
||||
|
||||
// One screenshot per step depicts the UI at observation time (post-prior-
|
||||
// action, post-settle). The "after" view for step N is therefore step
|
||||
// (N+1)'s screenshot: the same moment, observed from the next iteration.
|
||||
const beforeScreenshot = useMemo(() => {
|
||||
if (!runId || !currentStep) return undefined;
|
||||
return screenshotUrl(runId, `step-${String(currentStep.step).padStart(5, "0")}.png`);
|
||||
}, [runId, currentStep]);
|
||||
|
||||
const afterScreenshot = useMemo(() => {
|
||||
if (!runId || !currentStep) return undefined;
|
||||
return screenshotUrl(runId, `step-${String(currentStep.step).padStart(5, "0")}-after.png`);
|
||||
}, [runId, currentStep]);
|
||||
if (!runId || !nextStep) return undefined;
|
||||
return screenshotUrl(runId, `step-${String(nextStep.step).padStart(5, "0")}.png`);
|
||||
}, [runId, nextStep]);
|
||||
|
||||
const runStartMillis = useMemo(() => {
|
||||
if (!run?.steps.length) return 0;
|
||||
|
||||
Reference in new issue
Block a user