Repository navigation
Conversation
…alStorage
filter.completed, picked in the board's "Filter by status" popover, was
only ever held in volatile Pinia state. Both Controls.vue's board.id
watcher (clearFilter()) and board.js's loadBoardById() reset it back
to the default 'both' every time a board was opened, so a user's
"Open" choice never survived a reload or a board switch.
viewMode already solves the same problem for the Kanban/Gantt toggle
via localStorage, keyed per board (deck.viewMode.${boardId}). Apply
the same pattern to the whole filter object, keyed as
deck.filter.${boardId}, and load/save it in loadBoardById() /
setFilterInStore() instead of hard-resetting on every board switch.
Co-Authored-By: Claude Sonnet 5 <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
filter.completed(the "Filter by status" choice in the board's card filter popover) was only ever held in volatile Pinia/Vue state. Every time a board was opened or switched to, two separate code paths reset it back to the default'both'("Open and completed"):Controls.vue'swatch: { 'board.id': ... }calledclearFilter()stores/board.js'sloadBoardById()reassignedthis.filterto the default objectSo a user choosing "Open" would see it revert the next time they opened the board, even in the same session, let alone after a reload.
viewModealready solves the equivalent problem for Kanban/Gantt view by persisting it inlocalStorageper board (deck.viewMode.${boardId}). This PR applies the same pattern to the wholefilterobject (tags,users,due,unassigned,completed), keyed by board id asdeck.filter.${boardId}.Changes
src/stores/board.jsDEFAULT_FILTER,filterStorageKey(boardId)andloadStoredFilter(boardId)helpers.loadBoardById()now restores the filter fromlocalStorage(falling back to the default) instead of always resetting to the default.setFilterInStore()now writes the merged filter back tolocalStoragefor the current board whenever it changes.src/components/Controls.vuefilterasstoreFilter.board.idwatcher now copiesstoreFilterinto the component's localfiltercopy (immediate: true, so it also runs on initial mount) instead of callingclearFilter(), which used to force the default on every board switch.clearFilter()itself is unchanged, so explicitly clearing the filter still works as before - it now also persists "cleared" as the new remembered state for that board, consistent with every other filter change.Why per board, not global
A "status" filter is a per-board preference, the same way
viewModeis - some boards are used read-only/review-style ("show me only what's left"), others benefit from seeing everything. Scoping the storage key by board id keeps that distinction, exactly likeviewModealready does.Test plan
npm run lint/ the existing test suite before merging.Transparency note:
This PR was co-created with Claude Code