MicroFish/frontend
MrBeanDev 5da9cc3d76 fix(simulation): stop discarding an existing run when Step 3 remounts
Step3Simulation mounted with a simulation id and immediately called
doStartSimulation() with force: true. Because the id lives in the route
path (/simulation/:simulationId/start), a browser refresh remounted the
component and re-sent that request, so the backend stopped the running
subprocess and cleaned the run directory: run_state.json, the twitter and
reddit actions.jsonl action logs, and both *_simulation.db files. The
timeline, posts and comments views read those files directly, so the data
was unrecoverable.

Probe the run status before deciding what to do. A simulation that has
never run (runner_status "idle" with no recorded actions) still starts
exactly as before. Anything else is adopted instead of restarted: live
runs resume polling, finished runs load their existing timeline read-only.
If the status probe itself fails we now do nothing rather than risk
overwriting a run we could not verify.

force is also no longer hardcoded to true. The remaining call site only
runs when there is nothing to lose, and the flag should never be an
implicit default.
2026-08-04 07:03:40 +05:30
..
public Remove outdated README.md and update favicon in index.html 2025-12-16 20:58:48 +08:00
src fix(simulation): stop discarding an existing run when Step 3 remounts 2026-08-04 07:03:40 +05:30
.gitignore Add project status report and frontend documentation 2025-12-10 14:49:11 +08:00
index.html fix(i18n): set HTML lang attribute before Vue mounts via inline script 2026-04-02 14:21:09 +08:00
package-lock.json chore: update vulnerable npm dependencies 2026-07-23 00:26:51 +08:00
package.json chore: update vulnerable npm dependencies 2026-07-23 00:26:51 +08:00
vite.config.js fix(i18n): fix curly quotes and missing @ alias in vite config 2026-04-01 15:45:43 +08:00