Skip to content

feat: job selection and targeted bulk actions#23

Merged
eclectic-coding merged 4 commits into
mainfrom
feature/job-selection-bulk-actions
May 19, 2026
Merged

feat: job selection and targeted bulk actions#23
eclectic-coding merged 4 commits into
mainfrom
feature/job-selection-bulk-actions

Conversation

@eclectic-coding
Copy link
Copy Markdown
Owner

Summary

  • Adds checkboxes to the jobs index (ready/scheduled/blocked statuses) and failed jobs index for row-level selection
  • A selection bar appears above the table when any row is checked, showing the count and action buttons
  • New selection Stimulus controller handles select-all, per-row toggle, count display, and injects checked IDs into a hidden form on submit
  • New nested singular resource controllers (Jobs::SelectionsController, FailedJobs::SelectionsController) following Rails conventions — destroy for discard, create for retry
  • Singular resource routes defined before parent resources to prevent DELETE /list/:id from shadowing DELETE /list/selection
  • Per-row Discard/Retry buttons preserved unchanged alongside the bulk UI
  • 100% line coverage

Test plan

  • Checkboxes appear on ready/scheduled/blocked jobs tabs, not on running/failed
  • Checking rows shows the selection bar with correct count
  • Select-all checkbox checks/unchecks all rows; goes indeterminate on partial selection
  • "Discard Selected" discards only checked jobs and redirects with notice
  • Failed jobs: "Retry Selected" retries checked jobs, "Discard Selected" discards them
  • Per-row Discard/Retry still work independently
  • All 129 specs pass

🤖 Generated with Claude Code

eclectic-coding and others added 4 commits May 19, 2026 13:39
Add checkboxes to the jobs index (discardable statuses) and failed jobs
index for targeted bulk operations. A selection bar appears above the
table when any row is checked, showing the count and action buttons.

- Jobs::SelectionsController#destroy — discard a subset of ready/
  scheduled/blocked executions by ID
- FailedJobs::SelectionsController#create — retry a subset of failed jobs
- FailedJobs::SelectionsController#destroy — discard a subset of failed jobs
- Singular resource routes at /list/selection and /failed_jobs/selection,
  defined before their parent resources to win the routing priority over
  DELETE /list/:id
- SelectionController (Stimulus) — select-all toggle, per-row toggle,
  count display, programmatic form submission with injected ID inputs
- Selection bar hidden by default, shown via Stimulus when any row checked
- Per-row Discard/Retry buttons preserved unchanged alongside bulk UI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Brings line coverage to 100% by testing the rescue branches in
Jobs::SelectionsController#destroy and both actions in
FailedJobs::SelectionsController.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eclectic-coding eclectic-coding merged commit 416b9f0 into main May 19, 2026
5 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (11a4d7a) to head (874e80f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        15    +2     
  Lines          206       237   +31     
=========================================
+ Hits           206       237   +31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant