Skip to content

feat: job history view with filters, duration, and CSV export#14

Merged
eclectic-coding merged 2 commits into
mainfrom
feat/job-history-view
May 25, 2026
Merged

feat: job history view with filters, duration, and CSV export#14
eclectic-coding merged 2 commits into
mainfrom
feat/job-history-view

Conversation

@eclectic-coding
Copy link
Copy Markdown
Owner

Summary

  • Adds GET /history — paginated list of all finished jobs (finished_at IS NOT NULL) with class name, queue, duration, and finished-at columns
  • Filters: queue (click a badge to filter), class substring (?q=), and time period (1h / 24h / 7d / all)
  • format_duration helper formats seconds as 45s / 2m 15s / 1h 3m
  • CSV export (GET /history.csv) with id, class_name, queue_name, duration_seconds, finished_at — respects active filters
  • "History" link added to queue subnav; current_section updated to include history and scheduled_jobs
  • Controller refactored to before_action :set_filters + private filtered_scope — same pattern as JobsController
  • Dev seeds updated with 8 finished jobs spanning 20 min → 8 days to exercise all period filter windows

Test plan

  • GET /history — 200, page title, lists finished jobs, empty state, duration and columns
  • GET /history?period= — filters correctly, ignores invalid values
  • GET /history?queue= — filters by queue, shows active filter label with clear link
  • GET /history?q= — class name substring filter
  • GET /history.csv — attachment, correct headers, one row per job with duration_seconds
  • Full suite: 135 examples, 0 failures, lint clean

🤖 Generated with Claude Code

eclectic-coding and others added 2 commits May 25, 2026 18:07
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.54839% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.90%. Comparing base (ca40995) to head (c3c484f).

Files with missing lines Patch % Lines
app/helpers/solid_stack_web/application_helper.rb 60.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   98.44%   97.90%   -0.54%     
==========================================
  Files          16       17       +1     
  Lines         257      287      +30     
==========================================
+ Hits          253      281      +28     
- Misses          4        6       +2     
Files with missing lines Coverage Δ
...trollers/solid_stack_web/application_controller.rb 85.18% <100.00%> (ø)
.../controllers/solid_stack_web/history_controller.rb 100.00% <100.00%> (ø)
app/helpers/solid_stack_web/application_helper.rb 81.81% <60.00%> (-18.19%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eclectic-coding eclectic-coding merged commit b6cc2a5 into main May 25, 2026
5 checks passed
@eclectic-coding eclectic-coding deleted the feat/job-history-view branch May 25, 2026 22:10
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.

2 participants