Skip to content

fix: [Workflow] - The model should not become unselectable after an error is generated during AI generation - #8205

Merged
shaohuzhang1 merged 1 commit into
v3from
pr@v3@fix_ai_gen
Nov 27, 2026
Merged

shaohuzhang1 merged 1 commit into
v3from
pr@v3@fix_ai_gen

Conversation

@shaohuzhang1

Copy link
Copy Markdown
Contributor

fix: [Workflow] - The model should not become unselectable after an error is generated during AI generation

:disabled="busy"
teleported
/>
</div>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is a concise analysis of the code changes:

1. Logical Flaw in started Computed Property

  • Issue: The new logic status.value !== 'idle' makes started true for error and potentially stopped states (depending on backend flow), whereas the old logic explicitly excluded them.
  • Impact: If status can be 'error' or 'stopped' but not 'idle', UI elements relying on started to indicate "active processing" will incorrectly display as active.
  • Recommendation: Restore exclusion of terminal/error states unless you are certain status only transitions idle -> 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: busy is status === 'running'. started was 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 = question triggers an async status update to 'running' after the click handler completes, there may be a brief moment where busy is false but submission has logically started.
  • Optimization: Consider optimistic UI updates or ensuring status updates 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.

@shaohuzhang1
shaohuzhang1 merged commit f1bd0a1 into v3 Nov 27, 2026
3 of 4 checks passed
@shaohuzhang1
shaohuzhang1 deleted the pr@v3@fix_ai_gen branch November 27, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant