Batch Feedback Refactor: Feedback Only After Paper Submission #2
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.
Batch Feedback Refactor: Feedback Only After Paper Submission
Overview
This PR implements a batch-only feedback workflow for The Examiner app, in line with the new requirements and performance constraints.
AI-generated feedback (both local and cloud-based) is now provided only after the user submits the entire paper, rather than after each individual question.
Key Changes
Batch Feedback Workflow
Per-question feedback is disabled.
A "Submit Paper" button is added; feedback is only generated after submission.
On submission:
All answers for the paper are collected.
Local AI evaluation is run for each answer in a batch.
Feedback is stored in the DB (no schema changes).
Groq (cloud) analysis is queued for each question.
A modal displays all feedback at once, updating in real-time as cloud feedback arrives.
UI/UX
Loading/progress dialog during batch processing.
Feedback modal shows all questions, answers, and feedback at once.
"Cloud analysis pending" message until Groq feedback is received.
Modal updates in-place as finalized feedback arrives.
Database
No schema changes; all changes are operational.
Relies on the existing answer_history table.
Error Handling
User-friendly error messages for missing data, DB errors, or AI failures.
UI is blocked during processing to prevent interaction.
Rationale
Performance:
Defers heavy AI processing to the end, masking latency and improving responsiveness, especially on low-spec hardware.
User Experience:
Smoother, less disruptive feedback experience.
Compliance:
Follows the Batch-Only Feedback Rule and other project requirements.
Additional Notes
No changes to the database schema.
Only files directly involved in the feedback workflow were modified.
Please see BatchFeedback_Refactor_Report.md for rationale and implementation notes.
Ready for review and merge.