Skip to content

PM-4808: reload saved AI configs in edit mode#1701

Merged
jmgasper merged 2 commits intodevfrom
PM-4808
Apr 9, 2026
Merged

PM-4808: reload saved AI configs in edit mode#1701
jmgasper merged 2 commits intodevfrom
PM-4808

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

@jmgasper jmgasper commented Apr 8, 2026

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.


Open with Devin

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.
@jmgasper jmgasper requested a review from kkartunov as a code owner April 8, 2026 08:02
devin-ai-integration[bot]

This comment was marked as resolved.

@jmgasper jmgasper merged commit 7e0e7c9 into dev Apr 9, 2026
9 checks passed
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