feat: job filtering by class, queue, priority, and time period#3
Merged
Conversation
Filters are driven entirely by query params and preserved across status tabs. The filter form uses a hidden period field so search/select submissions do not lose the active time window, and period links preserve the active class/queue/priority values. No JavaScript required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…constants Moves the three controller-level constants into a SolidStackWeb::Job PORO, keeping the controller focused on HTTP concerns. The view references SolidStackWeb::Job::TAB_LABELS directly to avoid namespace resolution ambiguity in ERB templates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moves the four conditional where-clauses out of #index into a dedicated private method, leaving the action body readable at a glance. 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>
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
q), queue name, priority, and time period (1h / 24h / 7d / all)SolidStackWeb::JobPORO to holdEXECUTION_MODELS,DISCARDABLE,STATUSES, andTAB_LABELS, removing those constants from the controllerfiltered_scopeprivate method inJobsControllerso#indexstays readableChanges
app/models/solid_stack_web/job.rb— new PORO with domain constantsapp/controllers/solid_stack_web/jobs_controller.rb— filter params wired up; constants delegated toJob; scope logic infiltered_scopeapp/assets/stylesheets/solid_stack_web/_08_filters.css— filter bar, search input, select, and period toggle stylesapp/views/solid_stack_web/jobs/index.html.erb— filter form between tabs and table; status tabs preserve active filter paramsspec/requests/solid_stack_web/jobs_spec.rb— 16 request specs covering each filter in isolation, combined filters, and tab-link persistenceTest plan
bundle exec rakepasses (rubocop + rspec, 21 examples)🤖 Generated with Claude Code