Skip to content

feat: sortable columns on jobs, failed jobs, and history (#78)#98

Merged
eclectic-coding merged 3 commits into
mainfrom
feat/sortable-columns
May 27, 2026
Merged

feat: sortable columns on jobs, failed jobs, and history (#78)#98
eclectic-coding merged 3 commits into
mainfrom
feat/sortable-columns

Conversation

@eclectic-coding
Copy link
Copy Markdown
Owner

Summary

  • sort_header_th helper added to ApplicationHelper — generates a <th> with aria-sort, direction indicator (↑/↓), and URL via a lambda; reused across all three views
  • Jobs (?sort=class_name|queue_name|priority|created_at) — SQL ORDER via the joined solid_queue_jobs table; sort+direction threaded through tabs, period buttons, filter form, discard redirect, and bulk selection form
  • Failed jobs (?sort=class_name|queue_name|created_at) — same pattern; references(:job) always applied for the LEFT OUTER JOIN
  • History (?sort=class_name|queue_name|finished_at) — direct columns on solid_queue_jobs, no join required
  • Invalid sort params fall back to the default (created_at / finished_at desc)

Test plan

  • Jobs list: click Job Class, Queue, Priority, Enqueued At headers — sorting flips correctly; sort survives tab switch and period change
  • Failed jobs list: click Job Class, Queue, Failed At headers — sorts correctly
  • History list: click Job Class, Queue, Finished At headers — sorts correctly
  • Duration column header (History) is intentionally non-sortable (cross-DB SQL complexity)
  • bundle exec rake passes

Closes #78

🤖 Generated with Claude Code

eclectic-coding and others added 3 commits May 27, 2026 09:53
Adds server-side ?sort=&direction= params to three queue list views.
Sort state is preserved across filter changes, tab switches, and period
buttons. A shared sort_header_th helper generates the <th> with
aria-sort and direction indicator from a URL proc.

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>
@eclectic-coding eclectic-coding merged commit 73c4183 into main May 27, 2026
5 checks passed
@eclectic-coding eclectic-coding deleted the feat/sortable-columns branch May 27, 2026 13:57
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.

[v1.2] Sortable columns on jobs, failed jobs, and history

1 participant