feat(autofix-container): add autofix request creation and error handling #3247
+41 −1
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.
Implement a task to create autofix requests for submissions and handle
errors when the creation fails. Introduce a button in the template to
trigger this task with a loading state spinner and show a user-friendly
error message if saving the request fails. This enables admins to
initiate autofix requests directly from the submission details page.
Note
Adds a button and task to create an
autofix-requestfor a submission with spinner feedback and error alert on failure.autofix-container.hbs):PrimaryButtonWithSpinnerto create an autofix request when none exist, bound tocreateAutofixRequestTaskandhandleCreateAutofixButtonClick.AlertWithIconwhenautofixCreationErroris set.autofix-container.ts):storeservice and tracksautofixCreationError.createAutofixRequestTask(drop policy) to create and save anautofix-requestlinked to@submission, setting an error message on failure.handleCreateAutofixButtonClickaction to trigger the task.Written by Cursor Bugbot for commit 1da7b88. This will update automatically on new commits. Configure here.