fix(replay): unify step indexing, dual-index entity deduplication, and prevent step-4 start bug

- Backend: maintain _step_number_cache in DataEngine and include step_number in all step_updated SSE events (summary, thinking, execution result)
- Admin console: query unassigned trace step_ids in stepless_rows to prevent orphan traces from being lost
- Showcase UI: implement dual-indexed entity deduplication (by step_id and step_number) in extractStepReplayFrames to eliminate phantom ghost steps
- Showcase UI: filter visual screenshot steps before generating sequential 1-based frame numbers, preventing step-4 start and index shift bugs
- Showcase UI: add rawStepNumber and summary properties to StepReplayFrame
- Showcase UI: update FloatingVideoPlayerComponent session reset effect to only reset playback on sessionId change rather than on every stepFrames mutation
- Showcase UI: add stepSeekRequest signal and stepIndex parameter to AgentService.openVideoPlayer
- Unit tests: add Karma and Pytest unit tests verifying step 1 start, dual-indexing, and SSE step_number payloads
This commit is contained in:
somew1nd committed 2026-08-27 11:03:47 -07:00
1 parent 5f1ee18bc1
commit 60312abbb0
8 files changed
+384 -91

No files matched your search

@@ -130,13 +130,20 @@ export class FloatingVideoPlayerComponent implements OnDestroy {
{ allowSignalWrites: true }
);
// Reset step playback state when session changes
// Reset step playback state only when session actually changes
let lastTrackedSessionId: string | null = null;
effect(
() => {
const _ = this.stepFrames();
this.activeStepIndex.set(0);
this.viewMode.set('pre');
this.pauseStepPlay();
const curSessionId = this.agentService.currentSessionId();
const total = this.totalStepFrames();
if (curSessionId !== lastTrackedSessionId) {
lastTrackedSessionId = curSessionId;
this.activeStepIndex.set(0);
this.viewMode.set('pre');
this.pauseStepPlay();
} else if (total > 0 && this.activeStepIndex() >= total) {
this.activeStepIndex.set(total - 1);
}
},
{ allowSignalWrites: true }
);
@@ -171,6 +178,12 @@ export class FloatingVideoPlayerComponent implements OnDestroy {
this.seek(target, true);
}
});
effect(() => {
const request = this.agentService.stepSeekRequest();
if (!request) return;
this.seekStepFrame(request.index);
});
}
public onLiveStreamError(): void {