Bulk retry and discard for failed jobs; Stimulus via importmap-rails (#11)#11
Merged
Conversation
…e selection controller Add importmap-rails as a dependency and wire it into the engine initializer so the host app's importmap picks up the engine's JS automatically. Add a selection_controller.js (ported from solid_queue_dashboard) that manages checkbox state, select-all toggling, and form injection at submit time. Update the jobs index to use Stimulus data-targets instead of the inline onclick select-all hack; the discard form is now external to the table and the controller injects checked IDs at submit time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add FailedJobs::SelectionsController with create (bulk retry) and destroy (bulk discard) actions, routed as DELETE/POST /failed_jobs/selection. The failed jobs index now uses the Stimulus selection controller with two separate forms — one for retry, one for discard — so the same checkbox selection drives both actions from a single selection bar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Passing a plain string to FailedExecution error: caused SolidQueue to serialize it as a JSON string. On read-back error.with_indifferent_access raised NoMethodError since String doesn't respond to it. Restructured ERRORS as hashes with exception_class, message, and backtrace keys. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
button_to wraps each button in a block-level form element, causing stacked buttons. display: inline on forms inside .sqw-actions keeps Retry and Discard side by side. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Passing arguments as a JSON string caused SolidQueue's retry (reset_execution_counters) to fail — it expects a Hash with executions and exception_executions keys. Seeds now match the format that Active Job writes when enqueuing real jobs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
…prefix on line 13 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
importmap-railsas an engine dependency and wires it into the engine initializer; aselection_controller.js(Stimulus) manages checkbox state, select-all toggling, and injects selected IDs into the appropriate form at submit timeFailedJobs::SelectionsController(POST /failed_jobs/selection→ retry,DELETE /failed_jobs/selection→ discard)data-target/data-actionattributes instead of an inlineonclickhandlerBug fixes
button_towraps in block-level<form>; fixed with.sqw-actions form { display: inline }NoMethodErrorin dev because seeds storedargumentsas a raw JSON string; fixed to use the Active Job hash format withexecutionsandexception_executionskeysTest plan
bundle exec rspec— 91 examples, 0 failuresbin/rubocop— no offenses🤖 Generated with Claude Code