Skip to content

fix(ui): wire up the stop button for a running simulation - #61

Open
MA1503 wants to merge 1 commit into
nikmcfly:mainfrom
MA1503:fix/ui-stop-button
Open

fix(ui): wire up the stop button for a running simulation#61
MA1503 wants to merge 1 commit into
nikmcfly:mainfrom
MA1503:fix/ui-stop-button

Conversation

@MA1503

@MA1503 MA1503 commented Jul 24, 2026

Copy link
Copy Markdown

Fixes #55.

The stop capability existed end-to-end — handleStopSimulation() in Step3Simulation.vue and POST /api/simulation/stop both work — but no template element bound the handler, so a running simulation could not be stopped from the UI.

Changes

  • Add a Stop Simulation button to the Step 3 control bar, visible while the simulation is running (phase 1), wired to the existing handler.
  • Add the missing .action-controls flex layout (the class had no CSS rule at all, so the buttons overflowed the control bar).
  • Accept "paused" in prepared_statuses so a stopped simulation can be restarted: /stop leaves the state as "paused", which the prepare check previously rejected with "Please call /prepare first" (also reported by the No stop control in the UI for a running simulation #55 reproduction).

Tested in our downstream fork with Playwright against a running 48-round simulation, in a fresh browser profile (plain UI flow): the button appears while running, clicking stops the run (state.jsonpaused), and /start resumes the simulation without a new prepare. Repeated twice.

…cfly#55)

The stop capability existed end-to-end — handleStopSimulation() in
Step3Simulation.vue and POST /api/simulation/stop both work — but no
template element bound the handler, so a running simulation could not
be stopped from the UI.

- Add a Stop Simulation button to the control bar, visible while the
  simulation is running (phase 1), wired to the existing handler.
- Accept "paused" in prepared_statuses so a stopped simulation can be
  restarted: /stop leaves the state as "paused", which the prepare
  check previously rejected with "Please call /prepare first".
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.

No stop control in the UI for a running simulation

1 participant