#266 UI: Implement Workflow Replay Capability
Description
EditAdd replay/time-travel debugging UI for completed workflows.
## API Endpoints Available
- GET /api/v1/workflows/{workflow_run_id}/replay/simulate - Simulate workflow execution
- GET /api/v1/workflows/{workflow_run_id}/replay/data - Get raw replay data (checkpoints, events)
## Implementation Steps
### Phase 1: Replay Button & Basic View
1. Add 'Replay' button to workflow detail page (only for completed/failed workflows)
2. Create /workflows/{id}/replay route
3. Call /replay/simulate endpoint and display simulation_status (success/failed)
4. Show executed_steps list with timing from replay_logs
### Phase 2: Timeline Visualization
1. Parse replay_logs array to build execution timeline
2. Display tasks as nodes with status icons (✅ success, ❌ failed)
3. Show task duration from timing data (e.g., 'setup_directory (38.95ms)')
4. Highlight divergences if any (divergences array)
### Phase 3: Variable Inspector
1. Parse SetVariable/GetVariable entries from replay_logs
2. Build collapsible tree view of variables at each step
3. Show variable values with JSON syntax highlighting
4. Filter by variable name
### Phase 4: Checkpoint Browser
1. Display checkpoints_available count
2. If checkpoints exist, allow browsing checkpoint data
3. Show which checkpoints were used during simulation
### Phase 5: Divergence Detection
1. If divergence_count > 0, show warning banner
2. List each divergence with expected vs actual values
3. Highlight affected tasks in timeline
## Response Schema (from /replay/simulate)
```json
{
"simulation_status": "success|failed",
"workflow_name": "string",
"executed_steps": ["task1", "task2"],
"steps_executed_count": 6,
"checkpoints_available": 0,
"divergences": [],
"replay_logs": ["✅ [task_name] (timing) → result..."],
"error": null | {"error_type", "error_message", "error_traceback"}
}
```
## UI Components Needed
- ReplayButton component
- ReplayTimeline component
- VariableInspector component
- DivergenceAlert component
- CheckpointBrowser component
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...