Conversation
What was broken Edit mode could show AI Review (0) even when a saved AI workflow configuration already existed for the challenge. Trying to add a new AI config then failed because the persisted config was still present in the review API. Root cause (if identifiable) The AI review tab only fetched the saved configuration when synced AI reviewer rows were already present in the challenge payload. Some challenge edits load without those synced reviewer rows, so the existing config was skipped. What was changed The AI review tab now fetches the saved AI configuration once for any saved challenge that does not already have a loaded config, even when the challenge payload is missing synced AI reviewer rows. The fetched config still syncs its workflows back into the challenge reviewer state, and the ChallengeEditorPage README now documents that edit-mode fallback behavior. Any added/updated tests Updated AiReviewTab tests to cover unsaved challenges, loading an existing config with missing synced AI reviewers, and the no-refetch local-save path after the initial config lookup. Re-ran the existing ReviewersField specs alongside the updated AI tab tests.
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.
What was broken
Edit mode could show AI Review (0) even when a saved AI workflow configuration already existed for the challenge. Trying to add a new AI config then failed because the persisted config was still present in the review API.
Root cause (if identifiable)
The AI review tab only fetched the saved configuration when synced AI reviewer rows were already present in the challenge payload. Some challenge edits load without those synced reviewer rows, so the existing config was skipped.
What was changed
The AI review tab now fetches the saved AI configuration once for any saved challenge that does not already have a loaded config, even when the challenge payload is missing synced AI reviewer rows. The fetched config still syncs its workflows back into the challenge reviewer state, and the ChallengeEditorPage README now documents that edit-mode fallback behavior.
Any added/updated tests
Updated AiReviewTab tests to cover unsaved challenges, loading an existing config with missing synced AI reviewers, and the no-refetch local-save path after the initial config lookup. Re-ran the existing ReviewersField specs alongside the updated AI tab tests.