refactor: extract queue-scoped jobs view to Queues::JobsController#18
Merged
Conversation
JobsController#index no longer filters by queue — it shows all jobs for a given status. Queue filtering is now a dedicated nested resource: GET /jobs/queues/:queue_name/list → Queues::JobsController#index DEL /jobs/queues/:queue_name/list/:id → Queues::JobsController#destroy POST /jobs/queues/:queue_name/list/discard_all → Queues::JobsController#discard_all Queue name links in the global jobs list navigate to the queue-scoped view. Each controller is self-contained: status tabs, search, discard, and redirects all resolve within their own context. JobsController simplified: removed @Queue from index, set_status_and_queue renamed to set_status, filtered_scope no longer takes queue into account. 86 examples, 100% coverage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #18 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 11 12 +1
Lines 153 187 +34
=========================================
+ Hits 153 187 +34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Job class name links inside the turbo_frame_tag "jobs-table" on the jobs list caused Turbo to look for a matching frame on the show page. When not found, Turbo rendered "Content missing" inside the frame. Adding data-turbo-frame="_top" forces a full-page navigation to the show view. Applied to both the global jobs index and the queue-scoped jobs index. 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
JobsController#indexnow owns only status filtering — the?queue=param and@queueinstance variable are goneQueues::JobsControllerat/jobs/queues/:queue_name/listhandles all queue-scoped job listing, individual discard (with Turbo Stream), and bulk discard — each redirecting back within the queue context?queue=JobsControllersimplified:set_status_and_queue→set_status,filtered_scopeno longer conditionally scopes by queueRoutes added
Test plan
bundle exec rspec)bin/rubocop)🤖 Generated with Claude Code