Frontend doesn't show error when simulation fails

Author: tt-a1iCreated Jan 5, 2026Updated Sep 2, 2026

What happened

When a simulation fails (process crashes, missing deps, etc.), the frontend just sits there showing "running" status with no error message. The backend logs the error correctly and returns runner_status: 'failed' with an error message, but the UI never picks it up.

Ran into this while testing locally - took me a while to figure out why nothing was happening.

Steps to reproduce

  1. Start the app
  2. Create a project and build the graph
  3. Start simulation, but make it fail somehow (e.g. missing dependency)
  4. Frontend shows no error, stays in "running" state

Root cause

Found it in Step3Simulation.vue - the fetchRunStatus() function only checks for completed and stopped:

// line 512
const isCompleted = data.runner_status === 'completed' || data.runner_status === 'stopped'

There's no handling for runner_status === 'failed', so the error just gets ignored.

Suggested fix

Add a check before the completion logic:

if (data.runner_status === 'failed') {
  const errorMsg = data.error || '模拟运行失败'
  addLog(`✗ 模拟失败: ${errorMsg}`)
  phase.value = 2
  stopPolling()
  emit('update-status', 'error')
  return
}

Happy to submit a PR if you'd like.