Conversation
flow-rows → orchestrator-filter → run-fetch pipeline, leaving listBenchmarks as three sequential, decoupled steps.
134dfd4 to
75f9878
Compare
There was a problem hiding this comment.
Pull request overview
Implements the “run benchmark” UX in the benchmark wizard by adding a run/polling hook, wiring footer actions (run/view/reset), and exposing running progress in the UI components.
Changes:
- Add
useBenchmarkRunhook to trigger benchmark runs, poll status, and compute per-workflow progress. - Update benchmark wizard + footer to support “Run now”, disable setup changes while running, and show failed-state actions.
- Update UI components/stories for running progress and analytics link parameterization.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-components/src/stories/benchmark/benchmark-ready-step.stories.tsx | Updates story args to include webhook payload/provider and adds a “running with progress” state. |
| packages/ui-components/src/components/benchmark/benchmark-running-phase.tsx | Adds optional progress rendering in the running phase UI. |
| packages/ui-components/src/components/benchmark/benchmark-ready-step.tsx | Plumbs running progress into the running phase; removes failed-phase action callbacks. |
| packages/ui-components/src/components/benchmark/benchmark-failed-phase.tsx | Simplifies failed phase to message-only (actions moved to wizard footer). |
| packages/ui-components/src/components/benchmark/benchmark-analytics-phase.tsx | Updates analytics link query param to dashboard=..._benchmark. |
| packages/react-ui/src/app/features/benchmark/use-benchmark-run.ts | New hook for run trigger, status polling, lastRunId tracking, and progress computation. |
| packages/react-ui/src/app/features/benchmark/tests/use-benchmark-run.test.ts | Adds unit tests covering run trigger, polling phase transitions, reset, and progress counts. |
| packages/react-ui/src/app/features/benchmark/components/view-benchmark-workflows-button.tsx | Adds disabled prop to prevent navigation while a run is active. |
| packages/react-ui/src/app/features/benchmark/components/benchmark-wizard.tsx | Integrates useBenchmarkRun, adds “view run” navigation, resets run when editing setup, passes progress to UI. |
| packages/react-ui/src/app/features/benchmark/components/benchmark-wizard-footer.tsx | Adds run-phase-aware footer actions (run now / view run / run again) and disables controls while running. |
| packages/react-ui/src/app/features/benchmark/benchmark-api.ts | Adds API methods to run benchmark via webhook, fetch status, and list benchmarks. |
| packages/react-ui/src/app/constants/query-keys.ts | Adds benchmarkStatus query key constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/react-ui/src/app/features/benchmark/use-benchmark-run.ts
Outdated
Show resolved
Hide resolved
| <Button | ||
| size="sm" | ||
| disabled={!hasOrchestrator || isRunning} | ||
| onClick={onRunNow} | ||
| > | ||
| {t('Run now')} | ||
| </Button> |
There was a problem hiding this comment.
onRunNow returns a Promise, but it’s passed directly to Button’s onClick. If the mutation rejects, this can surface as an unhandled promise rejection in the browser since the click handler isn’t awaited/caught. Wrap the call in a sync handler that catches (or ensure onRunNow never rejects) so failures are handled cleanly.
| {`${t('— Running workflows')} ${progress.completed}/${ | ||
| progress.total | ||
| }...`} |
There was a problem hiding this comment.
The progress text is built by concatenating a translated fragment with numbers/punctuation inside a template string. For i18n, it’s safer to translate the full sentence with interpolation (e.g. completed/total) so languages can reorder tokens and punctuation correctly.
| {`${t('— Running workflows')} ${progress.completed}/${ | |
| progress.total | |
| }...`} | |
| {t('— Running workflows {{completed}}/{{total}}...', { | |
| completed: progress.completed, | |
| total: progress.total, | |
| })} |
There was a problem hiding this comment.
Unfortunately, While react-ui i18n setup supports the full sentence with interpolation, Storybook i18n setup does not support it.
packages/react-ui/src/app/features/benchmark/components/benchmark-wizard.tsx
Outdated
Show resolved
Hide resolved
packages/react-ui/src/app/features/benchmark/use-benchmark-run.ts
Outdated
Show resolved
Hide resolved
packages/react-ui/src/app/features/benchmark/use-benchmark-run.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|









Fixes OPS-3776.
https://www.loom.com/share/7558a94cd14d4c7db878e3195b2ff5d9