Skip to content

feat: failure rate sparkline per queue + QueueStats service object#35

Merged
eclectic-coding merged 2 commits into
mainfrom
feat/failure-rate-sparkline
May 20, 2026
Merged

feat: failure rate sparkline per queue + QueueStats service object#35
eclectic-coding merged 2 commits into
mainfrom
feat/failure-rate-sparkline

Conversation

@eclectic-coding
Copy link
Copy Markdown
Owner

Summary

  • Adds a mini 12-bar failure rate sparkline to each row of the Queues table showing the percentage of jobs that failed (vs. completed) in each of the last 12 hours; bars are red and proportional to the rate (0–100 %); hovering shows the hour label and exact percentage; queues with no 12h activity show "—"
  • Extracts all five QueuesController#index queries (completed_24h, failed_24h, oldest_ready, and the two pluck queries feeding failure_sparklines) into a new QueueStats service object (app/services/solid_queue_web/queue_stats.rb), keeping the action thin
  • Updates seeds to include 3 recent failed jobs (within last 10 hours) so the sparkline shows real data after bundle exec rake dev:seed

Test plan

  • All 168 existing request specs pass, 100% line coverage maintained
  • RuboCop clean
  • Seed the dummy app (bundle exec rake dev:reset) and visit /jobs/queues — the Failure Rate (12h) column shows red mini-bar charts for queues with recent failures and "—" for queues with no 12h activity
  • Hover a bar to confirm the tooltip shows the hour and failure percentage
  • Verify dark mode renders the red bars correctly

🤖 Generated with Claude Code

eclectic-coding and others added 2 commits May 20, 2026 14:24
Add a mini 12-bar failure-rate sparkline to each row of the Queues
table showing the percentage of jobs that failed (vs. completed) in
each of the last 12 hours. Bars are red and proportional to the rate
(0–100 %); hovering shows the hour and exact percentage; queues with
no activity show "—".

Extract all five index queries (completed_24h, failed_24h,
oldest_ready, failure_sparklines) from QueuesController into a
QueueStats service object so the action stays thin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add sparkline to Queues feature bullet; remove from roadmap now that
it is shipped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@eclectic-coding eclectic-coding merged commit 22eba2e into main May 20, 2026
7 checks passed
@eclectic-coding eclectic-coding deleted the feat/failure-rate-sparkline branch May 20, 2026 18:29
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