Repository navigation
fix(desktop): make "All tasks" and "All projects" reset tasks-page filter dropdowns - #6403
Conversation
…e filter dropdowns
Default filter values ("all" tab, null project/assignee) are omitted from
the URL by tasksSearchFromFilters, so after navigating the render fell back
to the stale zustand-persisted value and the selection was a no-op. Write
the store in the change handlers before navigating, matching the pattern
the other filter handlers already use.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTask filter handlers now update the corresponding filter-store values before navigating. This applies to tab, assignee, and Linear project filters. ChangesTask filter synchronization
Estimated code review effort: 1 (Trivial) | ~3 minutes Mergeability Score: ⚪ Minimal · up to This localized change makes the task-page filter dropdowns correctly reset to all tasks, all projects, or no assignee without retaining stale selections; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
Why / Context
tasksSearchFromFiltersdeliberately omits default values from the URL (notabparam when the tab is"all", nolinearProjectwhen it'snull). The view resolves the effective filter asinitialTab ?? storedTab/initialLinearProject ?? storedLinearProjectFilter, so when a default was selected the URL param disappeared and the render fell back to the stale zustand-persisted value — a no-op. Every non-default option worked because the URL carried it.How It Works
handleTabChange,handleLinearProjectFilterChange, andhandleAssigneeFilterChangenow write the store before navigating — the exact pattern the neighboring handlers for other omitted-when-default filters (handleProjectFiltersChange,handleIncludeClosedIssuesChange,navigateToType) already use.Manual QA (CDP, end-to-end)
Verified against the real dev app over CDP with real mouse input, screencast-recorded, with the fix reverted (before) and applied (after) under identical steps:
?tab=active, label updates)tab:"active"tab:"all"?linearProject=…)nullInput.dispatchMouseEvent; state asserted from trigger labels +location.hash+ persisted store after each step.console.errorhooked during both runs: only a pre-existing, unrelated boot warning (DockBadgeController/DashboardSidebarWorkspaceStatusProvidersetState-in-render), present before and after.Testing
bun run typecheck(desktop)bun run lint(Biome clean on changed file)TasksView; covered by the recorded E2E QA above.Summary by cubic
Fixes tasks-page filters so selecting “All tasks,” “All projects,” or clearing the assignee actually resets the filters. Previously these defaults did nothing because they were omitted from the URL and the view fell back to a stale stored value; the store now updates before navigation.
Review notes
TasksView.tsxbefore navigating:handleTabChange,handleAssigneeFilterChange,handleLinearProjectFilterChange.tab: "all",linearProject: null,assignee: null.handleProjectFiltersChange,handleIncludeClosedIssuesChange, andnavigateToType.Written for commit 72bbca3. Summary will update on new commits.
Summary by CodeRabbit