Summary
Pressing x in the navigator immediately stops a running workflow or deletes a saved workflow with only a post-hoc ui.notify(). A confirmation step prevents accidental data loss.
Current state
case 'stop':
manager.stop(action.runId) // immediate, no confirm
ui.notify(`Stopped ${action.runId}`)
break
case 'deleteSaved':
storage.delete(action.savedName) // immediate, no confirm
ctx.ui.confirm() already exists and is used in /workflows-models — infrastructure is in place.
Proposed change
case 'stop': {
const ok = await ctx.ui.confirm(`Stop workflow "${run.name}"? This cannot be undone.`)
if (!ok) break
manager.stop(action.runId)
break
}
case 'deleteSaved': {
const ok = await ctx.ui.confirm(`Delete saved workflow "/${action.savedName}"?`)
if (!ok) break
storage.delete(action.savedName)
pi.unregisterCommand(action.savedName)
break
}
Also apply to pause with a lighter confirmation.
Files to change
src/workflow-ui.ts — wrap stop, deleteSaved, pause with ctx.ui.confirm()
Summary
Pressing
xin the navigator immediately stops a running workflow or deletes a saved workflow with only a post-hocui.notify(). A confirmation step prevents accidental data loss.Current state
ctx.ui.confirm()already exists and is used in/workflows-models— infrastructure is in place.Proposed change
Also apply to
pausewith a lighter confirmation.Files to change
src/workflow-ui.ts— wrapstop,deleteSaved,pausewithctx.ui.confirm()