fix(ui): wire up the stop button for a running simulation - #61
Open
MA1503 wants to merge 1 commit into
Open
Conversation
…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".
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.
Fixes #55.
The stop capability existed end-to-end —
handleStopSimulation()inStep3Simulation.vueandPOST /api/simulation/stopboth work — but no template element bound the handler, so a running simulation could not be stopped from the UI.Changes
.action-controlsflex layout (the class had no CSS rule at all, so the buttons overflowed the control bar)."paused"inprepared_statusesso a stopped simulation can be restarted:/stopleaves 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.json→paused), and/startresumes the simulation without a new prepare. Repeated twice.