Skip to content

Conversation

@rohitpaulk
Copy link
Member

@rohitpaulk rohitpaulk commented Nov 12, 2025

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-request for a submission with spinner feedback and error alert on failure.

  • Submission Details > Autofix Container
    • Template (autofix-container.hbs):
      • Adds PrimaryButtonWithSpinner to create an autofix request when none exist, bound to createAutofixRequestTask and handleCreateAutofixButtonClick.
      • Displays error via AlertWithIcon when autofixCreationError is set.
    • Component (autofix-container.ts):
      • Injects store service and tracks autofixCreationError.
      • Implements createAutofixRequestTask (drop policy) to create and save an autofix-request linked to @submission, setting an error message on failure.
      • Adds handleCreateAutofixButtonClick action to trigger the task.

Written by Cursor Bugbot for commit 1da7b88. This will update automatically on new commits. Configure here.

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.
await autofixRequest.save();
} catch {
this.autofixCreationError = 'Failed to create autofix request! Try again? Post on #engineering if this persists.';
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Ghost Record Corrupts UI State After Save

When autofixRequest.save() fails, the unsaved record remains in @submission.autofixRequests. This causes the template to switch from the error/retry UI to displaying the failed request, hiding the error message and create button. The record needs cleanup via rollbackAttributes() or unloadRecord(), or the error should be re-thrown to prevent the record from persisting in the relationship.

Fix in Cursor Fix in Web

@github-actions
Copy link

Test Results

  1 files  ±0    1 suites  ±0   9m 21s ⏱️ - 5m 20s
677 tests ±0  626 ✅ +2  51 💤 ±0  0 ❌ ±0 
677 runs  ±0  626 ✅ +4  51 💤 ±0  0 ❌  - 2 

Results for commit 1da7b88. ± Comparison against base commit 7a052fd.

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...sions-page/submission-details/autofix-container.ts 0.00% 7 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codecov
Copy link

codecov bot commented Nov 12, 2025

Bundle Report

Changes will increase total bundle size by 1.58kB (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
client-array-push 38.76MB 1.58kB (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/chunk.*.js 1.58kB 189.25kB 0.84%
@rohitpaulk rohitpaulk merged commit 6388b30 into main Nov 12, 2025
7 of 9 checks passed
@rohitpaulk rohitpaulk deleted the add-autofix-request-error-handling branch November 12, 2025 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants