Repository navigation
fix: [Workflow] - The model should not become unselectable after an error is generated during AI generation - #8205
Merged
Merged
Conversation
…rror is generated during AI generation
shaohuzhang1
commented
Nov 27, 2026
| :disabled="busy" | ||
| teleported | ||
| /> | ||
| </div> |
Contributor
Author
There was a problem hiding this comment.
Here is a concise analysis of the code changes:
1. Logical Flaw in started Computed Property
- Issue: The new logic
status.value !== 'idle'makesstartedtrue forerrorand potentiallystoppedstates (depending on backend flow), whereas the old logic explicitly excluded them. - Impact: If
statuscan be'error'or'stopped'but not'idle', UI elements relying onstartedto indicate "active processing" will incorrectly display as active. - Recommendation: Restore exclusion of terminal/error states unless you are certain
statusonly transitionsidle -> running -> done(no error/stop states). If using a state machine, consider checking against a specific subset of active statuses (e.g.,'running') rather than negating'idle'.
2. Inconsistent Disabled State Logic
- Change:
:disabled="busy"replaces:disabled="started". - Context:
busyisstatus === 'running'.startedwas broader. - Implication: This change decouples the disable state from the general "not idle" concept to strictly "running". This is likely correct/better if the goal is to prevent user input only during execution, allowing changes between steps or after errors. Ensure this aligns with UX requirements.
3. Potential Race Condition / UI Flicker
- Observation: If
requirement.value = questiontriggers an async status update to'running'after the click handler completes, there may be a brief moment wherebusyis false but submission has logically started. - Optimization: Consider optimistic UI updates or ensuring
statusupdates synchronously before enabling/disabling controls if flicker is observed.
Summary Suggestion:
Verify if 'error'/'stopped' statuses persist after completion. If they do, revert to excluding them in started, or rename the computed property to reflect its true meaning (e.g., isActive). The switch to busy for disabling inputs is generally safer and more precise.
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.
fix: [Workflow] - The model should not become unselectable after an error is generated during AI generation