π Bugfix: Unlock NL2Agent form after prompt updates and stops - #3788
Merged
Conversation
RedShakespeare
requested review from
Dallas98,
WMC001 and
jeffwu-1999
as code owners
August 26, 2026 10:06
RedShakespeare
force-pushed
the
dyx/nl2a-unlock
branch
from
August 26, 2026 10:09
fe04650 to
638694e
Compare
xuyaqist
approved these changes
Aug 26, 2026
Codecov Reportβ All modified and coverable lines are covered by tests. π’ Thoughts on this report? Let us know! |
WMC001
approved these changes
Aug 27, 2026
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.
Summary
Fix two cases where the right-side Agent configuration form could remain locked during the NL2Agent workflow:
The form and Composer now unlock after either a database-verified Prompt update completion or an explicit user cancellation.
What changed
Unlock after single-field Prompt updates
duty_prompt,constraint_prompt,few_shots_prompt,greeting_message, andexample_questionsupdates.agent_generation_completedonly when the authoritative persisted Agent state is complete.agent_draft_fields_savedfor partial Prompt updates when the database state is still incomplete.Unlock after user cancellation
generation_stoppedflow action.idleand clear active cards, failed Prompt fields, pending configuration focus, and completion synchronization errors.Why
NL2Agent previously performed completion validation only when a limited final Prompt field batch was saved. A single-point Prompt optimization could therefore update the database successfully without emitting
agent_generation_completed, leaving the frontend flow locked.Manual cancellation stopped the backend conversation but did not update the NL2Agent frontend flow state. The form consequently remained locked even though generation had already stopped.
Impact
Validation
agent_draft_fields_saved.git diff --check origin/develop...HEADpassed.Known limitations
Screenshots