feat: Add workflow replay command and YAML config viewer#70
Merged
Conversation
Add a new `conductor replay <log-file>` CLI command that launches the web dashboard in replay mode with a timeline slider for scrubbing through recorded workflow history. Backend: - ReplayDashboard server loads JSON array or JSONL event logs - /api/replay/info endpoint enables frontend replay mode detection - Auto-detects file format (dashboard download vs EventLogSubscriber) Frontend: - ReplayBar component with play/pause, scrub slider, and 1x/2x/4x/8x speed controls - useReplay hook drives auto-play with timing derived from real event timestamps - App.tsx conditionally renders replay vs live mode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In replay mode, elapsed timers (workflow duration, per-agent, per-script) now compute from event timestamps rather than Date.now(), so durations match the original workflow execution. Live mode is unchanged — the replayMode guard ensures Date.now() timers only run when replayMode is false (the default). Also restores src/lib/utils.ts and src/lib/constants.ts that were inadvertently gitignored by the top-level lib/ pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Include raw YAML text in the workflow_started event via a yaml_source field. The frontend stores it and shows a "YAML" button in the header that opens a slide-over panel. Works in both live and replay modes since the YAML flows through the event pipeline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Panel is now 80% width centered modal. YAML keys are highlighted in blue, booleans/numbers in amber, strings in green, and comments in emerald. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Padding on the scroll container gets clipped; moving it to the pre element ensures consistent spacing around the YAML content. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add indentation-based code folding to the YAML viewer. Lines with more-indented children get a ▶/▼ toggle in the gutter. Collapsed sections show a ··· badge. Click to expand/collapse. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace hardcoded "Dashboard v1.0" with the actual conductor-cli version from the workflow_started event. Shows "v0.1.5" etc. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
05c3878 to
318d999
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Some tests pass workflow_path as a string instead of Path. Wrap with Path() and catch ValueError in addition to OSError. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In CI environments with narrow or unset terminal widths, Rich truncates option names in Typer help output (e.g. '--web-port' becomes '--web…'), causing the test_custom_port_option assertion to fail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The COLUMNS env var was set after importing conductor.cli.app, which creates Rich Console objects at module level during import. On CI (no TTY), the Console cached a narrow default width, causing --web-port to be truncated from replay help output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rich may insert ANSI escape codes within option names differently across platforms. Strip them before checking for --web-port to make the test robust on CI (Linux, no TTY). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new features to the Conductor dashboard:
1.
conductor replaycommandReplay recorded workflow runs from JSON/JSONL event log files with a web dashboard.
ReplayDashboardserver reuses the existing React frontend2. YAML config viewer
A "YAML" button in the dashboard header opens a centered modal displaying the workflow configuration with:
workflow_started)Implementation details
ReplayDashboardclass insrc/conductor/web/replay.py— minimal FastAPI serverGET /api/replay/info(404 in live mode)useReplayhook drives auto-play with delays derived from real event timestampsworkflow_startedevent now includesyaml_sourcefieldFiles changed
src/conductor/web/replay.py— new ReplayDashboard serversrc/conductor/cli/app.py— newreplaycommandsrc/conductor/engine/workflow.py— emityaml_sourceinworkflow_startedsrc/conductor/web/frontend/src/— store, hooks, and components for replay + YAML viewertests/— new test files for replay server and CLI command