mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 16:02:11 +00:00
fix: don't offer to discard a data table that was created
Closing the wizard after a failed appended step asked "Leave without adding a data table?" and warned that what ran had left things behind. Every part of that is false when the setup itself succeeded: the data table exists and works, and only its migrations did not run. hasUnfinishedIntent() now asks only whether the setup succeeded. The import step is the only caller that passes onFinishAlso, and it shows that failure on its own row with a way to run it again, and will not let Finish through while it stands — so closing loses nothing. The in-dialog "Try again" is unchanged; it is still the direct retry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xg8vXUuHCH3aRkf91sfxjx
This commit is contained in:
@@ -782,12 +782,14 @@
|
||||
|
||||
/**
|
||||
* Whether closing would throw away work. A failed run counts: its inputs are still editable
|
||||
* and it may have left something behind, and so does a setup that succeeded with its
|
||||
* appended step still failing. A run in flight cannot be closed at all, and one that
|
||||
* finished cleanly has nothing left to lose.
|
||||
* and it may have left something behind. A run in flight cannot be closed at all, and one
|
||||
* that made its data table has nothing left to lose — including when `onFinishAlso` failed
|
||||
* afterwards, because the table is real and working and the caller owns what is left. The
|
||||
* import step, the only caller that passes one, shows that failure on its own row with a
|
||||
* way to run it again and will not let Finish through while it stands.
|
||||
*/
|
||||
function hasUnfinishedIntent(): boolean {
|
||||
return wiz.provider !== undefined && !run.running && (!run.result?.ok || finishAlsoFailed)
|
||||
return wiz.provider !== undefined && !run.running && !run.result?.ok
|
||||
}
|
||||
|
||||
/** Backdrop, Escape and the close button all arrive here. */
|
||||
|
||||
Reference in New Issue
Block a user