feat: sticky filter preferences via localStorage#72
Merged
Conversation
Add FiltersController (Stimulus) to persist the last-used status tab and period pill across page reloads. On connect(), if the URL lacks explicit status/period params, the controller reads from localStorage and redirects — so clicking the "Jobs", "Failed", or "History" nav link always restores where the user left off. Clicking "All" clears the saved period. No server-side changes required. - Jobs: wraps header + search form in a filters controller scope; status tabs call saveStatus, period pills call savePeriod - Failed Jobs / History: controller scoped to the period-filter div Closes #59 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
FiltersControllerStimulus controller that persists the last-used status tab and period pill tolocalStorageconnect(), if the URL lacks explicitstatus/periodparams (e.g. when clicking the nav link), the controller reads from localStorage and redirects — restoring the previous filter automaticallyTest plan
bundle exec rake— 320 examples, 0 failures, 100% coverage, no RuboCop offensesCloses #59
🤖 Generated with Claude Code