chore: consolidate action controllers for failed jobs and jobs#34
Merged
Conversation
destroy and retry now branch on params[:id] — single execution when present, filtered scope when absent. discard_all and retry_all routes map to the same actions via action: option, eliminating two duplicate action methods. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Retry is a creation event — single job and bulk retry_all both route to RetryFailedJobsController#create, branching on params[:id]. FailedJobsController now owns only index and destroy. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
destroy now branches on params[:id] — single execution (with Turbo Stream response) when present, filtered scope bulk discard when absent. discard_all route maps to destroy via action: option. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 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
FailedJobsController#destroyand#discard_allmerged into a singledestroyaction that branches onparams[:id]— single execution when present, full filtered scope when absent;discard_allroute maps todestroyviaaction:optionFailedJobsController#retryand#retry_allextracted into a newRetryFailedJobsController#createaction with the same single/bulk branching pattern; bothretryandretry_allroutes point to the new controllerJobsController#destroyand#discard_allconsolidated the same way, preserving the Turbo Stream response for the single-job pathTest plan
POST /jobs/failed_jobs/:id/retryretries a single jobPOST /jobs/failed_jobs/retry_allretries all (filtered) failed jobsDELETE /jobs/failed_jobs/:iddiscards a single failed jobPOST /jobs/failed_jobs/discard_alldiscards all (filtered) failed jobsDELETE /jobs/list/:iddiscards a single job with Turbo Stream responsePOST /jobs/list/discard_alldiscards all jobs with plain redirect🤖 Generated with Claude Code