Fix follow-up generation always requesting practice#73
Merged
Conversation
The backend's _generation_request_payload() set requested_content_type in the continue action payload but never set intent. The frontend fell back to its hardcoded default of intent='practice', so every follow-up request asked for practice problems regardless of what the backend planned (explanations, worked examples, etc.). Add intent to the payload derived from content_type, and change the frontend default from practice to explanation so the backend decides. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
_generation_request_payload()incontent_workflow.pyincludedrequested_content_typebut notintentin the continue action payload. The frontend'sbuildGenerationFormFromWorkspace()fell back toinitialGenerationForm.intent = 'practice', so every follow-up request was sent as practice regardless of what the backend planned._intent_for_content_type()mapping and includeintentin the payload so the backend's content type decision (explanation, worked example, practice, remediation, assessment) propagates correctlyinitialGenerationFormdefault fromintent: 'practice'/requested_content_type: 'practice_problem'tointent: 'explanation'/requested_content_type: ''— a safer fallback that lets the backend decideTest plan
🤖 Generated with Claude Code