Skip to content

Implement run benchmark UI#2041

Merged
cezudas merged 29 commits intomainfrom
cezudas/OPS-3776
Mar 4, 2026
Merged

Implement run benchmark UI#2041
cezudas merged 29 commits intomainfrom
cezudas/OPS-3776

Conversation

@cezudas
Copy link
Contributor

@cezudas cezudas commented Mar 2, 2026

@linear
Copy link

linear bot commented Mar 2, 2026

@cezudas cezudas force-pushed the cezudas/OPS-3776 branch from 134dfd4 to 75f9878 Compare March 2, 2026 17:36
Base automatically changed from cezudas/OPS-3780-list to main March 2, 2026 18:07
@cezudas cezudas requested review from Copilot and ravikiranvm March 3, 2026 12:57
@cezudas cezudas marked this pull request as ready for review March 3, 2026 12:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 useBenchmarkRun hook 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.

Comment on lines +79 to 85
<Button
size="sm"
disabled={!hasOrchestrator || isRunning}
onClick={onRunNow}
>
{t('Run now')}
</Button>
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +17 to +19
{`${t('— Running workflows')} ${progress.completed}/${
progress.total
}...`}
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
{`${t('— Running workflows')} ${progress.completed}/${
progress.total
}...`}
{t('— Running workflows {{completed}}/{{total}}...', {
completed: progress.completed,
total: progress.total,
})}

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, While react-ui i18n setup supports the full sentence with interpolation, Storybook i18n setup does not support it.

@alexandrudanpop
Copy link
Contributor

alexandrudanpop commented Mar 3, 2026

I see some issues on the UX side, that would be good to address:

image

The final link to Analytics does not look as a CTA, but more like a secondary action. Also, the copy does not tell what you will see. I think something better would be View Results.

In this final stage, the Run now button looks like the main CTA. This might be called Run again instead, with a secondary button variation.

@cezudas
Copy link
Contributor Author

cezudas commented Mar 3, 2026

I see some issues on the UX side, that would be good to address:

image The final link to Analytics does not look as a CTA, but more like a secondary action. Also, the copy does not tell what you will see. I think something better would be `View Results`.

In this final stage, the Run now button looks like the main CTA. This might be called Run again instead, with a secondary button variation.

I see some issues on the UX side, that would be good to address:

image The final link to Analytics does not look as a CTA, but more like a secondary action. Also, the copy does not tell what you will see. I think something better would be `View Results`.

I think we will stick to the Figma for the first iteration

In this final stage, the Run now button looks like the main CTA. This might be called Run again instead, with a secondary button variation.

I think we will stick to the Figma for the first iteration and update if and when we have an updated Figma. I changed the code so it no longer shows the footer buttons (including run now) when the report is available, see screenshots:

  1. benchmark ready
benchmark-ready
  1. benchmark running
running-benchmark
  1. benchmark succeeeded without any failed workflows
benchmark-succeeded-with-failures
  1. benchmark succeeded with failed workflows
benchmark-succeeded-with-failures

@cezudas cezudas requested a review from alexandrudanpop March 3, 2026 17:53
@cezudas cezudas changed the base branch from main to cezudas/OPS-3829 March 3, 2026 19:56
@cezudas cezudas changed the base branch from cezudas/OPS-3829 to main March 3, 2026 20:26
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 3, 2026

@cezudas cezudas merged commit 2b0320a into main Mar 4, 2026
20 checks passed
@cezudas cezudas deleted the cezudas/OPS-3776 branch March 4, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants