fix(ui): reset module and workspace-view filters when the scope changes#365
fix(ui): reset module and workspace-view filters when the scope changes#365cavidelizade wants to merge 1 commit into
Conversation
The modules filter provider lives at the app-shell root and outlives the page, so a project's status/lead/member filters (project-specific ids) carried over into the next project, usually hiding everything. ModulesPage now resets the filter when the project id changes, tracked at module scope so it survives the page remounting between routes. Workspace views had the mirror problem: switching from a custom view (with saved filters) to a static view left the custom view's filters applied, because the apply effect early-returned for static views. Now it clears filters back to defaults when the target view is static. Closes Devlaner#339 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughModule filters now reset when switching projects, while workspace-view filters clear when navigating to static views. The module filter context exposes a reset method that restores its default state. ChangesFilter State Scoping
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
Summary
Module and workspace-view filters carried over across navigation, so you could end up filtering one project by another project's member/lead/status ids (usually showing nothing).
Linked issues
Closes #339
Type of change
fix:)Surface
apps/web/)What changed
ModulesFilterContextnow exposes areset, andModulesPagecalls it when the project id changes. The last-filtered project is tracked at module scope so the reset still fires when you leave the modules page and come back under a different project (the provider keeps the stale state across that remount, a page-local ref wouldn't catch it).Test plan
npm run typecheck+npm run lintpassAI assistance
Claude Code (Opus 4.8), commits carry aCo-Authored-By:trailerSummary by CodeRabbit